linux/arch/x86/platform
Juergen Gross 4ce385f564 x86/mm: Fix _pgd_alloc() for Xen PV mode
Recently _pgd_alloc() was switched from using __get_free_pages() to
pagetable_alloc_noprof(), which might return a compound page in case
the allocation order is larger than 0.

On x86 this will be the case if CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
is set, even if PTI has been disabled at runtime.

When running as a Xen PV guest (this will always disable PTI), using
a compound page for a PGD will result in VM_BUG_ON_PGFLAGS being
triggered when the Xen code tries to pin the PGD.

Fix the Xen issue together with the not needed 8k allocation for a
PGD with PTI disabled by replacing PGD_ALLOCATION_ORDER with an
inline helper returning the needed order for PGD allocations.

Fixes: a9b3c355c2 ("asm-generic: pgalloc: provide generic __pgd_{alloc,free}")
Reported-by: Petr Vaněk <arkamar@atlas.cz>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Petr Vaněk <arkamar@atlas.cz>
Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/all/20250422131717.25724-1-jgross%40suse.com
2025-04-23 07:49:14 -07:00
..
atom x86/platform/atom: Switch to new Intel CPU model defines 2024-06-03 09:49:00 +03:00
ce4100 x86/of: Set the parse_smp_cfg for all the DeviceTree platforms by default 2024-04-03 08:46:08 +02:00
efi x86/mm: Fix _pgd_alloc() for Xen PV mode 2025-04-23 07:49:14 -07:00
geode x86/platform/geode: switch GPIO buttons and LEDs to software properties 2024-09-04 20:17:30 +02:00
intel x86/platform/iosf_mbi: Remove unused iosf_mbi_unregister_pmic_bus_access_notifier() 2025-04-01 20:31:39 +02:00
intel-mid x86/platform/intel-mid: Replace deprecated PCI functions 2024-11-11 11:59:21 +01:00
intel-quark x86/cpu: Fix FAM5_QUARK_X1000 to use X86_MATCH_VFM() 2024-10-31 12:02:21 -07:00
iris x86/platform: Switch back to struct platform_driver::remove() 2024-10-21 17:20:30 +02:00
olpc x86/platform/olpc: Remove unused variable 'len' in olpc_dt_compatible_match() 2025-03-06 11:14:26 +01:00
pvh x86/percpu/64: Use relative percpu offsets 2025-02-18 10:15:27 +01:00
scx200
ts5500
uv x86/apic: Convert to IRQCHIP_MOVE_DEFERRED 2025-01-15 21:38:53 +01:00
Makefile Simple Firmware Interface (SFI) support removal for v5.12-rc1 2021-02-24 10:35:29 -08:00