]> git.proxmox.com Git - mirror_qemu.git/commit - kvm-all.c
kvm-irqchip: only commit route when irqchip is used
authorPeter Xu <peterx@redhat.com>
Wed, 3 Aug 2016 03:07:21 +0000 (11:07 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 3 Aug 2016 03:25:44 +0000 (13:25 +1000)
commit7005f7f81cef31bda895d3274c13854c143d3d8d
treef5ac83a5d49e352342593dd355a5cd0f9bc93bd5
parentc8721d35994fd3731e592f81ba2f9c08e7dc8c31
kvm-irqchip: only commit route when irqchip is used

Reported from Alexey Kardashevskiy:

3f1fea0fb5bf "kvm-irqchip: do explicit commit when update irq" produces
a crash on pseries guest running with VFIO on POWER8 machine as it does
not support KVM_CAP_IRQCHIP (KVM_CAP_IRQ_XICS is there instead). At the
result, KVMState::irq_routes is NULL when VFIO calls
kvm_irqchip_commit_routes.

This makes the routing update conditional.

Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
kvm-all.c