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

[Xen-devel] [PATCH v5 6/6] tools/libxc: add wrapper for PHYSDEVOP_msi_control



Add libxc wrapper for PHYSDEVOP_msi_control introduced in previous
commit.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
Changes in v3:
 - new patch
Changes in v4:
 - adjust for updated previous patch
Changes in v5:
 - rename to PHYSDEVOP_msi_control, adjust arguments
---
 tools/libxc/include/xenctrl.h |  6 ++++++
 tools/libxc/xc_physdev.c      | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 538007a..826d10d 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1638,6 +1638,12 @@ int xc_physdev_unmap_pirq(xc_interface *xch,
                           uint32_t domid,
                           int pirq);
 
+int xc_physdev_msi_control(xc_interface *xch,
+                           int seg,
+                           int bus,
+                           int devfn,
+                           int flags);
+
 /*
  *  LOGGING AND ERROR REPORTING
  */
diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c
index 460a8e7..a25a117 100644
--- a/tools/libxc/xc_physdev.c
+++ b/tools/libxc/xc_physdev.c
@@ -111,3 +111,22 @@ int xc_physdev_unmap_pirq(xc_interface *xch,
     return rc;
 }
 
+int xc_physdev_msi_control(xc_interface *xch,
+                           int seg,
+                           int bus,
+                           int devfn,
+                           int flags)
+{
+    int rc;
+    struct physdev_msi_control op;
+
+    memset(&op, 0, sizeof(struct physdev_msi_control));
+    op.seg = seg;
+    op.bus = bus;
+    op.devfn = devfn;
+    op.flags = flags;
+
+    rc = do_physdev_op(xch, PHYSDEVOP_msi_control, &op, sizeof(op));
+
+    return rc;
+}
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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