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

Re: [Xen-devel] [PATCH 3/3] VT-d: use msi_compose_msg()


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
  • Date: Wed, 12 Sep 2012 09:56:48 +0000
  • Accept-language: en-US
  • Cc: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
  • Delivery-date: Wed, 12 Sep 2012 09:58:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHNkBoKbSHj5U8uXkCu9VFzOSMLAZeGeXBg
  • Thread-topic: [PATCH 3/3] VT-d: use msi_compose_msg()

Acked-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>, Thanks! 
Xiantao

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Tuesday, September 11, 2012 8:36 PM
> To: xen-devel
> Cc: Zhang, Xiantao
> Subject: [PATCH 3/3] VT-d: use msi_compose_msg()
> 
> ... instead of open coding it.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1079,22 +1079,11 @@ static void dma_msi_set_affinity(struct
>          return;
>      }
> 
> -    memset(&msg, 0, sizeof(msg));
> -    msg.data = MSI_DATA_VECTOR(desc->arch.vector) & 0xff;
> -    msg.data |= 1 << 14;
> -    msg.data |= (INT_DELIVERY_MODE != dest_LowestPrio) ?
> -        MSI_DATA_DELIVERY_FIXED:
> -        MSI_DATA_DELIVERY_LOWPRI;
> -
> -    /* Follow MSI setting */
> +    msi_compose_msg(desc, &msg);
> +    /* Are these overrides really needed? */
>      if (x2apic_enabled)
>          msg.address_hi = dest & 0xFFFFFF00;
> -    msg.address_lo = (MSI_ADDRESS_HEADER <<
> (MSI_ADDRESS_HEADER_SHIFT + 8));
> -    msg.address_lo |= INT_DEST_MODE ? MSI_ADDR_DESTMODE_LOGIC:
> -                    MSI_ADDR_DESTMODE_PHYS;
> -    msg.address_lo |= (INT_DELIVERY_MODE != dest_LowestPrio) ?
> -                    MSI_ADDR_REDIRECTION_CPU:
> -                    MSI_ADDR_REDIRECTION_LOWPRI;
> +    msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
>      msg.address_lo |= MSI_ADDR_DEST_ID(dest & 0xff);  #else
>      memset(&msg, 0, sizeof(msg));
> 
> 


_______________________________________________
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®.