Messages in this thread Patch in this message | | | Subject | [PATCH 4/13] KVM: vmx: hack set_cr0_no_modeswitch() to actually do modeswitch | From | Avi Kivity <> | Date | Mon, 19 Feb 2007 10:24:51 -0000 |
| |
From: Markus Rechberger <markus.rechberger@amd.com> From: Joerg Roedel <joerg.roedel@amd.com>
The whole thing is rotten, but this allows vmx to boot with the guest reboot fix.
Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/vmx.c =================================================================== --- linux-2.6.orig/drivers/kvm/vmx.c +++ linux-2.6/drivers/kvm/vmx.c @@ -791,6 +791,9 @@ static void vmx_set_cr0(struct kvm_vcpu */ static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0) { + if (!vcpu->rmode.active && !(cr0 & CR0_PE_MASK)) + enter_rmode(vcpu); + vcpu->rmode.active = ((cr0 & CR0_PE_MASK) == 0); update_exception_bitmap(vcpu); vmcs_writel(CR0_READ_SHADOW, cr0); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |