mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception; but recently it has been the source of a number of subtle reference-counting bugs. It is not used by Linux or MiniOS; but it is used by NetBSD and Novell Netware. There are significant numbers of people who are never going to use the feature, along with significant numbers who need the feature. Add a Kconfig option for the feature (default to 'y'). Also add a command-line option to control whether PV linear pagetables are allowed (default to 'true'). NB that we leave linear_pt_count in the page struct. It's in a union, so its presence doesn't increase the size of the data struct. Changing the layout of the other elements based on configuration options is asking for trouble however; so we'll just leave it there and ASSERT that it's zero. Reported-by: Jann Horn <jannh@google.com> Signed-off-by: George Dunlap <george.dunlap@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Release-acked-by: Julien Grall <julien.grall@arm.com>