[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxenctrl: adds xc_domain_unbind_msi_irq to libxc.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1233847689 0
# Node ID 191643d4307c08ee2aa4b73c3d628fbc82c538da
# Parent  92557a0b021fe02a69f6ce7fc5660d50b8f092c8
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@xxxxxxxxxxxxxxx>
---
 tools/libxc/xc_domain.c |   26 ++++++++++++++++++++++++++
 tools/libxc/xenctrl.h   |    6 ++++++
 2 files changed, 32 insertions(+)

diff -r 92557a0b021f -r 191643d4307c tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Thu Feb 05 15:08:53 2009 +0000
+++ b/tools/libxc/xc_domain.c   Thu Feb 05 15:28:09 2009 +0000
@@ -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,
diff -r 92557a0b021f -r 191643d4307c tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Thu Feb 05 15:08:53 2009 +0000
+++ b/tools/libxc/xenctrl.h     Thu Feb 05 15:28:09 2009 +0000
@@ -1094,6 +1094,12 @@ int xc_domain_update_msi_irq(
     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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.