patches for DPDK stable branches
 help / color / mirror / Atom feed
* Re: [dpdk-stable] [PATCH 19.11] vfio: fix DMA mapping of externally allocated heaps
       [not found] <>
@ 2019-11-07 15:35 ` David Marchand
  0 siblings, 0 replies; only message in thread
From: David Marchand @ 2019-11-07 15:35 UTC (permalink / raw)
  To: Anatoly Burakov
  Cc: dev, Bruce Richardson, Rajesh Ravi, Ajit Khaparde,
	Jonathan Richardson, Scott Branden, Vikram Mysore Prakash,
	Srinath Mannam, Thomas Monjalon, dpdk stable

On Tue, Nov 5, 2019 at 4:15 PM Anatoly Burakov
<> wrote:
> Currently, externally created heaps are supposed to be automatically
> mapped for VFIO DMA by EAL, however they only do so if, at the time of
> heap creation, VFIO is initialized and has at least one device
> available. If no devices are available at the time of heap creation (or
> if devices were available, but were since hot-unplugged, thus dropping
> all VFIO container mappings), then VFIO mapping code would have skipped
> over externally allocated heaps.
> The fix is two-fold. First, we allow externally allocated memory
> segments to be marked as "heap" segments. This allows us to distinguish
> between external memory segments that were created via heap API, from
> those that were created via rte_extmem_register() API.
> Then, we fix the VFIO code to only skip non-heap external segments.
> Also, since external heaps are not guaranteed to have valid IOVA
> addresses, we will skip those which have invalid IOVA addresses as well.
> Fixes: 0f526d674f8e ("malloc: separate creating memseg list and malloc heap")

> Signed-off-by: Anatoly Burakov <>
Tested-by: Rajesh Ravi <>
Acked-by: Thomas Monjalon <>

> ---
> Notes:
>     This cannot be backported to older releases as it breaks the
>     API and ABI. A separate fix is in the works for stable.

Applied, thanks.

David Marchand

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-07 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2019-11-07 15:35 ` [dpdk-stable] [PATCH 19.11] vfio: fix DMA mapping of externally allocated heaps David Marchand

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone