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

Re: [Xen-devel] [PATCH v3] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Wed, 24 Jul 2019 00:52:03 +0000
  • Accept-language: en-US
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Wed, 24 Jul 2019 00:52:15 +0000
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.0.400.15
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVO/L5KqAMV4eJUUuIlDrYCEG7RKbY/ALA
  • Thread-topic: [PATCH v3] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
> Sent: Wednesday, July 17, 2019 12:24 AM
> 
> DMA-ing to the stack is considered bad practice.  In this case, if a
> timeout occurs because of a sluggish device which is processing the
> request, the completion notification will corrupt the stack of a
> subsequent deeper call tree.
> 
> Place the poll_slot in a percpu area and DMA to that instead.
> 
> Fix the declaration of saddr in struct qinval_entry, to avoid a shift by
> two.  The requirement here is that the DMA address is dword aligned,
> which is covered by poll_slot's type.
> 
> This change does not address other issues.  Correlating completions
> after a timeout with their request is a more complicated change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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