x86: introduce helper for recording degree of contiguity in page tables
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:37:34 +0000 (15:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:37:34 +0000 (15:37 +0200)
commit8c6a4963f07da518a74c35344bc9b28a84a78fee
treedbf9ec1d246283bdd1e468f84cda686078e5e6cc
parent2e70db30b3bb7fb307377bfa71c2a70ad0f7634f
x86: introduce helper for recording degree of contiguity in page tables

This is a re-usable helper (kind of a template) which gets introduced
without users so that the individual subsequent patches introducing such
users can get committed independently of one another.

See the comment at the top of the new file. To demonstrate the effect,
if a page table had just 16 entries, this would be the set of markers
for a page table with fully contiguous mappings:

index  0 1 2 3 4 5 6 7 8 9 A B C D E F
marker 4 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0

"Contiguous" here means not only present entries with successively
increasing MFNs, each one suitably aligned for its slot, but also a
respective number of all non-present entries.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/arch/x86/include/asm/pt-contig-markers.h [new file with mode: 0644]