[Xen-devel] [PATCH] vmx-smsw.patch

Arun Sharma
Fri, 27 May 2005 19:40:18 -0000

Handle vmexits from the SMSW instruction correctly.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

--- 1.58/xen/arch/x86/vmx.c	2005-05-26 19:36:15 -07:00
+++ edited/xen/arch/x86/vmx.c	2005-05-27 12:27:13 -07:00
@@ -987,10 +986,9 @@
         __vmwrite(CR0_READ_SHADOW, value);
         break;
     case TYPE_LMSW:
-        __vmwrite(CR0_READ_SHADOW, value);
+        __vmread(CR0_READ_SHADOW, &value);
 	value = (value & ~0xF) |
-		(((exit_qualification & LMSW_SOURCE_DATA) >> 16) & 0xF) |
-		1 /* CR0.PE == 1 */;
+		(((exit_qualification & LMSW_SOURCE_DATA) >> 16) & 0xF);
 	return vmx_set_cr0(value);
         break;
     default:

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com