xen/arm: mm: Add support for the contiguous bit
authorJulien Grall <jgrall@amazon.com>
Fri, 20 May 2022 12:09:23 +0000 (13:09 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 8 Jun 2022 10:04:53 +0000 (11:04 +0100)
commitd1459136f39546950c19a640834b0205ca71a84c
tree7e30ab73039ab60115d23fcea0e5a82ca240d974
parent677b3f8f7baa4d5a037543237e1967f1d1c3c502
xen/arm: mm: Add support for the contiguous bit

In follow-up patches, we will use xen_pt_update() (or its callers)
to handle large mappings (e.g. frametable, xenheap). They are also
not going to be modified once created.

The page-table entries have an hint to indicate that whether an
entry is contiguous to another 16 entries (assuming 4KB). When the
processor support the hint, one TLB entry will be created per
contiguous region.

For now this is tied to _PAGE_BLOCK. We can untie it in the future
if there are use-cases where we may want to use _PAGE_BLOCK without
setting the contiguous (couldn't think of any yet).

Note that to avoid extra complexity, mappings with the contiguous
bit set cannot be removed. Given the expected use, this restriction
ought to be fine.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Hongda Deng <Hongda.Deng@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/include/asm/page.h
xen/arch/arm/mm.c