* [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
@ 2026-01-10 4:00 Hou Wenlong
2026-01-20 7:39 ` Hou Wenlong
0 siblings, 1 reply; 4+ messages in thread
From: Hou Wenlong @ 2026-01-10 4:00 UTC (permalink / raw)
To: linux-kernel
Cc: Hou Wenlong, Juergen Gross, Boris Ostrovsky, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
xen-devel
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>
---
I resend this because I encountered the 32-bit KVM guest PVH booting failure again. I
hope this can be fixed.
original v2:
https://lore.kernel.org/all/0469c27833be58aa66471920aa77922489d86c63.1713873613.git.houwenlong.hwl@antgroup.com
---
arch/x86/platform/pvh/head.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index 344030c1a81d..53ee2d53fcf8 100644
--- a/arch/x86/platform/pvh/head.S
+++ b/arch/x86/platform/pvh/head.S
@@ -91,10 +91,12 @@ SYM_CODE_START(pvh_start_xen)
leal rva(early_stack_end)(%ebp), %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. */
base-commit: b7dccac786071bba98b0d834c517fd44a22c50f9
prerequisite-patch-id: 590fa7e96c6bb8e0b9d15017cfa5ce1eb314957a
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
2026-01-10 4:00 [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set Hou Wenlong
@ 2026-01-20 7:39 ` Hou Wenlong
2026-01-20 7:48 ` Jürgen Groß
0 siblings, 1 reply; 4+ messages in thread
From: Hou Wenlong @ 2026-01-20 7:39 UTC (permalink / raw)
To: linux-kernel
Cc: Juergen Gross, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm,
Sean Christopherson
+kvm, I'm not sure whether it is needed.
On Sat, Jan 10, 2026 at 12:00:08PM +0800, Hou Wenlong wrote:
> 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>
> ---
> I resend this because I encountered the 32-bit KVM guest PVH booting failure again. I
> hope this can be fixed.
> original v2:
> https://lore.kernel.org/all/0469c27833be58aa66471920aa77922489d86c63.1713873613.git.houwenlong.hwl@antgroup.com
> ---
> arch/x86/platform/pvh/head.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
> index 344030c1a81d..53ee2d53fcf8 100644
> --- a/arch/x86/platform/pvh/head.S
> +++ b/arch/x86/platform/pvh/head.S
> @@ -91,10 +91,12 @@ SYM_CODE_START(pvh_start_xen)
>
> leal rva(early_stack_end)(%ebp), %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. */
>
> base-commit: b7dccac786071bba98b0d834c517fd44a22c50f9
> prerequisite-patch-id: 590fa7e96c6bb8e0b9d15017cfa5ce1eb314957a
> --
> 2.31.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
2026-01-20 7:39 ` Hou Wenlong
@ 2026-01-20 7:48 ` Jürgen Groß
2026-01-20 7:55 ` Hou Wenlong
0 siblings, 1 reply; 4+ messages in thread
From: Jürgen Groß @ 2026-01-20 7:48 UTC (permalink / raw)
To: Hou Wenlong, linux-kernel
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, kvm, Sean Christopherson
[-- Attachment #1.1.1: Type: text/plain, Size: 1770 bytes --]
On 20.01.26 08:39, Hou Wenlong wrote:
> +kvm, I'm not sure whether it is needed.
I have queued it in the Xen tree for the next merge window.
Juergen
>
> On Sat, Jan 10, 2026 at 12:00:08PM +0800, Hou Wenlong wrote:
>> 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>
>> ---
>> I resend this because I encountered the 32-bit KVM guest PVH booting failure again. I
>> hope this can be fixed.
>> original v2:
>> https://lore.kernel.org/all/0469c27833be58aa66471920aa77922489d86c63.1713873613.git.houwenlong.hwl@antgroup.com
>> ---
>> arch/x86/platform/pvh/head.S | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
>> index 344030c1a81d..53ee2d53fcf8 100644
>> --- a/arch/x86/platform/pvh/head.S
>> +++ b/arch/x86/platform/pvh/head.S
>> @@ -91,10 +91,12 @@ SYM_CODE_START(pvh_start_xen)
>>
>> leal rva(early_stack_end)(%ebp), %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. */
>>
>> base-commit: b7dccac786071bba98b0d834c517fd44a22c50f9
>> prerequisite-patch-id: 590fa7e96c6bb8e0b9d15017cfa5ce1eb314957a
>> --
>> 2.31.1
>>
>>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
2026-01-20 7:48 ` Jürgen Groß
@ 2026-01-20 7:55 ` Hou Wenlong
0 siblings, 0 replies; 4+ messages in thread
From: Hou Wenlong @ 2026-01-20 7:55 UTC (permalink / raw)
To: Jürgen Groß
Cc: linux-kernel, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm,
Sean Christopherson
On Tue, Jan 20, 2026 at 08:48:43AM +0100, Jürgen Groß wrote:
> On 20.01.26 08:39, Hou Wenlong wrote:
> >+kvm, I'm not sure whether it is needed.
>
> I have queued it in the Xen tree for the next merge window.
>
Thanks for the notification.
>
> Juergen
>
> >
> >On Sat, Jan 10, 2026 at 12:00:08PM +0800, Hou Wenlong wrote:
> >>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>
> >>---
> >>I resend this because I encountered the 32-bit KVM guest PVH booting failure again. I
> >>hope this can be fixed.
> >>original v2:
> >>https://lore.kernel.org/all/0469c27833be58aa66471920aa77922489d86c63.1713873613.git.houwenlong.hwl@antgroup.com
> >>---
> >> arch/x86/platform/pvh/head.S | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >>diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
> >>index 344030c1a81d..53ee2d53fcf8 100644
> >>--- a/arch/x86/platform/pvh/head.S
> >>+++ b/arch/x86/platform/pvh/head.S
> >>@@ -91,10 +91,12 @@ SYM_CODE_START(pvh_start_xen)
> >> leal rva(early_stack_end)(%ebp), %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. */
> >>
> >>base-commit: b7dccac786071bba98b0d834c517fd44a22c50f9
> >>prerequisite-patch-id: 590fa7e96c6bb8e0b9d15017cfa5ce1eb314957a
> >>--
> >>2.31.1
> >>
> >>
>
> pub 2048R/28BF132F 2014-06-02 Juergen Gross <jg@pfupf.net>
> uid Juergen Gross <jgross@suse.com>
> uid Juergen Gross <jgross@novell.com>
> uid Juergen Gross <jgross@suse.de>
> sub 2048R/16375B53 2014-06-02
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-20 7:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-10 4:00 [PATCH RESEND v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set Hou Wenlong
2026-01-20 7:39 ` Hou Wenlong
2026-01-20 7:48 ` Jürgen Groß
2026-01-20 7:55 ` Hou Wenlong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®