summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHou Wenlong <houwenlong.hwl@antgroup.com>2026-01-10 12:00:08 +0800
committerSasha Levin <sashal@kernel.org>2026-03-04 07:20:33 -0500
commit6ea4b7bc2e7b76a5e16357483b93008f75895940 (patch)
treecc057952fafc1a8b4251aaf3a87883c3748d57eb /arch
parent30868a6a5238849d554295aff3ce61d242d7fad8 (diff)
x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
[ Upstream commit db9aded979b491a24871e1621cd4e8822dbca859 ] The PVH entry is available for 32-bit KVM guests, and 32-bit KVM guests do not depend on CONFIG_X86_PAE. However, mk_early_pgtbl_32() builds different pagetables depending on whether CONFIG_X86_PAE is set. Therefore, enabling PAE mode for 32-bit KVM guests without CONFIG_X86_PAE being set would result in a boot failure during CR3 loading. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <d09ce9a134eb9cbc16928a5b316969f8ba606b81.1768017442.git.houwenlong.hwl@antgroup.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/pvh/head.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index fc46b4dfbd74..10deae1a30c6 100644
--- a/arch/x86/platform/pvh/head.S
+++ b/arch/x86/platform/pvh/head.S
@@ -70,10 +70,12 @@ SYM_CODE_START_LOCAL(pvh_start_xen)
mov $_pa(early_stack_end), %esp
+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
/* Enable PAE mode. */
mov %cr4, %eax
orl $X86_CR4_PAE, %eax
mov %eax, %cr4
+#endif
#ifdef CONFIG_X86_64
/* Enable Long mode. */