]> xenbits.xensource.com Git - xen.git/commitdiff
x86/pvh: zero VGA information
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 22 Apr 2024 13:13:30 +0000 (15:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Apr 2024 13:13:30 +0000 (15:13 +0200)
PVH guests skip real mode VGA detection, and never have a VGA available, hence
the default VGA selection is not applicable, and at worse can cause confusion
when parsing Xen boot log.

Zero the boot_vid_info structure when Xen is booted from the PVH entry point.

This fixes Xen incorrectly reporting:

(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16

When booted as a PVH guest.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/video.h
xen/arch/x86/guest/xen/pvh-boot.c
xen/arch/x86/setup.c

index 6a7775d242923cefeff4fb87a33452deda2ceff1..1203515f9e5b8a61f973feee0ff38ccd6fc2b62a 100644 (file)
@@ -67,6 +67,8 @@ struct boot_video_info {
     } vesapm;
     uint16_t vesa_attrib;        /* 0x28 */
 };
+
+extern struct boot_video_info boot_vid_info;
 #endif /* __ASSEMBLY__ */
 
 #endif /* __BOOT_VIDEO_H__ */
index 9cbe87b61bdd3b28efc7f80e5c17ae234934286e..cc57ab2cbcde92acc12f060e3de45f76843bf178 100644 (file)
 
 #include <public/arch-x86/hvm/start_info.h>
 
+#ifdef CONFIG_VIDEO
+# include "../../boot/video.h"
+#endif
+
 /* Initialised in head.S, before .bss is zeroed. */
 bool __initdata pvh_boot;
 uint32_t __initdata pvh_start_info_pa;
@@ -95,6 +99,11 @@ void __init pvh_init(multiboot_info_t **mbi, module_t **mod)
     ASSERT(xen_guest);
 
     get_memory_map();
+
+#ifdef CONFIG_VIDEO
+    /* No VGA available when booted from the PVH entry point. */
+    memset(&bootsym(boot_vid_info), 0, sizeof(boot_vid_info));
+#endif
 }
 
 void __init pvh_print_info(void)
index 86cd8b999774d8e9df000263fe545f4bd244583b..449a3476531e54227aa527087dbc35d036cb0553 100644 (file)
@@ -646,7 +646,6 @@ static struct e820map __initdata boot_e820;
 
 #ifdef CONFIG_VIDEO
 # include "boot/video.h"
-extern struct boot_video_info boot_vid_info;
 #endif
 
 static void __init parse_video_info(void)