public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] KVM: TDX: TD vcpu enter/exit
@ 2025-03-07 21:20 Paolo Bonzini
  2025-03-07 21:20 ` [PATCH v3 01/10] x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest Paolo Bonzini
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Paolo Bonzini @ 2025-03-07 21:20 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: xiaoyao.li, adrian.hunter, seanjc, rick.p.edgecombe

The changes from v2 here mostly come from Xiaoyao's review, with which
I mostly agreed:

- moving the preparation for user return notifiers to prepare_switch_to_host,

- squashing "x86/virt/tdx: Make tdh_vp_enter() noinstr" into patch 1

- dropping "KVM: TDX: Set arch.has_protected_state
  to true" which is now part of one of the earlier series.

- replacing TDX_REGS_UNSUPPORTED_SET with the strict list of registers
  that (at least potentially) are made available in unencrypted form

The major change however is rewriting "KVM: TDX: restore host xsave
state when exit from the guest TD" to not use kvm_load_host_xsave_state().
There's a disagreement between me and Sean on that topic, but posting
the patches is the best way to clear that up.  Also for this reason I'm
including an extra patch at the end providing the hunks that were (or
should be) only needed in order to appease kvm_load_host_xsave_state();
I have tested without it and unlike the rest it is not included in kvm-coco-queue.

Paolo

Adrian Hunter (2):
  KVM: TDX: Disable support for TSX and WAITPKG
  KVM: TDX: Save and restore IA32_DEBUGCTL

Binbin Wu (1):
  KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a struct

Chao Gao (1):
  KVM: x86: Allow to update cached values in kvm_user_return_msrs w/o
    wrmsr

Isaku Yamahata (5):
  KVM: TDX: Implement TDX vcpu enter/exit path
  KVM: TDX: vcpu_run: save/restore host state(host kernel gs)
  KVM: TDX: restore host xsave state when exit from the guest TD
  KVM: TDX: restore user ret MSRs
  KVM: x86: Add a switch_db_regs flag to handle TDX's auto-switched
    behavior

Kai Huang (1):
  x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest

Paolo Bonzini (1):
  [NOT FOR UPSTREAM] KVM: TDX: put somewhat sensible values in vCPU for
    encrypted registers

 arch/x86/include/asm/kvm_host.h  |  12 +-
 arch/x86/include/asm/tdx.h       |   1 +
 arch/x86/kvm/vmx/common.h        |  68 ++++++++++
 arch/x86/kvm/vmx/main.c          |  48 ++++++-
 arch/x86/kvm/vmx/nested.c        |  10 +-
 arch/x86/kvm/vmx/posted_intr.c   |  18 +--
 arch/x86/kvm/vmx/tdx.c           | 264 ++++++++++++++++++++++++++++++++++++++-
 arch/x86/kvm/vmx/tdx.h           |  20 ++-
 arch/x86/kvm/vmx/vmx.c           |  99 +++++++--------
 arch/x86/kvm/vmx/vmx.h           | 104 ++++++---------
 arch/x86/kvm/vmx/x86_ops.h       |  11 ++
 arch/x86/kvm/x86.c               |  28 ++++-
 arch/x86/virt/vmx/tdx/seamcall.S |   3 +
 arch/x86/virt/vmx/tdx/tdx.c      |   8 ++
 arch/x86/virt/vmx/tdx/tdx.h      |   1 +
 15 files changed, 541 insertions(+), 154 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2025-03-13 18:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 21:20 [PATCH v3 00/10] KVM: TDX: TD vcpu enter/exit Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 01/10] x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 02/10] KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a struct Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 03/10] KVM: TDX: Implement TDX vcpu enter/exit path Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 04/10] KVM: TDX: vcpu_run: save/restore host state(host kernel gs) Paolo Bonzini
2025-03-10  7:13   ` Xiaoyao Li
2025-03-07 21:20 ` [PATCH v3 05/10] KVM: TDX: restore host xsave state when exit from the guest TD Paolo Bonzini
2025-03-10  7:24   ` Xiaoyao Li
2025-03-12 11:36     ` Paolo Bonzini
2025-03-13  3:17       ` Xiaoyao Li
2025-03-13 18:17         ` Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 06/10] KVM: x86: Allow to update cached values in kvm_user_return_msrs w/o wrmsr Paolo Bonzini
2025-03-10  7:25   ` Xiaoyao Li
2025-03-07 21:20 ` [PATCH v3 07/10] KVM: TDX: restore user ret MSRs Paolo Bonzini
2025-03-10  7:25   ` Xiaoyao Li
2025-03-07 21:20 ` [PATCH v3 08/10] KVM: TDX: Disable support for TSX and WAITPKG Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 09/10] KVM: TDX: Save and restore IA32_DEBUGCTL Paolo Bonzini
2025-03-10  7:28   ` Xiaoyao Li
2025-03-07 21:20 ` [PATCH v3 10/10] KVM: x86: Add a switch_db_regs flag to handle TDX's auto-switched behavior Paolo Bonzini
2025-03-07 21:20 ` [PATCH v3 11/10] [NOT TO COMMIT] KVM: TDX: put somewhat sensible values in vCPU for encrypted registers Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox