diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-01 10:33:03 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-01 10:33:03 +0100 |
commit | 85715f4bc7c9c58a81da55041bf00eaab4e52b21 (patch) | |
tree | 0e2c660770f72af28de9fa80c819aee7aaeb9791 /tools/libxc/xc_physdev.c | |
parent | 46ac8f31a0e02074f20199d0b2bde014d06d09c9 (diff) | |
download | xen-85715f4bc7c9c58a81da55041bf00eaab4e52b21.tar.gz xen-85715f4bc7c9c58a81da55041bf00eaab4e52b21.tar.bz2 xen-85715f4bc7c9c58a81da55041bf00eaab4e52b21.zip |
MSI 5/6: add MSI support to passthrough HVM domain
Currently it only inercept access to MSI config space, no MSI-x support.
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
Diffstat (limited to 'tools/libxc/xc_physdev.c')
-rw-r--r-- | tools/libxc/xc_physdev.c | 32 |
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; } + |