diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-01 10:30:22 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-01 10:30:22 +0100 |
commit | ca0074e519fdc29c8574356b1ba551c8a1b235bb (patch) | |
tree | 4d65accb82731b261759c982e39a6a4ad78e9fc1 /tools/libxc/xc_physdev.c | |
parent | 154c5516cb1264c9630f6100b28a7c7ed138430a (diff) | |
download | xen-ca0074e519fdc29c8574356b1ba551c8a1b235bb.tar.gz xen-ca0074e519fdc29c8574356b1ba551c8a1b235bb.tar.bz2 xen-ca0074e519fdc29c8574356b1ba551c8a1b235bb.zip |
MSI 2/6: change the pirq to be per-domain
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 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c index 43ea7ff53f..1c5e8cb5da 100644 --- a/tools/libxc/xc_physdev.c +++ b/tools/libxc/xc_physdev.c @@ -19,3 +19,43 @@ int xc_physdev_pci_access_modify(int xc_handle, errno = ENOSYS; return -1; } + +int xc_physdev_map_pirq(int xc_handle, + int domid, + int type, + int index, + int *pirq) +{ + int rc; + struct physdev_map_pirq map; + + if ( !pirq ) + return -EINVAL; + + map.domid = domid; + map.type = type; + map.index = index; + map.pirq = *pirq; + + 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) +{ + int rc; + struct physdev_unmap_pirq unmap; + + unmap.domid = domid; + unmap.pirq = pirq; + + rc = do_physdev_op(xc_handle, PHYSDEVOP_unmap_pirq, &unmap); + + return rc; +} |