From bfe41c8f65bd2c6b4285a80047d593dea99a743f Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 22 Aug 2023 17:31:02 +0100 Subject: kvm: Introduce kvm_arch_get_default_type hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-id: 20230727073134.134102-2-akihiko.odaki@daynix.com Reviewed-by: Peter Maydell [PMM: added doc comment for new function] Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé (cherry picked from commit 5e0d65909c6f335d578b90491e165440c99adf81) Signed-off-by: Michael Tokarev --- target/ppc/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target/ppc') diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 7c25348b7b..4bcda6e2dc 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -108,6 +108,11 @@ static int kvm_ppc_register_host_cpu_type(void); static void kvmppc_get_cpu_characteristics(KVMState *s); static int kvmppc_get_dec_bits(void); +int kvm_arch_get_default_type(MachineState *ms) +{ + return 0; +} + int kvm_arch_init(MachineState *ms, KVMState *s) { cap_interrupt_unset = kvm_check_extension(s, KVM_CAP_PPC_UNSET_IRQ); -- cgit v1.2.3