Skip to contentSkip to conversation

x86/boot: don't blindly mark VGA in graphics mode on MB2 path

PATCH In review Jan Beulich 4 participants 4 messages Jun 24 – Jun 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot: don't blindly mark VGA in graphics mode on MB2 path

Setting ->orig_video_isVGA to the specific marker should be done only when the VBE tag is present and the FRAMEBUFFER is either absent or indicates RGB type. Since the "video" variable now starts out non-NULL, this property was broken when in particular neither of the tags are present. To move back to at least close to original behavior, add a 2nd check to said conditional.

Fixes d5a73cdc6b90 ("x86/boot: Use boot_vid_info variable directly from C code")
xen/arch/x86/boot/reloc.c +1 -1
@@ -339,7 +339,7 @@ static multiboot_info_t *mbi2_reloc(uint
  end:
 
 #ifdef CONFIG_VIDEO
-    if ( video )
+    if ( video && video->lfb_size )
         video->orig_video_isVGA = 0x23;
 #endif
 
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jan Beulich

Setting ->orig_video_isVGA to the specific marker should be done only when the VBE tag is present and the FRAMEBUFFER is either absent or indicates RGB type. Since the "video" variable now starts out non-NULL, this property was broken when in particular neither of the tags are present. To move back to at least close to original behavior, add a 2nd check to said conditional.

Fixes d5a73cdc6b90 ("x86/boot: Use boot_vid_info variable directly from C code")
#2 lore raw
In reply to Jan Beulich
Quoted 11 lines · Jan Beulich

Setting ->orig_video_isVGA to the specific marker should be done only when the VBE tag is present and the FRAMEBUFFER is either absent or indicates RGB type. Since the "video" variable now starts out non-NULL, this property was broken when in particular neither of the tags are present. To move back to at least close to original behavior, add a 2nd check to said conditional.

Fixes d5a73cdc6b90 ("x86/boot: Use boot_vid_info variable directly from C code")

~ Oleksii

Reviewed-by on v1 1/1
#3 lore raw
In reply to Jan Beulich

Le 24/06/2026 à 12:24, Jan Beulich a écrit :

Quoted 15 lines

Setting ->orig_video_isVGA to the specific marker should be done only when the VBE tag is present and the FRAMEBUFFER is either absent or indicates RGB type. Since the "video" variable now starts out non-NULL, this property was broken when in particular neither of the tags are present. To move back to at least close to original behavior, add a 2nd check to said conditional.

Fixes d5a73cdc6b90 ("x86/boot: Use boot_vid_info variable directly from C code")

xen/arch/x86/boot/reloc.c static multiboot_info_t *mbi2_reloc(uint · line 345

Quoted 8 lines
xen/arch/x86/boot/reloc.c +1 -1
@@ -339,7 +339,7 @@ static multiboot_info_t *mbi2_reloc(uint
   end:
 
  #ifdef CONFIG_VIDEO
-    if ( video )
+    if ( video && video->lfb_size )
          video->orig_video_isVGA = 0x23;
  #endif
 

Teddy