]> git.ipfire.org Git - thirdparty/qemu.git/commit
s390x: adapter routes error handling
authorCornelia Huck <cohuck@redhat.com>
Thu, 16 Jan 2020 12:10:35 +0000 (13:10 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 22 Jun 2020 17:48:41 +0000 (12:48 -0500)
commitbc509b2a5baedb7112afba4dd2ad5f1f67f300a9
tree0c4b282ee75f6e5544c79a48eb98bff30cb5bbc0
parentcd8ecfb19cbbdd13f2b2e210c88485bf5f15c51c
s390x: adapter routes error handling

If the kernel irqchip has been disabled, we don't want the
{add,release}_adapter_routes routines to call any kvm_irqchip_*
interfaces, as they may rely on an irqchip actually having been
created. Just take a quick exit in that case instead. If you are
trying to use irqfd without a kernel irqchip, we will fail with
an error.

Also initialize routes->gsi[] with -1 in the virtio-ccw handling,
to make sure we don't trip over other errors, either. (Nobody
else uses the gsi array in that structure.)

Fixes: d426d9fba8ea ("s390x/virtio-ccw: wire up irq routing and irqfds")
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20200117111147.5006-1-cohuck@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 3c5fd8074335c67777d9391b84f97070c35d9c63)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/intc/s390_flic_kvm.c
hw/s390x/virtio-ccw.c