* [PATCH] KVM: Fix guest cr4 corruption
@ 2006-11-07 16:04 Avi Kivity
0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2006-11-07 16:04 UTC (permalink / raw)
To: kvm-devel; +Cc: akpm, linux-kernel
Upon entry to protected mode, we set cr4 to a value derived from cr0
accidentally. Fix.
This could cause a guest to crash (though I never observed it).
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/kvm_main.c
===================================================================
--- linux-2.6.orig/drivers/kvm/kvm_main.c
+++ linux-2.6/drivers/kvm/kvm_main.c
@@ -697,7 +697,7 @@ static void enter_pmode(struct kvm_vcpu
vmcs_writel(GUEST_RFLAGS, flags);
vmcs_writel(GUEST_CR4, (vmcs_readl(GUEST_CR4) & ~CR4_VME_MASK) |
- (vmcs_readl(CR0_READ_SHADOW) & CR4_VME_MASK) );
+ (vmcs_readl(CR4_READ_SHADOW) & CR4_VME_MASK));
update_exception_bitmap(vcpu);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-07 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-07 16:04 [PATCH] KVM: Fix guest cr4 corruption Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®