All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] KVM: VMX: Explicitly track TDX VMs' root level
@ 2026-09-02 23:09 Sean Christopherson
  2026-09-02 23:09 ` [PATCH v3 1/3] KVM: x86/mmu: Use KVM's max TDP level to determine need for 32-bit TDP root Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Sean Christopherson @ 2026-09-02 23:09 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Rick Edgecombe, Xiaoyao Li, Kai Huang,
	Yan Zhao, Binbin Wu

Fix a bug where a misbehaving (or niave?) userspace can configure guest CPUID
such that KVM will use the "wrong" root level for its mirror EPTs and trip the
KVM_BUG_ON() in tdx_load_mmu_pgd().

v3:
 - Use kvm_mmu_get_max_tdp_level() in __kvm_mmu_create() to avoid what is
   effectively a false positive WARN. [Sashiko]

v2:
 - https://lore.kernel.org/all/20260826215258.937210-1-seanjc@google.com
 - Rewrite the comment in kvm_mmu_get_tdp_level(). [Rick]
 - Check for kvm_has_mirrored_tdp() in kvm_mmu_get_tdp_level(), and yell if
   arch.mirror_root_level isn't also set. [Rick]
 - Separate the removal of TDX_SHARED_BIT_PWL_{4,5} from the bug fix. [Rick]
 - Fix a buring => buried typo. [Binbin]
 - Collect Tested/Reviewed-by. [Binbin, Rick, Yan] (I applied 'em only to
   patch 1, please  holler if that doesn't seem right).

v1: https://lore.kernel.org/all/20260814224509.2342760-1-seanjc@google.com

Sean Christopherson (3):
  KVM: x86/mmu: Use KVM's max TDP level to determine need for 32-bit TDP
    root
  KVM: VMX: Explicitly track TDX VMs' root level instead of guessing it
    from CPUID
  KVM: VMX: Drop TDX_SHARED_BIT_PWL_{4,5} and dedup related code

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/kvm/cpuid.c            | 14 --------------
 arch/x86/kvm/cpuid.h            |  1 -
 arch/x86/kvm/mmu/mmu.c          | 21 ++++++++++++---------
 arch/x86/kvm/vmx/tdx.c          | 20 +++++++++++---------
 5 files changed, 24 insertions(+), 33 deletions(-)


base-commit: 76671054f9a1ff6abb976583cd8da37650acdc97
-- 
2.55.0.970.g62bdec98f9-goog


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-09-21 14:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 23:09 [PATCH v3 0/3] KVM: VMX: Explicitly track TDX VMs' root level Sean Christopherson
2026-09-02 23:09 ` [PATCH v3 1/3] KVM: x86/mmu: Use KVM's max TDP level to determine need for 32-bit TDP root Sean Christopherson
2026-09-09 14:08   ` Xiaoyao Li
2026-09-14  9:02   ` Yan Zhao
2026-09-17  0:12     ` Sean Christopherson
2026-09-02 23:09 ` [PATCH v3 2/3] KVM: VMX: Explicitly track TDX VMs' root level instead of guessing it from CPUID Sean Christopherson
2026-09-09 14:16   ` Xiaoyao Li
2026-09-02 23:09 ` [PATCH v3 3/3] KVM: VMX: Drop TDX_SHARED_BIT_PWL_{4,5} and dedup related code Sean Christopherson
2026-09-09 14:18   ` Xiaoyao Li
2026-09-14  9:05   ` Yan Zhao
2026-09-21 14:05 ` [PATCH v3 0/3] KVM: VMX: Explicitly track TDX VMs' root level Sean Christopherson

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.