diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a4a7d1892f72..27af6e353b06 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -456,7 +456,7 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
456 | 456 | ||
457 | if (!is_paging(vcpu) && (cr0 & X86_CR0_PG)) { | 457 | if (!is_paging(vcpu) && (cr0 & X86_CR0_PG)) { |
458 | #ifdef CONFIG_X86_64 | 458 | #ifdef CONFIG_X86_64 |
459 | if ((vcpu->arch.shadow_efer & EFER_LME)) { | 459 | if ((vcpu->arch.efer & EFER_LME)) { |
460 | int cs_db, cs_l; | 460 | int cs_db, cs_l; |
461 | 461 | ||
462 | if (!is_pae(vcpu)) { | 462 | if (!is_pae(vcpu)) { |
@@ -655,7 +655,7 @@ static void set_efer(struct kvm_vcpu *vcpu, u64 efer) | |||
655 | } | 655 | } |
656 | 656 | ||
657 | if (is_paging(vcpu) | 657 | if (is_paging(vcpu) |
658 | && (vcpu->arch.shadow_efer & EFER_LME) != (efer & EFER_LME)) { | 658 | && (vcpu->arch.efer & EFER_LME) != (efer & EFER_LME)) { |
659 | printk(KERN_DEBUG "set_efer: #GP, change LME while paging\n"); | 659 | printk(KERN_DEBUG "set_efer: #GP, change LME while paging\n"); |
660 | kvm_inject_gp(vcpu, 0); | 660 | kvm_inject_gp(vcpu, 0); |
661 | return; | 661 | return; |
@@ -686,9 +686,9 @@ static void set_efer(struct kvm_vcpu *vcpu, u64 efer) | |||
686 | kvm_x86_ops->set_efer(vcpu, efer); | 686 | kvm_x86_ops->set_efer(vcpu, efer); |
687 | 687 | ||
688 | efer &= ~EFER_LMA; | 688 | efer &= ~EFER_LMA; |
689 | efer |= vcpu->arch.shadow_efer & EFER_LMA; | 689 | efer |= vcpu->arch.efer & EFER_LMA; |
690 | 690 | ||
691 | vcpu->arch.shadow_efer = efer; | 691 | vcpu->arch.efer = efer; |
692 | 692 | ||
693 | vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; | 693 | vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; |
694 | kvm_mmu_reset_context(vcpu); | 694 | kvm_mmu_reset_context(vcpu); |
@@ -1426,7 +1426,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) | |||
1426 | data |= (((uint64_t)4ULL) << 40); | 1426 | data |= (((uint64_t)4ULL) << 40); |
1427 | break; | 1427 | break; |
1428 | case MSR_EFER: | 1428 | case MSR_EFER: |
1429 | data = vcpu->arch.shadow_efer; | 1429 | data = vcpu->arch.efer; |
1430 | break; | 1430 | break; |
1431 | case MSR_KVM_WALL_CLOCK: | 1431 | case MSR_KVM_WALL_CLOCK: |
1432 | data = vcpu->kvm->arch.wall_clock; | 1432 | data = vcpu->kvm->arch.wall_clock; |
@@ -4569,7 +4569,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | |||
4569 | sregs->cr3 = vcpu->arch.cr3; | 4569 | sregs->cr3 = vcpu->arch.cr3; |
4570 | sregs->cr4 = kvm_read_cr4(vcpu); | 4570 | sregs->cr4 = kvm_read_cr4(vcpu); |
4571 | sregs->cr8 = kvm_get_cr8(vcpu); | 4571 | sregs->cr8 = kvm_get_cr8(vcpu); |
4572 | sregs->efer = vcpu->arch.shadow_efer; | 4572 | sregs->efer = vcpu->arch.efer; |
4573 | sregs->apic_base = kvm_get_apic_base(vcpu); | 4573 | sregs->apic_base = kvm_get_apic_base(vcpu); |
4574 | 4574 | ||
4575 | memset(sregs->interrupt_bitmap, 0, sizeof sregs->interrupt_bitmap); | 4575 | memset(sregs->interrupt_bitmap, 0, sizeof sregs->interrupt_bitmap); |
@@ -5059,7 +5059,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
5059 | 5059 | ||
5060 | kvm_set_cr8(vcpu, sregs->cr8); | 5060 | kvm_set_cr8(vcpu, sregs->cr8); |
5061 | 5061 | ||
5062 | mmu_reset_needed |= vcpu->arch.shadow_efer != sregs->efer; | 5062 | mmu_reset_needed |= vcpu->arch.efer != sregs->efer; |
5063 | kvm_x86_ops->set_efer(vcpu, sregs->efer); | 5063 | kvm_x86_ops->set_efer(vcpu, sregs->efer); |
5064 | kvm_set_apic_base(vcpu, sregs->apic_base); | 5064 | kvm_set_apic_base(vcpu, sregs->apic_base); |
5065 | 5065 | ||