public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Drop "KVM: TDX: Handle TDG.VP.VMCALL<GetTdVmCallInfo> hypercall"
@ 2025-04-16  3:12 Edgecombe, Rick P
  2025-04-18 13:24 ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Edgecombe, Rick P @ 2025-04-16  3:12 UTC (permalink / raw)
  To: pbonzini@redhat.com, seanjc@google.com
  Cc: Li, Xiaoyao, kvm@vger.kernel.org, Wu, Binbin

Hi,

We should consider dropping/reverting "KVM: TDX: Handle
TDG.VP.VMCALL<GetTdVmCallInfo> hypercall" from the base TDX merge. The reason is
because Xiaoyao noticed that the GHCI spec[0] implies that KVM should only
return success for that TDVMCALL if *all* TDVMCALLs are supported, but KVM does
that despite skipping implementing a few. On investigation there are also no
users except its selftest[1], and the spec is ambiguous on the right way to
handle the case in question.

The spec talks about VMMs not supporting all TDVMCALLs, but doesn't say how to
enumerate this (i.e. it doesn't says what the GetTdVmCallInfo VMMs should do
instead of succeed). It actually doesn't cover how to handle if the guest calls
an unsupported TDVMCALL either. Historically, KVM patches have returned
TDVMCALL_STATUS_INVALID_OPERAND for any unknown TDVMCALL, as a reasonable
interpretation of the ambiguous spec. So the spec needs to get clarified in this
whole area.

Since there are no real callers let's just drop GetTdVmCallInfo for now. We can
add it back when the GHCI folks amend the spec to close the ambiguities. As a
bonus we can save some code for the merge.

We dropped the patch internally and did some testing. Also, Binbin and I
searched the guest code for any rare callers. Everything seems fine to drop it.

If we want to leave it in, it's probably not a disaster. We'll just slightly
diverge from the spec. It may not be a problem depending on how the ambiguity
resolves in future spec updates.

Thanks,

Rick

[0]
https://www.intel.com/content/www/us/en/content-details/726790/guest-host-communication-interface-ghci-for-intel-trust-domain-extensions-intel-tdx.html
[1]
https://lore.kernel.org/kvm/20250414214801.2693294-14-sagis@google.com/

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

end of thread, other threads:[~2025-04-24 12:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  3:12 Drop "KVM: TDX: Handle TDG.VP.VMCALL<GetTdVmCallInfo> hypercall" Edgecombe, Rick P
2025-04-18 13:24 ` Paolo Bonzini
2025-04-18 22:16   ` Edgecombe, Rick P
2025-04-23 14:09     ` Paolo Bonzini
2025-04-24  6:51       ` Shutemov, Kirill
2025-04-24 12:19         ` Paolo Bonzini
2025-04-24  9:18       ` Binbin Wu

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