From 7d0a07fa926436baf1238dcf68a55ea96cf5b9ab Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 14 Jul 2014 19:15:15 +0200 Subject: KVM: Add helper to run KVM_CHECK_EXTENSION on vm fd We now can call KVM_CHECK_EXTENSION on the kvm fd or on the vm fd, whereas the vm version is more accurate when it comes to PPC KVM. Add a helper to make the vm version available that falls back to the non-vm variant if the vm one is not available yet to stay compatible. Signed-off-by: Alexander Graf --- include/sysemu/kvm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sysemu') diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 174ea36afa..d2000af9c3 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -303,6 +303,8 @@ bool kvm_arch_stop_on_emulation_error(CPUState *cpu); int kvm_check_extension(KVMState *s, unsigned int extension); +int kvm_vm_check_extension(KVMState *s, unsigned int extension); + #define kvm_vm_enable_cap(s, capability, cap_flags, ...) \ ({ \ struct kvm_enable_cap cap = { \ -- cgit v1.2.3