All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH 07/13] KVM: nVMX: Don't reset VMCS controls shadow on VMCS switch
Date: Tue,  7 May 2019 12:17:59 -0700	[thread overview]
Message-ID: <20190507191805.9932-8-sean.j.christopherson@intel.com> (raw)
In-Reply-To: <20190507191805.9932-1-sean.j.christopherson@intel.com>

... now that the shadow copies are per-VMCS.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.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 007d03a49484..23be882e3365 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -252,11 +252,6 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
 	vmx_vcpu_load(vcpu, cpu);
 	put_cpu();
 
-	vm_entry_controls_reset_shadow(vmx);
-	vm_exit_controls_reset_shadow(vmx);
-	pin_controls_reset_shadow(vmx);
-	exec_controls_reset_shadow(vmx);
-	sec_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 2c367011df98..c12c0aec13a5 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -375,10 +375,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);					    \
-- 
2.21.0


  parent reply	other threads:[~2019-05-07 19:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 19:17 [PATCH 00/13] KVM: VMX: Reduce VMWRITEs to VMCS controls Sean Christopherson
2019-05-07 19:17 ` [PATCH 01/13] KVM: nVMX: Use adjusted pin controls for vmcs02 Sean Christopherson
2019-06-06 16:55   ` Paolo Bonzini
2019-05-07 19:17 ` [PATCH 02/13] KVM: VMX: Add builder macros for shadowing controls Sean Christopherson
2019-05-07 19:17 ` [PATCH 03/13] KVM: VMX: Shadow VMCS pin controls Sean Christopherson
2019-05-07 19:17 ` [PATCH 04/13] KVM: VMX: Shadow VMCS primary execution controls Sean Christopherson
2019-05-07 19:17 ` [PATCH 05/13] KVM: VMX: Shadow VMCS secondary " Sean Christopherson
2019-06-06 16:59   ` Paolo Bonzini
2019-05-07 19:17 ` [PATCH 06/13] KVM: nVMX: Shadow VMCS controls on a per-VMCS basis Sean Christopherson
2019-05-07 19:17 ` Sean Christopherson [this message]
2019-05-07 19:18 ` [PATCH 08/13] KVM: VMX: Explicitly initialize controls shadow at VMCS allocation Sean Christopherson
2019-05-07 19:18 ` [PATCH 09/13] KVM: nVMX: Preserve last USE_MSR_BITMAPS when preparing vmcs02 Sean Christopherson
2019-06-06 17:12   ` Paolo Bonzini
2019-05-07 19:18 ` [PATCH 10/13] KVM: nVMX: Preset *DT exiting in vmcs02 when emulating UMIP Sean Christopherson
2019-06-06 17:15   ` Paolo Bonzini
2019-05-07 19:18 ` [PATCH 11/13] KVM: VMX: Drop hv_timer_armed from 'struct loaded_vmcs' Sean Christopherson
2019-05-07 19:18 ` [PATCH 12/13] KVM: nVMX: Don't mark vmcs12 as dirty when L1 writes pin controls Sean Christopherson
2019-06-06 17:16   ` Paolo Bonzini
2019-06-06 17:24   ` Paolo Bonzini
2019-06-06 19:05     ` Sean Christopherson
2019-05-07 19:18 ` [PATCH 13/13] KVM: VMX: Leave preemption timer running when it's disabled Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190507191805.9932-8-sean.j.christopherson@intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.