aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLongpeng(Mike) <longpeng2@huawei.com>2022-02-22 22:11:16 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-03-15 11:26:20 +0100
commitdef4c5570c44cc775c47e6d8503e4d12868f53aa (patch)
treeb880ea2ed1c6c7e15a9ccb020f083806ed65e63d /include
parent9568690868e2bcd8e35e449ac5013ca1d08968ac (diff)
downloadqemu-def4c5570c44cc775c47e6d8503e4d12868f53aa.zip
qemu-def4c5570c44cc775c47e6d8503e4d12868f53aa.tar.gz
qemu-def4c5570c44cc775c47e6d8503e4d12868f53aa.tar.bz2
kvm/msi: do explicit commit when adding msi routes
We invoke the kvm_irqchip_commit_routes() for each addition to MSI route table, which is not efficient if we are adding lots of routes in some cases. This patch lets callers invoke the kvm_irqchip_commit_routes(), so the callers can decide how to optimize. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg00967.html Signed-off-by: Longpeng <longpeng2@huawei.com> Message-Id: <20220222141116.2091-3-longpeng2@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/kvm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 62772b5..a783c78 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -486,7 +486,7 @@ void kvm_init_cpu_signals(CPUState *cpu);
/**
* kvm_irqchip_add_msi_route - Add MSI route for specific vector
- * @s: KVM state
+ * @c: KVMRouteChange instance.
* @vector: which vector to add. This can be either MSI/MSIX
* vector. The function will automatically detect whether
* MSI/MSIX is enabled, and fetch corresponding MSI
@@ -495,7 +495,7 @@ void kvm_init_cpu_signals(CPUState *cpu);
* as @NULL, an empty MSI message will be inited.
* @return: virq (>=0) when success, errno (<0) when failed.
*/
-int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev);
+int kvm_irqchip_add_msi_route(KVMRouteChange *c, int vector, PCIDevice *dev);
int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg,
PCIDevice *dev);
void kvm_irqchip_commit_routes(KVMState *s);