Subject: [PATCH] fix wrong return value of verify_irqchip_in_kernel()
This was introduced by a recent change of adding return value to
function verify_irqchip_in_kernel(), VMs with legacy PCI pass-though
device attached will fail after upgrade QEMU from 2.8 to 2.10. Return 0
when verification is OK.
---
hw/i386/kvm/pci-assign.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index 33e20cb3e8..13f8b7aac0 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -827,10 +827,10 @@ static void assign_device(AssignedDevice *dev, Error **errp)
static int verify_irqchip_in_kernel(Error **errp)
{
if (kvm_irqchip_in_kernel()) {
- return -1;
+ return 0;
}
error_setg(errp, "pci-assign requires KVM with in-kernel irqchip enabled");
- return 0;
+ return -1;
}
static int assign_intx(AssignedDevice *dev, Error **errp)
--
2.15.1