mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Allow PCI passthrough to PV guest without IOMMU
Added a check which allows adding and removal of PCI devices for PV guests in the absence of an IOMMU. Signed-off-by: Mihir Nanavati <mihirn@cs.ubc.ca> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
1 parent
a543f084db
commit
0e05a47ca4
1 file changed
+2
-2
@@ -416,7 +416,7 @@ static int do_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
|
||||
out:
|
||||
if (!libxl_is_stubdom(ctx, domid, NULL)) {
|
||||
rc = xc_assign_device(ctx->xch, domid, pcidev->value);
|
||||
if (rc < 0) {
|
||||
if (rc < 0 && (hvm || errno != ENOSYS)) {
|
||||
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_assign_device failed");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
@@ -541,7 +541,7 @@ out:
|
||||
|
||||
if (!libxl_is_stubdom(ctx, domid, NULL)) {
|
||||
rc = xc_deassign_device(ctx->xch, domid, pcidev->value);
|
||||
if (rc < 0)
|
||||
if (rc < 0 && (hvm || errno != ENOSYS))
|
||||
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_deassign_device failed");
|
||||
}
|
||||
|
||||
|
||||