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

[Xen-changelog] [xen-unstable] Allow PCI passthrough to PV guest without IOMMU



# HG changeset patch
# User Mihir Nanavati <mihirn@xxxxxxxxx>
# Date 1280852046 -3600
# Node ID 6b9e44cf2651bbecdc03e291fde1ac0dc4bf9263
# Parent  6a0dd2c29999caba75717c7a2472096e34149a0b
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@xxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 6a0dd2c29999 -r 6b9e44cf2651 tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Fri Jul 30 16:20:48 2010 +0100
+++ b/tools/libxl/libxl_pci.c   Tue Aug 03 17:14:06 2010 +0100
@@ -416,7 +416,7 @@ out:
 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");
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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