Re: [PATCH] x86/video: Preserve the default VGA fallback for legacy modes

From: Borislav Petkov

Date: Fri Oct 30 2026 - 14:33:57 EST


On Fri, Oct 30, 2026 at 05:24:21AM -0400, Hengyu Liang wrote:
> > Further below in that code is a call to pci_find_resource(). [1] Why
> > does it match with vkms? Vkms is not even on a PCI device.
>
> It doesn't match vkms. As you say, vkms isn't a PCI device, so
> video_is_primary_device() returns false for it at the dev_is_pci() check.
>
> The problem is on the bochs side. In text mode, screen_info_resources()
> returns the legacy VGA ranges, pci_find_resource() doesn't find them in
> the BARs, and the function returns false there as well. So no device is
> primary, and fbcon stays on the first registered framebuffer. In this
> setup that is vkms (fb0), so the console is never remapped to bochs (fb1).
>
> vkms only makes the console part visible. Without vkms, tty1 has the same
> size with and without the patch, but boot_display is still missing without
> it.

Please update your commit message with this clarification.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette