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)" <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Gleb Natapov <[email protected]>
This commit is contained in:
Michael S. Tsirkin authored and Paolo Bonzini committed 2013-07-03 10:38:20 +02:00
1 parent 0fbc207403
commit 40509f7f52
1 file changed
+4
+4
View File
@@ -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);