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:
Mihir Nanavati committed 2010-08-03 17:14:06 +01:00
1 parent a543f084db
commit 0e05a47ca4
1 file changed
+2 -2
+2 -2
View File
@@ -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");
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.