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

[Xen-changelog] [xen-unstable] libxl: do not ignore the per-device msitranslate and power_mgmt opts


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 04 Jul 2012 04:11:10 +0000
  • Delivery-date: Wed, 04 Jul 2012 04:11:18 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1340894759 -3600
# Node ID 1b125c4c0f8681d5e55fd7139ff576bdcbc2f111
# Parent  f347d62595011cd6b8baece7bc2a0e4d1d875b14
libxl: do not ignore the per-device msitranslate and power_mgmt opts

Do not ignore the per-device msitranslate and power_mgmt options: they
need to be appended to the bdf.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r f347d6259501 -r 1b125c4c0f86 tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Thu Jun 28 15:44:02 2012 +0100
+++ b/tools/libxl/libxl_pci.c   Thu Jun 28 15:45:59 2012 +0100
@@ -21,6 +21,7 @@
 #define PCI_BDF                "%04x:%02x:%02x.%01x"
 #define PCI_BDF_SHORT          "%02x:%02x.%01x"
 #define PCI_BDF_VDEVFN         "%04x:%02x:%02x.%01x@%02x"
+#define PCI_OPTIONS            "msitranslate=%d,power_mgmt=%d"
 #define PCI_BDF_XSPATH         "%04x-%02x-%02x-%01x"
 
 static unsigned int pcidev_encode_bdf(libxl_device_pci *pcidev)
@@ -814,12 +815,14 @@ static int qemu_pci_add_xenstore(libxl__
     path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/parameter",
                           domid);
     if (pcidev->vdevfn) {
-        libxl__xs_write(gc, XBT_NULL, path, PCI_BDF_VDEVFN,
+        libxl__xs_write(gc, XBT_NULL, path, PCI_BDF_VDEVFN","PCI_OPTIONS,
                         pcidev->domain, pcidev->bus, pcidev->dev,
-                        pcidev->func, pcidev->vdevfn);
+                        pcidev->func, pcidev->vdevfn, pcidev->msitranslate,
+                        pcidev->power_mgmt);
     } else {
-        libxl__xs_write(gc, XBT_NULL, path, PCI_BDF, pcidev->domain,
-                        pcidev->bus, pcidev->dev, pcidev->func);
+        libxl__xs_write(gc, XBT_NULL, path, PCI_BDF","PCI_OPTIONS,
+                        pcidev->domain,  pcidev->bus, pcidev->dev,
+                        pcidev->func, pcidev->msitranslate, 
pcidev->power_mgmt);
     }
 
     libxl__qemu_traditional_cmd(gc, domid, "pci-ins");

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.