aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvm-all.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index ef81ca532a..65608def36 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1047,6 +1047,14 @@ void kvm_irqchip_commit_routes(KVMState *s)
{
int ret;
+ if (kvm_gsi_direct_mapping()) {
+ return;
+ }
+
+ if (!kvm_gsi_routing_enabled()) {
+ return;
+ }
+
s->irq_routes->flags = 0;
trace_kvm_irqchip_commit_routes();
ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);