diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-02-05 15:28:09 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-02-05 15:28:09 +0000 |
commit | 20eed172a79109b19859448a1a7618c0209bf057 (patch) | |
tree | 0e480a368d9a4cb2a79d4ff009b1bc98d57fb347 /tools/libxc/xc_domain.c | |
parent | 686f69b6c1c0fab21801131b00e0127900d795d6 (diff) | |
download | xen-20eed172a79109b19859448a1a7618c0209bf057.tar.gz xen-20eed172a79109b19859448a1a7618c0209bf057.tar.bz2 xen-20eed172a79109b19859448a1a7618c0209bf057.zip |
libxenctrl: adds xc_domain_unbind_msi_irq to libxc.
The function is needed to unbind MSI/MSI-X on transition from D3hot
state to D0 state.
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Diffstat (limited to 'tools/libxc/xc_domain.c')
-rw-r--r-- | tools/libxc/xc_domain.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 5bfb34f95a..5e977307cf 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -941,6 +941,32 @@ int xc_domain_update_msi_irq( return rc; } +int xc_domain_unbind_msi_irq( + int xc_handle, + uint32_t domid, + uint32_t gvec, + uint32_t pirq, + uint32_t gflags) +{ + int rc; + xen_domctl_bind_pt_irq_t *bind; + + DECLARE_DOMCTL; + + domctl.cmd = XEN_DOMCTL_unbind_pt_irq; + domctl.domain = (domid_t)domid; + + bind = &(domctl.u.bind_pt_irq); + bind->hvm_domid = domid; + bind->irq_type = PT_IRQ_TYPE_MSI; + bind->machine_irq = pirq; + bind->u.msi.gvec = gvec; + bind->u.msi.gflags = gflags; + + rc = do_domctl(xc_handle, &domctl); + return rc; +} + /* Pass-through: binds machine irq to guests irq */ int xc_domain_bind_pt_irq( int xc_handle, |