aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_physdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxc/xc_physdev.c')
-rw-r--r--tools/libxc/xc_physdev.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c
index 1c5e8cb5da..24b8ffb9c2 100644
--- a/tools/libxc/xc_physdev.c
+++ b/tools/libxc/xc_physdev.c
@@ -45,6 +45,37 @@ int xc_physdev_map_pirq(int xc_handle,
return rc;
}
+int xc_physdev_map_pirq_msi(int xc_handle,
+ int domid,
+ int type,
+ int index,
+ int *pirq,
+ int devfn,
+ int bus,
+ int msi_type)
+{
+ int rc;
+ struct physdev_map_pirq map;
+
+ if ( !pirq )
+ return -EINVAL;
+
+ map.domid = domid;
+ map.type = type;
+ map.index = index;
+ map.pirq = *pirq;
+ map.msi_info.devfn = devfn;
+ map.msi_info.bus = bus;
+ map.msi_info.msi = msi_type;
+
+ rc = do_physdev_op(xc_handle, PHYSDEVOP_map_pirq, &map);
+
+ if ( !rc )
+ *pirq = map.pirq;
+
+ return rc;
+}
+
int xc_physdev_unmap_pirq(int xc_handle,
int domid,
int pirq)
@@ -59,3 +90,4 @@ int xc_physdev_unmap_pirq(int xc_handle,
return rc;
}
+