OSDN Git Service

kvm: Introduce kvm_arch_get_default_type hook
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 22 Aug 2023 16:31:02 +0000 (17:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Aug 2023 16:31:02 +0000 (17:31 +0100)
commit5e0d65909c6f335d578b90491e165440c99adf81
treeea45e942a7cfc3dee65dca867c443a7436014d19
parenta9c9bbee855877293683012942d3485d50f286af
kvm: Introduce kvm_arch_get_default_type hook

kvm_arch_get_default_type() returns the default KVM type. This hook is
particularly useful to derive a KVM type that is valid for "none"
machine model, which is used by libvirt to probe the availability of
KVM.

For MIPS, the existing mips_kvm_type() is reused. This function ensures
the availability of VZ which is mandatory to use KVM on the current
QEMU.

Cc: qemu-stable@nongnu.org
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-id: 20230727073134.134102-2-akihiko.odaki@daynix.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: added doc comment for new function]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
accel/kvm/kvm-all.c
hw/mips/loongson3_virt.c
include/sysemu/kvm.h
target/arm/kvm.c
target/i386/kvm/kvm.c
target/mips/kvm.c
target/mips/kvm_mips.h
target/ppc/kvm.c
target/riscv/kvm.c
target/s390x/kvm/kvm.c