aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index aa7e2ba6fb5..027a9625ef9 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -788,22 +788,6 @@ static void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
788 vcpu->cr0 = cr0; 788 vcpu->cr0 = cr0;
789} 789}
790 790
791/*
792 * Used when restoring the VM to avoid corrupting segment registers
793 */
794static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0)
795{
796 if (!vcpu->rmode.active && !(cr0 & CR0_PE_MASK))
797 enter_rmode(vcpu);
798
799 vcpu->rmode.active = ((cr0 & CR0_PE_MASK) == 0);
800 update_exception_bitmap(vcpu);
801 vmcs_writel(CR0_READ_SHADOW, cr0);
802 vmcs_writel(GUEST_CR0,
803 (cr0 & ~KVM_GUEST_CR0_MASK) | KVM_VM_CR0_ALWAYS_ON);
804 vcpu->cr0 = cr0;
805}
806
807static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) 791static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
808{ 792{
809 vmcs_writel(GUEST_CR3, cr3); 793 vmcs_writel(GUEST_CR3, cr3);
@@ -2069,7 +2053,6 @@ static struct kvm_arch_ops vmx_arch_ops = {
2069 .get_cs_db_l_bits = vmx_get_cs_db_l_bits, 2053 .get_cs_db_l_bits = vmx_get_cs_db_l_bits,
2070 .decache_cr0_cr4_guest_bits = vmx_decache_cr0_cr4_guest_bits, 2054 .decache_cr0_cr4_guest_bits = vmx_decache_cr0_cr4_guest_bits,
2071 .set_cr0 = vmx_set_cr0, 2055 .set_cr0 = vmx_set_cr0,
2072 .set_cr0_no_modeswitch = vmx_set_cr0_no_modeswitch,
2073 .set_cr3 = vmx_set_cr3, 2056 .set_cr3 = vmx_set_cr3,
2074 .set_cr4 = vmx_set_cr4, 2057 .set_cr4 = vmx_set_cr4,
2075#ifdef CONFIG_X86_64 2058#ifdef CONFIG_X86_64