All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: tooling expects wrong errno
@ 2020-06-14 16:17 Grzegorz Uriasz
  2020-06-15 14:59 ` Ian Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Grzegorz Uriasz @ 2020-06-14 16:17 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, jakub, Ian Jackson, marmarek, Grzegorz Uriasz, j.nowak26,
	Anthony PERARD, contact

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@gmail.com>
Tested-by: Grzegorz Uriasz <gorbak25@gmail.com>
---
 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;
         }
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-26 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-14 16:17 [PATCH] libxl: tooling expects wrong errno Grzegorz Uriasz
2020-06-15 14:59 ` Ian Jackson
2020-06-15 15:56   ` Roger Pau Monné
2020-06-15 16:04     ` Paul Durrant
2020-06-15 16:37     ` Ian Jackson
2020-06-15 17:11       ` Paul Durrant
2020-06-15 17:39         ` Ian Jackson
2020-06-26 11:25           ` Wei Liu
2020-06-26 11:28             ` Paul Durrant

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.