qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH] fix wrong return value of verify_irqchip_in_ke


From: Talons Lee
Subject: Re: [Qemu-stable] [PATCH] fix wrong return value of verify_irqchip_in_kernel()
Date: Tue, 5 Dec 2017 15:56:40 +0800

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.

Signed-off-by: Talons Lee <address@hidden>
---
 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



On Tue, Dec 5, 2017 at 2:20 PM, Talons Lee <address@hidden> wrote:
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.

Signed-off-by: Talons Lee <address@hidden>

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)


Attachment: fix_return_verify_irqchip_in_kernel.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]