> -----Original Message-----
> From: Ding, Xuan <[email protected]>
> Sent: Monday, October 11, 2021 4:00 PM
> To: [email protected]; Burakov, Anatoly <[email protected]>;
> [email protected]; Xia, Chenbo <[email protected]>
> Cc: Hu, Jiayu <[email protected]>; Jiang, Cheng1 <[email protected]>;
> Richardson, Bruce <[email protected]>; Pai G, Sunil
> <[email protected]>; Wang, Yinan <[email protected]>; Yang,
> YvonneX <[email protected]>; Ding, Xuan <[email protected]>
> Subject: [PATCH v7 1/2] vfio: allow partially unmapping adjacent memory
> 
> 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 <[email protected]>
> Signed-off-by: Xuan Ding <[email protected]>
> ---

Tested-by: Yvonne Yang <[email protected]>

Reply via email to