Files
qemu/include/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-18 10:10:49 +02:00
2023-01-08 01:54:22 -05:00
2023-11-07 13:08:49 +01:00
2023-09-08 13:08:52 +03:00
2023-09-08 13:08:52 +03:00
2023-01-08 01:54:22 -05:00
2023-09-08 13:08:52 +03:00
2020-09-09 09:27:09 -04:00
2023-03-20 12:43:50 +01:00
2020-09-09 09:27:09 -04:00
2022-11-08 11:13:48 +01:00
2020-09-09 09:27:09 -04:00