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] [xen-unstable] Intel VPID: Do not crash if INVVPID is at

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Intel VPID: Do not crash if INVVPID is attempted before VMXON.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Apr 2008 06:30:17 -0700
Delivery-date: Fri, 25 Apr 2008 06:31:01 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1209127102 -3600
# Node ID 6032730df2eb844a81b55421f5dbada4dc3e295d
# Parent  7689e311f3b5ee4a4d547405c73e40ab689875f0
Intel VPID: Do not crash if INVVPID is attempted before VMXON.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/include/asm-x86/hvm/vmx/vmx.h |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r 7689e311f3b5 -r 6032730df2eb xen/include/asm-x86/hvm/vmx/vmx.h
--- a/xen/include/asm-x86/hvm/vmx/vmx.h Fri Apr 25 13:27:19 2008 +0100
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h Fri Apr 25 13:38:22 2008 +0100
@@ -263,7 +263,7 @@ static inline void __invept(int ext, u64
 
     asm volatile ( INVEPT_OPCODE
                    MODRM_EAX_08
-                   /* CF==1 or ZF==1 --> rc = -1 */
+                   /* CF==1 or ZF==1 --> crash (ud2) */
                    "ja 1f ; ud2 ; 1:\n"
                    :
                    : "a" (&operand), "c" (ext)
@@ -278,10 +278,14 @@ static inline void __invvpid(int ext, u1
         u64 gva;
     } __attribute__ ((packed)) operand = {vpid, 0, gva};
 
-    asm volatile ( INVVPID_OPCODE
-                   MODRM_EAX_08
-                   /* CF==1 or ZF==1 --> rc = -1 */
-                   "ja 1f ; ud2 ; 1:\n"
+    /* Fix up #UD exceptions which occur when TLBs are flushed before VMXON. */
+    asm volatile ( "1: " INVVPID_OPCODE MODRM_EAX_08
+                   /* CF==1 or ZF==1 --> crash (ud2) */
+                   "ja 2f ; ud2 ; 2:\n"
+                   ".section __ex_table,\"a\"\n"
+                   "    "__FIXUP_ALIGN"\n"
+                   "    "__FIXUP_WORD" 1b,2b\n"
+                   ".previous"
                    :
                    : "a" (&operand), "c" (ext)
                    : "memory" );

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Intel VPID: Do not crash if INVVPID is attempted before VMXON., Xen patchbot-unstable <=