diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index db77537013d1..8dca6ccbb9ce 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2785,7 +2785,7 @@ static int hardware_enable(void) | |||
2785 | u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); | 2785 | u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); |
2786 | u64 old, test_bits; | 2786 | u64 old, test_bits; |
2787 | 2787 | ||
2788 | if (read_cr4() & X86_CR4_VMXE) | 2788 | if (cr4_read_shadow() & X86_CR4_VMXE) |
2789 | return -EBUSY; | 2789 | return -EBUSY; |
2790 | 2790 | ||
2791 | INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu)); | 2791 | INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu)); |
@@ -4255,7 +4255,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx) | |||
4255 | vmcs_writel(HOST_CR3, read_cr3()); /* 22.2.3 FIXME: shadow tables */ | 4255 | vmcs_writel(HOST_CR3, read_cr3()); /* 22.2.3 FIXME: shadow tables */ |
4256 | 4256 | ||
4257 | /* Save the most likely value for this task's CR4 in the VMCS. */ | 4257 | /* Save the most likely value for this task's CR4 in the VMCS. */ |
4258 | cr4 = read_cr4(); | 4258 | cr4 = cr4_read_shadow(); |
4259 | vmcs_writel(HOST_CR4, cr4); /* 22.2.3, 22.2.5 */ | 4259 | vmcs_writel(HOST_CR4, cr4); /* 22.2.3, 22.2.5 */ |
4260 | vmx->host_state.vmcs_host_cr4 = cr4; | 4260 | vmx->host_state.vmcs_host_cr4 = cr4; |
4261 | 4261 | ||
@@ -7784,7 +7784,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | |||
7784 | if (test_bit(VCPU_REGS_RIP, (unsigned long *)&vcpu->arch.regs_dirty)) | 7784 | if (test_bit(VCPU_REGS_RIP, (unsigned long *)&vcpu->arch.regs_dirty)) |
7785 | vmcs_writel(GUEST_RIP, vcpu->arch.regs[VCPU_REGS_RIP]); | 7785 | vmcs_writel(GUEST_RIP, vcpu->arch.regs[VCPU_REGS_RIP]); |
7786 | 7786 | ||
7787 | cr4 = read_cr4(); | 7787 | cr4 = cr4_read_shadow(); |
7788 | if (unlikely(cr4 != vmx->host_state.vmcs_host_cr4)) { | 7788 | if (unlikely(cr4 != vmx->host_state.vmcs_host_cr4)) { |
7789 | vmcs_writel(HOST_CR4, cr4); | 7789 | vmcs_writel(HOST_CR4, cr4); |
7790 | vmx->host_state.vmcs_host_cr4 = cr4; | 7790 | vmx->host_state.vmcs_host_cr4 = cr4; |