mirror-linux/Documentation/virt/kvm
Binbin Wu 25e8b1dd48 KVM: TDX: Exit to userspace for GetTdVmCallInfo
Exit to userspace for TDG.VP.VMCALL<GetTdVmCallInfo> via KVM_EXIT_TDX,
to allow userspace to provide information about the support of
TDVMCALLs when r12 is 1 for the TDVMCALLs beyond the GHCI base API.

GHCI spec defines the GHCI base TDVMCALLs: <GetTdVmCallInfo>, <MapGPA>,
<ReportFatalError>, <Instruction.CPUID>, <#VE.RequestMMIO>,
<Instruction.HLT>, <Instruction.IO>, <Instruction.RDMSR> and
<Instruction.WRMSR>. They must be supported by VMM to support TDX guests.

For GetTdVmCallInfo
- When leaf (r12) to enumerate TDVMCALL functionality is set to 0,
  successful execution indicates all GHCI base TDVMCALLs listed above are
  supported.

  Update the KVM TDX document with the set of the GHCI base APIs.

- When leaf (r12) to enumerate TDVMCALL functionality is set to 1, it
  indicates the TDX guest is querying the supported TDVMCALLs beyond
  the GHCI base TDVMCALLs.
  Exit to userspace to let userspace set the TDVMCALL sub-function bit(s)
  accordingly to the leaf outputs.  KVM could set the TDVMCALL bit(s)
  supported by itself when the TDVMCALLs don't need support from userspace
  after returning from userspace and before entering guest. Currently, no
  such TDVMCALLs implemented, KVM just sets the values returned from
  userspace.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com>
[Adjust userspace API. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-20 13:55:47 -04:00
..
arm KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 2025-02-26 13:30:36 -08:00
devices KVM: arm64: Allow userspace to limit the number of PMU counters for EL2 VMs 2025-04-11 13:08:23 +01:00
loongarch Loongarch: KVM: Add KVM hypercalls documentation for LoongArch 2024-09-05 14:30:35 -06:00
s390 Documentation: s390-diag.rst: Document diag500(STORAGE LIMIT) subfunction 2024-11-07 10:26:24 +01:00
x86 Documentation: virt/kvm: remove unreferenced footnote 2025-05-26 16:12:01 -04:00
api.rst KVM: TDX: Exit to userspace for GetTdVmCallInfo 2025-06-20 13:55:47 -04:00
halt-polling.rst KVM: Update halt polling documentation to note that KVM has 4 module params 2024-06-03 08:51:51 -07:00
index.rst Loongarch: KVM: Add KVM hypercalls documentation for LoongArch 2024-09-05 14:30:35 -06:00
locking.rst KVM: x86/mmu: Don't force atomic update if only the Accessed bit is volatile 2025-02-14 07:16:45 -08:00
ppc-pv.rst Documentation: KVM: make corrections to ppc-pv.rst 2023-06-16 08:20:53 -06:00
review-checklist.rst
vcpu-requests.rst Documentation: KVM: make corrections to vcpu-requests.rst 2023-06-16 08:20:53 -06:00