This patch 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.
Thanks,
--
Yuji Shimada.
Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
diff -r 40d9d9ff435a tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Thu Jan 15 12:54:31 2009 +0000
+++ b/tools/libxc/xc_domain.c Wed Jan 21 11:22:21 2009 +0900
@@ -909,6 +909,32 @@
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,
diff -r 40d9d9ff435a tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Thu Jan 15 12:54:31 2009 +0000
+++ b/tools/libxc/xenctrl.h Wed Jan 21 11:22:21 2009 +0900
@@ -1075,6 +1075,12 @@
uint32_t pirq,
uint32_t gflags);
+int xc_domain_unbind_msi_irq(int xc_handle,
+ uint32_t domid,
+ uint32_t gvec,
+ uint32_t pirq,
+ uint32_t gflags);
+
int xc_domain_bind_pt_irq(int xc_handle,
uint32_t domid,
uint8_t machine_irq,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|