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

Re: [Xen-devel] [v3 10/15] vt-d: Add API to update IRTE when VT-d PI is used



On 24/06/15 06:18, Feng Wu wrote:
> This patch adds an API which is used to update the IRTE
> for posted-interrupt when guest changes MSI/MSI-X information.
>
> Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx>
> ---
> v3:
> - Remove "adding PDA_MASK()" when updating 'pda_l' and 'pda_h' for IRTE.
> - Change the return type of pi_update_irte() to int.
> - Remove some pointless printk message in pi_update_irte().
> - Use structure assignment instead of memcpy() for irte copy.
>
>  xen/drivers/passthrough/vtd/intremap.c | 98 
> ++++++++++++++++++++++++++++++++++
>  xen/drivers/passthrough/vtd/iommu.h    |  2 +
>  xen/include/asm-x86/iommu.h            |  2 +
>  3 files changed, 102 insertions(+)
>
> diff --git a/xen/drivers/passthrough/vtd/intremap.c 
> b/xen/drivers/passthrough/vtd/intremap.c
> index b7a42f6..401a9d1 100644
> --- a/xen/drivers/passthrough/vtd/intremap.c
> +++ b/xen/drivers/passthrough/vtd/intremap.c
> @@ -900,3 +900,101 @@ void iommu_disable_x2apic_IR(void)
>      for_each_drhd_unit ( drhd )
>          disable_qinval(drhd->iommu);
>  }
> +
> +static inline void setup_posted_irte(

No need for "inline" here.

> +    struct iremap_entry *new_ire, struct pi_desc *pi_desc, uint8_t gvec)

const struct pi_desc *pi_desc

> +{
> +    new_ire->post.urg = 0;

I would start by memset()ing the entire structure to 0, then filling in
the non-zero bits.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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