diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2007-02-19 07:37:46 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-03-04 04:12:39 -0500 |
commit | de979caacca51c929d2cc2f0f79611ee4a1bc8a5 (patch) | |
tree | d0a89aee5efdf8e65010dfcf718d600cd78ce0d9 /drivers/kvm/vmx.c | |
parent | d27d4aca184ac0ca6b7e32caf79e1c2b91959be9 (diff) |
KVM: vmx: hack set_cr0_no_modeswitch() to actually do modeswitch
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>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r-- | drivers/kvm/vmx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ff3bfc5c390a..e02c59807a7e 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -791,6 +791,9 @@ static void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
791 | */ | 791 | */ |
792 | static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0) | 792 | static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0) |
793 | { | 793 | { |
794 | if (!vcpu->rmode.active && !(cr0 & CR0_PE_MASK)) | ||
795 | enter_rmode(vcpu); | ||
796 | |||
794 | vcpu->rmode.active = ((cr0 & CR0_PE_MASK) == 0); | 797 | vcpu->rmode.active = ((cr0 & CR0_PE_MASK) == 0); |
795 | update_exception_bitmap(vcpu); | 798 | update_exception_bitmap(vcpu); |
796 | vmcs_writel(CR0_READ_SHADOW, cr0); | 799 | vmcs_writel(CR0_READ_SHADOW, cr0); |