All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Proper use of VMX execution controls MSR.
@ 2007-03-28 15:51 Li, Xin B
  2007-03-28 18:01 ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Li, Xin B @ 2007-03-28 15:51 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 88 bytes --]

Better use of VMX execution controls MSR.

Signed-off-by: Xin Li<xin.b.li@intel.com>

[-- Attachment #2: vmx_ctrls_adjust.patch --]
[-- Type: application/octet-stream, Size: 695 bytes --]

diff -r 7e6ef2b914aa xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c	Wed Mar 28 12:38:13 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c	Wed Mar 28 22:29:17 2007 +0800
@@ -86,10 +86,13 @@ static u32 adjust_vmx_controls(u32 ctrls
 
     rdmsr(msr, vmx_msr_low, vmx_msr_high);
 
-    /* Bit == 0 means must be zero. */
-    BUG_ON(ctrls & ~vmx_msr_high);
-
-    /* Bit == 1 means must be one. */
+    /* bits setting we should respect */
+    ctrls &= vmx_msr_low ^ vmx_msr_high;
+
+    /* Bit == 0 in high bits of the MSR means must be zero. */
+    ctrls &= vmx_msr_high;
+
+    /* Bit == 1 in low bits of the MSR means must be one. */
     ctrls |= vmx_msr_low;
 
     return ctrls;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-03-29  9:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 15:51 [PATCH] Proper use of VMX execution controls MSR Li, Xin B
2007-03-28 18:01 ` Keir Fraser
2007-03-29  1:15   ` Cui, Dexuan
2007-03-29  6:07   ` Nakajima, Jun
2007-03-29  6:22   ` Li, Xin B
2007-03-29  7:41     ` Keir Fraser
2007-03-29  8:37       ` Li, Xin B
2007-03-29  9:11         ` Keir Fraser
2007-03-29  9:29           ` Li, Xin B

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.