c8202a4d79
The memory API has been refactored. It is not possible anymore to register a memory region more than once. This has been introduced in this patch: https://review.gerrithub.io/426085 In case of vhost with vvu transport, it often happens that two consequtive vhost memory regions are mapped to virtual addresses that lie within the same 2MB address range. This means that the vhost memory regions may not be 2MB-aligned in the process virtual address space. As a result, the `FLOOR_2MB()` of those addresses gives the same address. Thus, we end up trying to register the same 2MB memory range twice. This issue does not appear in case of AF_UNIX transport. Vhost memory regions in case of AF_UNIX transport are hugepage backed. Therefore, the mmapped virtual addresses of those memory regions are always 2MB-aligned. On the contrary, in case of vvu transport, the vhost memory regions are segments of the PCI memory address space of the virtio-vhost-user PCI device. This MMIO space is mapped in its entirety by the DPDK vfio interface along with the other PCI BARs. Ultimately, the vhost memory regions correspond to offsets in this mmapped PCI memory region and thus there is no warranty that the mmapped virtual addresses are 2MB-aligned. This issue is fixed by skipping the already-registered 2MB memory regions. Change-Id: I62c9c257e6f172c894cd3454d2cbeee1986e6189 Signed-off-by: Nikos Dragazis <ndragazis@arrikto.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/441057 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> |
||
---|---|---|
.. | ||
rte_vhost | ||
Makefile | ||
rte_vhost_compat.c | ||
vhost_blk.c | ||
vhost_internal.h | ||
vhost_nvme.c | ||
vhost_rpc.c | ||
vhost_scsi.c | ||
vhost.c |