56259f7fc0
Currently, if we map a memory area A, then map a separate memory area B that by coincidence happens to be adjacent to A, current implementation will merge these two segments into one, and if partial unmapping is not supported, these segments will then be only allowed to be unmapped in one go. In other words, given segments A and B that are adjacent, it is currently not possible to map A, then map B, then unmap A. Fix this by adding a notion of "chunk size", which will allow subdividing segments into equally sized segments whenever we are dealing with an IOMMU that does not support partial unmapping. With this change, we will still be able to merge adjacent segments, but only if they are of the same size. If we keep with our above example, adjacent segments A and B will be stored as separate segments if they are of different sizes. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> |
||
---|---|---|
.. | ||
include | ||
eal_alarm.c | ||
eal_cpuflags.c | ||
eal_debug.c | ||
eal_dev.c | ||
eal_hugepage_info.c | ||
eal_interrupts.c | ||
eal_lcore.c | ||
eal_log.c | ||
eal_memalloc.c | ||
eal_memory.c | ||
eal_thread.c | ||
eal_timer.c | ||
eal_vfio_mp_sync.c | ||
eal_vfio.c | ||
eal_vfio.h | ||
eal.c | ||
meson.build |