debuggers.hg

changeset 21951:6b9e44cf2651

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>
author Mihir Nanavati <mihirn@cs.ubc.ca>
date Tue Aug 03 17:14:06 2010 +0100 (2010-08-03)
parents 6a0dd2c29999
children 266df0bf4a0d
files tools/libxl/libxl_pci.c
line diff
     1.1 --- a/tools/libxl/libxl_pci.c	Fri Jul 30 16:20:48 2010 +0100
     1.2 +++ b/tools/libxl/libxl_pci.c	Tue Aug 03 17:14:06 2010 +0100
     1.3 @@ -416,7 +416,7 @@ static int do_pci_add(libxl_ctx *ctx, ui
     1.4  out:
     1.5      if (!libxl_is_stubdom(ctx, domid, NULL)) {
     1.6          rc = xc_assign_device(ctx->xch, domid, pcidev->value);
     1.7 -        if (rc < 0) {
     1.8 +        if (rc < 0 && (hvm || errno != ENOSYS)) {
     1.9              XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_assign_device failed");
    1.10              return ERROR_FAIL;
    1.11          }
    1.12 @@ -541,7 +541,7 @@ out:
    1.13  
    1.14      if (!libxl_is_stubdom(ctx, domid, NULL)) {
    1.15          rc = xc_deassign_device(ctx->xch, domid, pcidev->value);
    1.16 -        if (rc < 0)
    1.17 +        if (rc < 0 && (hvm || errno != ENOSYS))
    1.18              XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_deassign_device failed");
    1.19      }
    1.20