mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] KVM: VMX: Add caching of EXIT_QUAL and INTR_INFO
Date: Wed, 15 Apr 2020 13:34:49 -0700	[thread overview]
Message-ID: <20200415203454.8296-1-sean.j.christopherson@intel.com> (raw)

Patches 4-5 are the focus of this series, adding caching of
vmcs.EXIT_QUALIFICATION and proper caching of vmcs.INTR_INFO (instead of
caching it with ad hoc rules about when it's available).  Patches 1-3
are prep work to clean up the register caching to ensure correctness when
switching between vmcs01 and vmcs02.

The idea for this came about when working on the "unionize exit_reason"
series.  The nested VM-Exit logic looks at both fields multiple times,
which is ok-ish when everything is crammed into one or two functions, but
incurs multiple VMREADs when split up.  I really didn't want to solve that
issue by piling on more cases where vmx->exit_intr_info would be valid, or
by duplicating that fragile pattern for exit_qualification.

Paolo, this will conflict with the "unionize exit_reason" series, though
the conflict resolution is all mechnical in nature.  Let me know if you
want me to respin one on top of the other, send a single series, etc...

Sean Christopherson (5):
  KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is
    enabled
  KVM: nVMX: Reset register cache (available and dirty masks) on VMCS
    switch
  KVM: nVMX: Drop manual clearing of segment cache on nested VMCS switch
  KVM: VMX: Cache vmcs.EXIT_QUALIFICATION using arch avail_reg flags
  KVM: VMX: Cache vmcs.EXIT_INTR_INFO using arch avail_reg flags

 arch/x86/include/asm/kvm_host.h |  2 +
 arch/x86/kvm/vmx/nested.c       | 29 +++++++------
 arch/x86/kvm/vmx/nested.h       |  4 +-
 arch/x86/kvm/vmx/vmx.c          | 73 ++++++++++++++++-----------------
 arch/x86/kvm/vmx/vmx.h          | 35 +++++++++++++++-
 5 files changed, 86 insertions(+), 57 deletions(-)

-- 
2.26.0


             reply	other threads:[~2020-04-15 20:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 20:34 Sean Christopherson [this message]
2020-04-15 20:34 ` [PATCH 1/5] KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is enabled Sean Christopherson
2020-04-15 20:34 ` [PATCH 2/5] KVM: nVMX: Reset register cache (available and dirty masks) on VMCS switch Sean Christopherson
2020-04-15 20:34 ` [PATCH 3/5] KVM: nVMX: Drop manual clearing of segment cache on nested " Sean Christopherson
2020-04-15 20:34 ` [PATCH 4/5] KVM: VMX: Cache vmcs.EXIT_QUALIFICATION using arch avail_reg flags Sean Christopherson
2020-04-15 20:34 ` [PATCH 5/5] KVM: VMX: Cache vmcs.EXIT_INTR_INFO " Sean Christopherson
2020-04-16 13:42 ` [PATCH 0/5] KVM: VMX: Add caching of EXIT_QUAL and INTR_INFO Paolo Bonzini

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=20200415203454.8296-1-sean.j.christopherson@intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®