WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] The maximum instruction length for both x86-32 and

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The maximum instruction length for both x86-32 and
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Apr 2006 13:16:17 +0000
Delivery-date: Tue, 11 Apr 2006 06:17:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 530aede2d28c4e8aaf32a209d3facc66f4f1fd47
# Parent  480b57b981738a49af2dd42ba4abd92105e4ad74
The maximum instruction length for both x86-32 and
x86-64 is 15 bytes (including all prefixes, opcode,
ModRM, SIB, displacement, and immediate bytes).
This patch adjusts the MAX_INST_LEN to the correct
value.  This should reduce the size of some variables
in the hypervisor code.  This patch also does some
minor code clean-up in the vm exit handler for VMX.

Signed-off-by: Khoa Huynh <khoa@xxxxxxxxxx>

diff -r 480b57b98173 -r 530aede2d28c xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue Apr 11 09:42:38 2006
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Apr 11 09:44:58 2006
@@ -1947,7 +1947,7 @@
         && !(vector & INTR_INFO_VALID_MASK))
         __hvm_bug(regs);
 
-    vector &= 0xff;
+    vector &= INTR_INFO_VECTOR_MASK;
     local_irq_disable();
     TRACE_VMEXIT(1,vector);
 
@@ -2077,10 +2077,8 @@
         return;
     }
 
-    {
-        __vmread(GUEST_RIP, &eip);
-        TRACE_VMEXIT(0,exit_reason);
-    }
+    __vmread(GUEST_RIP, &eip);
+    TRACE_VMEXIT(0,exit_reason);
 
     switch (exit_reason) {
     case EXIT_REASON_EXCEPTION_NMI:
@@ -2097,7 +2095,7 @@
         if ((error = __vmread(VM_EXIT_INTR_INFO, &vector))
             || !(vector & INTR_INFO_VALID_MASK))
             __hvm_bug(&regs);
-        vector &= 0xff;
+        vector &= INTR_INFO_VECTOR_MASK;
 
         TRACE_VMEXIT(1,vector);
         perfc_incra(cause_vector, vector);
diff -r 480b57b98173 -r 530aede2d28c xen/include/asm-x86/hvm/io.h
--- a/xen/include/asm-x86/hvm/io.h      Tue Apr 11 09:42:38 2006
+++ b/xen/include/asm-x86/hvm/io.h      Tue Apr 11 09:44:58 2006
@@ -77,7 +77,7 @@
     __u32   flags;
 };
 
-#define MAX_INST_LEN      32
+#define MAX_INST_LEN      15 /* Maximum instruction length = 15 bytes */
 
 struct mmio_op {
     int                    flags;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>