aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-22 16:19:20 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-10-14 15:28:54 -0400
commit1a6dff5fa84118aace4d85d3544a9902ff01e0f3 (patch)
treee858b5574b6c8a45bffe3f913a833e2546a24a2c /target
parent35ac5dfbcaa4b31470b4e201d26143b8b9a0a1e7 (diff)
downloadqemu-arm-1a6dff5fa84118aace4d85d3544a9902ff01e0f3.tar.gz
i386/kvm: Require KVM_CAP_IRQ_ROUTING
KVM_CAP_IRQ_ROUTING is available since 2009 (Linux v2.6.30), so it's safe to just make it a requirement on x86. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200922201922.2153598-2-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 0098be7015..69c691ad77 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2114,6 +2114,11 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
int ret;
struct utsname utsname;
+ if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) {
+ error_report("kvm: KVM_CAP_IRQ_ROUTING not supported by KVM");
+ return -ENOTSUP;
+ }
+
has_xsave = kvm_check_extension(s, KVM_CAP_XSAVE);
has_xcrs = kvm_check_extension(s, KVM_CAP_XCRS);
has_pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2);