[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1560445409-17363-38-git-send-email-pbonzini@redhat.com>
Date: Thu, 13 Jun 2019 19:03:23 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
vkuznets@...hat.com
Subject: [PATCH 37/43] KVM: nVMX: Don't reset VMCS controls shadow on VMCS switch
From: Sean Christopherson <sean.j.christopherson@...el.com>
... now that the shadow copies are per-VMCS.
Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
---
arch/x86/kvm/vmx/nested.c | 5 -----
arch/x86/kvm/vmx/vmx.h | 4 ----
2 files changed, 9 deletions(-)
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 9703fcf19837..47adafa42fbf 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -283,11 +283,6 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
vmx_sync_vmcs_host_state(vmx, prev);
put_cpu();
- vm_entry_controls_reset_shadow(vmx);
- vm_exit_controls_reset_shadow(vmx);
- pin_controls_reset_shadow(vmx);
- exec_controls_reset_shadow(vmx);
- secondary_exec_controls_reset_shadow(vmx);
vmx_segment_cache_clear(vmx);
}
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
index 7616f2a455d2..6f26f3c10805 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -388,10 +388,6 @@ static inline u8 vmx_get_rvi(void)
}
#define BUILD_CONTROLS_SHADOW(lname, uname) \
-static inline void lname##_controls_reset_shadow(struct vcpu_vmx *vmx) \
-{ \
- vmx->loaded_vmcs->controls_shadow.lname = vmcs_read32(uname); \
-} \
static inline void lname##_controls_init(struct vcpu_vmx *vmx, u32 val) \
{ \
vmcs_write32(uname, val); \
--
1.8.3.1
Powered by blists - more mailing lists