mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Sean Christopherson <seanjc@google.com>
Subject: [GIT PULL] KVM: x86: MMU changes for 6.17
Date: Fri, 25 Jul 2025 15:07:07 -0700	[thread overview]
Message-ID: <20250725220713.264711-8-seanjc@google.com> (raw)
In-Reply-To: <20250725220713.264711-1-seanjc@google.com>

Dynamically allocate the shadow MMU's hashed page list, as it's a whopping
32KiB and isn't needed when using the TDP MMU without nested VMs.  The TDX
change is quite out of place, but it's in here as "KVM: x86: Use kvzalloc()
to allocate VM struct" depends on both the TDX change and on dynamically
allocating the hashed list (KVM uses kvzalloc() purely because the 32KiB
for the list blows up the size of struct kvm).

The following changes since commit 28224ef02b56fceee2c161fe2a49a0bb197e44f5:

  KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities (2025-06-20 14:20:20 -0400)

are available in the Git repository at:

  https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-6.17

for you to fetch changes up to 9c4fe6d1509b386ab78f27dfaa2d128be77dc2d2:

  KVM: x86/mmu: Defer allocation of shadow MMU's hashed page list (2025-06-24 12:51:07 -0700)

----------------------------------------------------------------
KVM x86 MMU changes for 6.17

 - Exempt nested EPT from the the !USER + CR0.WP logic, as EPT doesn't interact
   with CR0.WP.

 - Move the TDX hardware setup code to tdx.c to better co-locate TDX code
   and eliminate a few global symbols.

 - Dynamically allocation the shadow MMU's hashed page list, and defer
   allocating the hashed list until it's actually needed (the TDP MMU doesn't
   use the list).

----------------------------------------------------------------
Sean Christopherson (5):
      KVM: x86/mmu: Exempt nested EPT page tables from !USER, CR0.WP=0 logic
      KVM: TDX: Move TDX hardware setup from main.c to tdx.c
      KVM: x86/mmu: Dynamically allocate shadow MMU's hashed page list
      KVM: x86: Use kvzalloc() to allocate VM struct
      KVM: x86/mmu: Defer allocation of shadow MMU's hashed page list

 arch/x86/include/asm/kvm_host.h |  6 ++--
 arch/x86/kvm/mmu/mmu.c          | 75 +++++++++++++++++++++++++++++++++++++----
 arch/x86/kvm/mmu/paging_tmpl.h  |  8 +++--
 arch/x86/kvm/svm/svm.c          |  2 ++
 arch/x86/kvm/vmx/main.c         | 36 ++------------------
 arch/x86/kvm/vmx/tdx.c          | 47 +++++++++++++++++++-------
 arch/x86/kvm/vmx/tdx.h          |  1 +
 arch/x86/kvm/vmx/vmx.c          |  2 ++
 arch/x86/kvm/vmx/x86_ops.h      | 10 ------
 arch/x86/kvm/x86.c              |  5 ++-
 arch/x86/kvm/x86.h              | 22 ++++++++++++
 11 files changed, 145 insertions(+), 69 deletions(-)

  parent reply	other threads:[~2025-07-25 22:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 22:07 [GIT PULL] KVM: x86: Changes " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: x86: Local APIC refactoring " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: Dirty Ring changes " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: Generic " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: IRQ " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: x86: Misc " Sean Christopherson
2025-07-28 15:11   ` Paolo Bonzini
2025-07-25 22:07 ` [GIT PULL] KVM: x86: MMIO State Data mitigation " Sean Christopherson
2025-07-25 22:07 ` Sean Christopherson [this message]
2025-07-25 22:07 ` [GIT PULL] KVM: Device assignment accounting " Sean Christopherson
2025-07-28 15:08   ` Paolo Bonzini
2025-07-25 22:07 ` [GIT PULL] KVM: x86: Selftests " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: x86: SEV " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2025-07-25 22:07 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
2025-07-28 15:47   ` Paolo Bonzini
2025-07-29 19:44     ` Sean Christopherson
2025-07-30 17:55       ` Paolo Bonzini
2025-07-28 15:50 ` [GIT PULL] KVM: x86: Changes " 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=20250725220713.264711-8-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@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 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®