public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Stevens <stevensd@chromium.org>
To: Sean Christopherson <seanjc@google.com>,
	David Woodhouse <dwmw@amazon.co.uk>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Stevens <stevensd@chromium.org>
Subject: [PATCH 0/3] KVM: x86: replace kvm_vcpu_map usage in vmx
Date: Fri, 27 Jan 2023 13:44:57 +0900	[thread overview]
Message-ID: <20230127044500.680329-1-stevensd@google.com> (raw)

From: David Stevens <stevensd@chromium.org>

This series replaces the usage of kvm_vcpu_map in vmx with
gfn_to_pfn_cache. See [1] for details on why kvm_vcpu_map is broken.

The presence of kvm_vcpu_map blocks another series I would like to
try to merge [2]. Although I'm not familiar with the internals of vmx,
I've gone ahead and taken a stab at this cleanup. I've done some manual
testing with nested VMs, and KVM selftests pass, but thorough feedback
would be appreciated. Once this cleanup is done, I'll take a look at
removing kvm_vcpu_map from svm.

[1] https://lore.kernel.org/all/20211115165030.7422-8-dwmw2@infradead.org/
[2] https://lore.kernel.org/all/Ydhq5aHW+JFo15UF@google.com/

David Stevens (3):
  KVM: Support sharing gpc locks
  KVM: use gfn=>pfn cache in nested_get_vmcs12_pages
  KVM: use gfn=>pfn cache for evmcs

 arch/x86/kvm/vmx/hyperv.c |  41 ++++-
 arch/x86/kvm/vmx/hyperv.h |   2 +
 arch/x86/kvm/vmx/nested.c | 329 +++++++++++++++++++++++++++++---------
 arch/x86/kvm/vmx/vmx.c    |  48 +++++-
 arch/x86/kvm/vmx/vmx.h    |  14 +-
 arch/x86/kvm/x86.c        |   8 +-
 arch/x86/kvm/xen.c        |  58 +++----
 include/linux/kvm_host.h  |  12 ++
 include/linux/kvm_types.h |   3 +-
 virt/kvm/pfncache.c       |  37 +++--
 10 files changed, 418 insertions(+), 134 deletions(-)

-- 
2.39.1.456.gfc5497dd1b-goog


             reply	other threads:[~2023-01-27  4:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  4:44 David Stevens [this message]
2023-01-27  4:44 ` [PATCH 1/3] KVM: Support sharing gpc locks David Stevens
2023-01-28 21:42   ` kernel test robot
2023-01-29  0:46   ` kernel test robot
2023-01-29 10:08   ` David Woodhouse
2023-01-30  5:25     ` [PATCH 4/3] KVM: x86/xen: Make runstate cache gpcs share a lock David Stevens
2023-01-31 16:58       ` David Woodhouse
2023-01-27  4:44 ` [PATCH 2/3] KVM: use gfn=>pfn cache in nested_get_vmcs12_pages David Stevens
2023-01-27  4:45 ` [PATCH 3/3] KVM: use gfn=>pfn cache for evmcs David Stevens
2023-01-27 19:19 ` [PATCH 0/3] KVM: x86: replace kvm_vcpu_map usage in vmx Sean Christopherson
2023-03-06  1:45   ` David Stevens
2023-03-07 16:03     ` Sean Christopherson
2023-03-14 23:33 ` 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=20230127044500.680329-1-stevensd@google.com \
    --to=stevensd@chromium.org \
    --cc=dwmw@amazon.co.uk \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.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