According to my Intel manual, although lmsw only causes an exit when
trying to set the bottom 4 bits, it is supposed to set the bottom 16
bits of cr0.

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>

diff -r f06a5d7dc984 drivers/kvm/kvm_main.c
--- a/drivers/kvm/kvm_main.c    Wed Jul 25 13:05:14 2007 +1000
+++ b/drivers/kvm/kvm_main.c    Wed Jul 25 13:15:24 2007 +1000
@@ -526,7 +526,7 @@ EXPORT_SYMBOL_GPL(set_cr0);
 
 void lmsw(struct kvm_vcpu *vcpu, unsigned long msw)
 {
-       set_cr0(vcpu, (vcpu->cr0 & ~0x0ful) | (msw & 0x0f));
+       set_cr0(vcpu, (vcpu->cr0 & ~0xffffUL) | (msw & 0xffff));
 }
 EXPORT_SYMBOL_GPL(lmsw);
 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to