aboutsummaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2016-07-14 13:56:30 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-07-21 20:44:18 +0300
commitd1f6af6a17a66f58c238e1c26b928cf71c0c11da (patch)
tree5ba4a4d466df886dce2c0857ce92cfb3620ffbb9 /target-i386/kvm.c
parentede9c94acf6cd1968de4188c0228b714ab871a86 (diff)
kvm-irqchip: simplify kvm_irqchip_add_msi_route
Changing the original MSIMessage parameter in kvm_irqchip_add_msi_route into the vector number. Vector index provides more information than the MSIMessage, we can retrieve the MSIMessage using the vector easily. This will avoid fetching MSIMessage every time before adding MSI routes. Meanwhile, the vector info will be used in the coming patches to further enable gsi route update notifications. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 9c00e48952..f5745135f2 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -3202,8 +3202,7 @@ void kvm_arch_init_irq_routing(KVMState *s)
/* If the ioapic is in QEMU and the lapics are in KVM, reserve
MSI routes for signaling interrupts to the local apics. */
for (i = 0; i < IOAPIC_NUM_PINS; i++) {
- struct MSIMessage msg = { 0x0, 0x0 };
- if (kvm_irqchip_add_msi_route(s, msg, NULL) < 0) {
+ if (kvm_irqchip_add_msi_route(s, 0, NULL) < 0) {
error_report("Could not enable split IRQ mode.");
exit(1);
}