numam-dpdk/lib
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
..
librte_acl remove useless include of EAL memory config header 2019-10-09 10:22:24 +02:00
librte_bbdev bbdev: extend API for 5G FEC 2019-07-05 15:28:14 +02:00
librte_bitratestats bitrate: use common macro RTE_DIM 2019-10-27 14:40:59 +01:00
librte_bpf bpf: hide internal program argument type 2019-10-12 14:27:19 +02:00
librte_cfgfile cfgfile: use calloc 2019-07-19 00:48:43 +02:00
librte_cmdline build: allow stricter fallthrough warnings 2019-10-24 01:02:30 +02:00
librte_compressdev compressdev: clarify destination buffer size 2019-07-29 10:18:24 +02:00
librte_cryptodev cryptodev: clarify wireless inputs in digest-encrypted cases 2019-10-23 16:57:06 +02:00
librte_distributor rename private header files 2019-10-27 22:03:06 +01:00
librte_eal vfio: fix DMA mapping of external heaps 2019-11-07 17:46:43 +01:00
librte_efd eal: hide shared memory config 2019-07-06 10:32:34 +02:00
librte_ethdev rename private header files 2019-10-27 22:03:06 +01:00
librte_eventdev eventdev: add Tx flag for packets with same destination 2019-10-18 10:03:08 +02:00
librte_fib fib: add dataplane algorithm for IPv6 2019-11-06 00:11:44 +01:00
librte_flow_classify flow_classify: fix out-of-bounds access 2019-07-10 23:41:25 +02:00
librte_gro net: add new header file for VXLAN 2019-10-25 19:00:22 +02:00
librte_gso net: add rte prefix to UDP structure 2019-05-24 13:34:46 +02:00
librte_hash hash: replace license text with SPDX tag 2019-07-29 13:31:45 +02:00
librte_ip_frag ip_frag: remove remaining IP checkum offload flag 2019-07-16 13:23:04 +02:00
librte_ipsec ipsec: add SAD add/delete/lookup implementation 2019-10-23 16:57:06 +02:00
librte_jobstats replace snprintf with strlcpy 2019-04-04 22:46:05 +02:00
librte_kni kni: add ability to set min/max MTU 2019-10-27 11:07:43 +01:00
librte_kvargs remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
librte_latencystats latency: check status of getting ethdev info 2019-10-07 14:45:35 +02:00
librte_lpm build: support building ABI versioned files twice 2019-10-27 12:49:28 +01:00
librte_mbuf mbuf: support dynamic fields and flags 2019-10-26 19:08:50 +02:00
librte_member eal: hide shared memory config 2019-07-06 10:32:34 +02:00
librte_mempool mempool: use specific macro for object alignment 2019-11-06 11:34:19 +01:00
librte_meter enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
librte_metrics metrics: add function to deinitialise library 2019-07-16 12:45:30 +02:00
librte_net net: remove ethernet packing and set two-byte alignment 2019-10-27 18:13:44 +01:00
librte_pci pci: remove deprecated functions 2019-10-27 10:41:05 +01:00
librte_pdump pdump: check status of getting ethdev info 2019-10-07 14:45:35 +02:00
librte_pipeline net: remove ethernet packing and set two-byte alignment 2019-10-27 18:13:44 +01:00
librte_port port: fix pcap support with meson 2019-10-27 17:23:02 +01:00
librte_power power: add packet type for capabilities 2019-10-27 21:12:04 +01:00
librte_rawdev rawdev: allow devices to skip extra memory allocation 2019-07-04 09:33:59 +02:00
librte_rcu rcu: fix reference to offline function 2019-10-21 21:21:30 +02:00
librte_reorder eal: hide shared memory config 2019-07-06 10:32:34 +02:00
librte_rib rib: support IPv6 2019-11-06 00:09:48 +01:00
librte_ring ring: add reset function for flushing 2019-07-17 19:51:56 +02:00
librte_sched sched: support 64-bit values 2019-10-25 18:07:37 +02:00
librte_security security: add HFN override option in PDCP 2019-10-09 11:50:12 +02:00
librte_stack rename private header files 2019-10-27 22:03:06 +01:00
librte_table table: fix crash in LPM IPv6 2019-07-04 23:44:58 +02:00
librte_telemetry telemetry: fix build with gcc 9 2019-07-04 18:48:04 +02:00
librte_timer build: support building ABI versioned files twice 2019-10-27 12:49:28 +01:00
librte_vhost vhost: fix build on RHEL 7.6 for Power 2019-10-27 11:07:19 +01:00
Makefile fib: add FIB library 2019-11-06 00:11:44 +01:00
meson.build fib: add FIB library 2019-11-06 00:11:44 +01:00