numam-dpdk/lib/librte_eal/linux/eal
Anatoly Burakov 47c45a4df6 vfio: fix DMA mapping of external heaps
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: 0f526d674f ("malloc: separate creating memseg list and malloc heap")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-11-07 17:46:43 +01:00
..
include kni: add ability to set min/max MTU 2019-10-27 11:07:43 +01:00
eal_alarm.c eal/linux: fix return after alarm registration failure 2019-06-27 17:25:05 +02:00
eal_cpuflags.c
eal_debug.c
eal_dev.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
eal_hugepage_info.c eal: tighten permissions on shared memory files 2019-04-04 22:06:16 +02:00
eal_interrupts.c eal: add ack interrupt API 2019-07-23 12:00:22 +02:00
eal_lcore.c
eal_log.c
eal_memalloc.c remove useless include of EAL memory config header 2019-10-09 10:22:24 +02:00
eal_memory.c vfio: fix DMA mapping of external heaps 2019-11-07 17:46:43 +01:00
eal_thread.c
eal_timer.c timer: remove useless check on x86 TSC reliability 2019-10-17 09:47:42 +02:00
eal_vfio_mp_sync.c ipc: handle unsupported IPC in action register 2019-06-05 11:27:36 +02:00
eal_vfio.c vfio: fix DMA mapping of external heaps 2019-11-07 17:46:43 +01:00
eal_vfio.h
eal.c eal: factorize lcore role code 2019-10-27 10:41:08 +01:00
Makefile eal: make lcore config private 2019-10-27 10:35:11 +01:00
meson.build eal: add OS specific header file 2019-04-03 01:11:56 +02:00