From 40509f7f52672fe41c2cce895e187352fc09f53a Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 4 Jun 2013 14:52:35 +0300 Subject: 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)" Signed-off-by: Michael S. Tsirkin Signed-off-by: Gleb Natapov --- kvm-all.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kvm-all.c') 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); -- cgit v1.2.1