ia64/xen-unstable

changeset 19176:191643d4307c

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 05 15:28:09 2009 +0000 (2009-02-05)
parents 92557a0b021f
children ab514cfbcdc5
files tools/libxc/xc_domain.c tools/libxc/xenctrl.h
line diff
     1.1 --- a/tools/libxc/xc_domain.c	Thu Feb 05 15:08:53 2009 +0000
     1.2 +++ b/tools/libxc/xc_domain.c	Thu Feb 05 15:28:09 2009 +0000
     1.3 @@ -941,6 +941,32 @@ int xc_domain_update_msi_irq(
     1.4      return rc;
     1.5  }
     1.6  
     1.7 +int xc_domain_unbind_msi_irq(
     1.8 +    int xc_handle,
     1.9 +    uint32_t domid,
    1.10 +    uint32_t gvec,
    1.11 +    uint32_t pirq,
    1.12 +    uint32_t gflags)
    1.13 +{
    1.14 +    int rc;
    1.15 +    xen_domctl_bind_pt_irq_t *bind;
    1.16 +
    1.17 +    DECLARE_DOMCTL;
    1.18 +
    1.19 +    domctl.cmd = XEN_DOMCTL_unbind_pt_irq;
    1.20 +    domctl.domain = (domid_t)domid;
    1.21 +
    1.22 +    bind = &(domctl.u.bind_pt_irq);
    1.23 +    bind->hvm_domid = domid;
    1.24 +    bind->irq_type = PT_IRQ_TYPE_MSI;
    1.25 +    bind->machine_irq = pirq;
    1.26 +    bind->u.msi.gvec = gvec;
    1.27 +    bind->u.msi.gflags = gflags;
    1.28 +
    1.29 +    rc = do_domctl(xc_handle, &domctl);
    1.30 +    return rc;
    1.31 +}
    1.32 +
    1.33  /* Pass-through: binds machine irq to guests irq */
    1.34  int xc_domain_bind_pt_irq(
    1.35      int xc_handle,
     2.1 --- a/tools/libxc/xenctrl.h	Thu Feb 05 15:08:53 2009 +0000
     2.2 +++ b/tools/libxc/xenctrl.h	Thu Feb 05 15:28:09 2009 +0000
     2.3 @@ -1094,6 +1094,12 @@ int xc_domain_update_msi_irq(
     2.4      uint32_t pirq,
     2.5      uint32_t gflags);
     2.6  
     2.7 +int xc_domain_unbind_msi_irq(int xc_handle,
     2.8 +                             uint32_t domid,
     2.9 +                             uint32_t gvec,
    2.10 +                             uint32_t pirq,
    2.11 +                             uint32_t gflags);
    2.12 +
    2.13  int xc_domain_bind_pt_irq(int xc_handle,
    2.14                            uint32_t domid,
    2.15                            uint8_t machine_irq,