Commit 40509f7f authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Paolo Bonzini
Browse files

kvm: skip system call when msi route is unchanged



Some guests do a large number of mask/unmask
calls which currently trigger expensive route update
system calls.
Detect that route in unchanged and skip the system call.

Reported-by: default avatar"Zhanghaoyu (A)" <haoyu.zhang@huawei.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
parent 0fbc2074
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1034,6 +1034,10 @@ static int kvm_update_routing_entry(KVMState *s,
            continue;
        }

        if(!memcmp(entry, new_entry, sizeof *entry)) {
            return 0;
        }

        *entry = *new_entry;

        kvm_irqchip_commit_routes(s);