monitor: Use accel_find("kvm") instead of kvm_available()
The kvm_available() function reports whether KVM support was compiled into the QEMU binary; it returns the value of the CONFIG_KVM define. The only place in the codebase where we use this function is in qmp_query_kvm(). Now that accelerators are based on QOM classes we can instead use accel_find("kvm") and remove the kvm_available() function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210730105947.28215-3-peter.maydell@linaro.org
This commit is contained in:
parent
6773fbf8c0
commit
4f9205be45
@ -29,8 +29,6 @@ enum {
|
||||
|
||||
extern const uint32_t arch_type;
|
||||
|
||||
int kvm_available(void);
|
||||
|
||||
/* default virtio transport per architecture */
|
||||
#define QEMU_ARCH_VIRTIO_PCI (QEMU_ARCH_ALPHA | QEMU_ARCH_ARM | \
|
||||
QEMU_ARCH_HPPA | QEMU_ARCH_I386 | \
|
||||
|
@ -58,7 +58,7 @@ KvmInfo *qmp_query_kvm(Error **errp)
|
||||
KvmInfo *info = g_malloc0(sizeof(*info));
|
||||
|
||||
info->enabled = kvm_enabled();
|
||||
info->present = kvm_available();
|
||||
info->present = accel_find("kvm");
|
||||
|
||||
return info;
|
||||
}
|
||||
|
@ -87,12 +87,3 @@ int graphic_depth = 32;
|
||||
#endif
|
||||
|
||||
const uint32_t arch_type = QEMU_ARCH;
|
||||
|
||||
int kvm_available(void)
|
||||
{
|
||||
#ifdef CONFIG_KVM
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user