Skip to content

Commit 357d291

Browse files
jgross1Ingo Molnar
authored andcommitted
x86/xen: Fix boot loader version reported for PVH guests
The boot loader version reported via sysfs is wrong in case of the kernel being booted via the Xen PVH boot entry. it should be 2.12 (0x020c), but it is reported to be 2.18 (0x0212). As the current way to set the version is error prone use the more readable variant (2 << 8) | 12. Signed-off-by: Juergen Gross <jgross@suse.com> Cc: <stable@vger.kernel.org> # 4.12 Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: boris.ostrovsky@oracle.com Cc: bp@alien8.de Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20181010061456.22238-2-jgross@suse.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 0238df6 commit 357d291

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/xen/enlighten_pvh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void __init init_pvh_bootparams(void)
7575
* Version 2.12 supports Xen entry point but we will use default x86/PC
7676
* environment (i.e. hardware_subarch 0).
7777
*/
78-
pvh_bootparams.hdr.version = 0x212;
78+
pvh_bootparams.hdr.version = (2 << 8) | 12;
7979
pvh_bootparams.hdr.type_of_loader = (9 << 4) | 0; /* Xen loader */
8080

8181
x86_init.acpi.get_root_pointer = pvh_get_root_pointer;

0 commit comments

Comments
 (0)