Files
qemu/hw
Xiaoyao Li edafba3921 target/i386: Implement mc->kvm_type() to get VM type
TDX VM requires VM type KVM_X86_TDX_VM to be passed to
kvm_ioctl(KVM_CREATE_VM). Hence implement mc->kvm_type() for i386
architecture.

If tdx-guest object is specified to confidential-guest-support, like,

  qemu -machine ...,confidential-guest-support=tdx0 \
       -object tdx-guest,id=tdx0,...

it parses VM type as KVM_X86_TDX_VM. Otherwise, it's KVM_X86_DEFAULT_VM.

Also store the vm_type in MachineState for other code to query what the
VM type is.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
---
Changes in v4:
 - fix the build error of kvm_get_vm_type() when --disable-kvm;
2024-07-25 12:03:11 +02:00
..
2023-10-20 08:51:41 +02:00
2023-09-21 11:31:16 +03:00
2024-06-20 10:04:36 +03:00
2024-03-13 21:52:34 +03:00
2023-11-10 18:19:13 +01:00
2023-09-21 11:31:16 +03:00
2023-09-20 07:54:34 +03:00
2024-05-02 13:03:01 +03:00