Skip to contentSkip to conversation

KVM: Fix guest cr4 corruption

PATCH New Avi Kivity 1 participant 1 message Nov 7, 2006 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 KVM: Fix guest cr4 corruption

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).

drivers/kvm/kvm_main.c +1 -1
Index: 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);
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642