On 22.04.19 19:49, Julien Grall wrote:
We currently use the very long version __attribute__((__aligned(4096)))
to align page-tables. Thankfully there is a shorter version to make
IMO it is better to change `version` to `macro`. In order to specify it is not
a compiler specific but specific to XEN.
the code more readable.
While modifying the attribute:
1) Move it before the variable name as we do in other part of Xen
2) Switch to PAGE_SIZE instead of 4096 to make more future-proof
3) Mark static page-tables not used outside the file (i.e any
page-tables other than boot_* and xen_fixmap).
Lastly, some of the variables use __attribute__(__aligned(X * 4096)).
However this is not necessary as page-tables are only required to be
to be aligned to a page-size. So use __aligned(PAGE_SIZE).
Signed-off-by: Julien Grall <[email protected]>
Though:
Reviewed-by: Andrii Anisov <[email protected]>
--
Sincerely,
Andrii Anisov.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel