aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_pci.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-06-28 15:45:59 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-06-28 15:45:59 +0100
commitc9782bae2b97aa39d792c56d308b239ead204c44 (patch)
treebccbf11a8df29e45464c87e3c0ea707cb3a8cd81 /tools/libxl/libxl_pci.c
parentbcf2222520ff16e76153eb855da3c4c6627ec8fd (diff)
downloadxen-c9782bae2b97aa39d792c56d308b239ead204c44.tar.gz
xen-c9782bae2b97aa39d792c56d308b239ead204c44.tar.bz2
xen-c9782bae2b97aa39d792c56d308b239ead204c44.zip
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@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_pci.c')
-rw-r--r--tools/libxl/libxl_pci.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index de1b79f577..28a11afbb0 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -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__gc *gc, uint32_t domid,
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");