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

[xen master] libxl: tooling expects wrong errno



commit ed69c2ecaf3a6745b7c5a10cf2482e3c49cb8c4f
Author:     Grzegorz Uriasz <gorbak25@xxxxxxxxx>
AuthorDate: Sun Jun 14 16:17:08 2020 +0000
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Fri Jun 26 11:56:31 2020 +0000

    libxl: tooling expects wrong errno
    
    When iommu is not enabled for a given domain then pci passthrough
    hypercalls such as xc_test_assign_device return EOPNOTSUPP.
    The code responsible for this is in "iommu_do_domctl" inside
    xen/drivers/passthrough/iommu.c
    This patch fixes the error message reported by libxl when assigning
    pci devices to domains without iommu.
    
    Signed-off-by: Grzegorz Uriasz <gorbak25@xxxxxxxxx>
    Tested-by: Grzegorz Uriasz <gorbak25@xxxxxxxxx>
    Backport: 4.13
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Release-acked-by: Paul Durrant <paul@xxxxxxx>
---
 tools/libxl/libxl_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 957ff5c8e9..bc5843b137 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1561,7 +1561,7 @@ void libxl__device_pci_add(libxl__egc *egc, uint32_t 
domid,
             LOGD(ERROR, domid,
                  "PCI device %04x:%02x:%02x.%u %s?",
                  pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func,
-                 errno == ENOSYS ? "cannot be assigned - no IOMMU"
+                 errno == EOPNOTSUPP ? "cannot be assigned - no IOMMU"
                  : "already assigned to a different guest");
             goto out;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.