aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-06-04 14:52:35 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-03 10:38:20 +0200
commit40509f7f52672fe41c2cce895e187352fc09f53a (patch)
treee031437f9c3136e81c1656f613162aecc66e9c2d /kvm-all.c
parent0fbc20740342713f282b118b4a446c4c43df3f4a (diff)
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: "Zhanghaoyu (A)" <haoyu.zhang@huawei.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 745b5017a1..3ee0ac7e7b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -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);