kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] KVM: TDX: MWAIT in guest
@ 2025-08-16 14:44 Adrian Hunter
  2025-08-16 14:44 ` [PATCH RFC 1/2] KVM: TDX: Disable general support for " Adrian Hunter
  2025-08-16 14:44 ` [PATCH RFC 2/2] KVM: TDX: Add flag to support MWAIT instruction only Adrian Hunter
  0 siblings, 2 replies; 13+ messages in thread
From: Adrian Hunter @ 2025-08-16 14:44 UTC (permalink / raw)
  To: pbonzini, seanjc
  Cc: kvm, rick.p.edgecombe, kirill.shutemov, kai.huang,
	reinette.chatre, xiaoyao.li, tony.lindgren, binbin.wu,
	isaku.yamahata, linux-kernel, yan.y.zhao, chao.gao, ira.weiny

Hi

TDX support for using the MWAIT instruction in a guest has issues.

One option is just to disable it, see patch 1.

Then perhaps provide a distinct way to enable it, documenting the
limitations TDX has compared with VMX in this regard, so that users
will be made aware of the limitations.  See patch 2.

Other options:
1. Do nothing but document the limitations.
2. Patch 1 but not patch 2; look for a better solution


Adrian Hunter (2):
      KVM: TDX: Disable general support for MWAIT in guest
      KVM: TDX: Add flag to support MWAIT instruction only

 Documentation/virt/kvm/x86/intel-tdx.rst | 28 ++++++++++-
 arch/x86/include/asm/kvm_host.h          |  2 +
 arch/x86/include/uapi/asm/kvm.h          |  3 ++
 arch/x86/kvm/vmx/tdx.c                   | 80 +++++++++++++++++++++++++-------
 arch/x86/kvm/x86.c                       |  8 ++--
 5 files changed, 98 insertions(+), 23 deletions(-)


Regards
Adrian

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

end of thread, other threads:[~2025-08-28 10:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 14:44 [PATCH RFC 0/2] KVM: TDX: MWAIT in guest Adrian Hunter
2025-08-16 14:44 ` [PATCH RFC 1/2] KVM: TDX: Disable general support for " Adrian Hunter
2025-08-18 14:05   ` Sean Christopherson
2025-08-18 15:07     ` Adrian Hunter
2025-08-18 18:49     ` Edgecombe, Rick P
2025-08-19  5:40       ` Binbin Wu
2025-08-19 15:59         ` Edgecombe, Rick P
2025-08-28 10:11           ` Binbin Wu
2025-08-19  7:38       ` Adrian Hunter
2025-08-19 15:07         ` Edgecombe, Rick P
2025-08-19 23:35           ` Sean Christopherson
2025-08-20  1:31             ` Xiaoyao Li
2025-08-16 14:44 ` [PATCH RFC 2/2] KVM: TDX: Add flag to support MWAIT instruction only Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).