From: Greg KH on
2.6.33-stable review patch. If anyone has any objections, please let me know.


From: Avi Kivity <avi(a)>

The current lmsw implementation allows the guest to clear, contrary
to the manual, which breaks EMM386.EXE.

Fix by ORing the old with lmsw's operand.

Signed-off-by: Avi Kivity <avi(a)>
Signed-off-by: Marcelo Tosatti <mtosatti(a)>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)>
(cherry picked from commit f78e917688edbf1f14c318d2e50dc8e7dad20445)
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -432,7 +432,7 @@ EXPORT_SYMBOL_GPL(kvm_set_cr0);

void kvm_lmsw(struct kvm_vcpu *vcpu, unsigned long msw)
- kvm_set_cr0(vcpu, (vcpu->arch.cr0 & ~0x0ful) | (msw & 0x0f));
+ kvm_set_cr0(vcpu, (vcpu->arch.cr0 & ~0x0eul) | (msw & 0x0f));

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at