From 7310c68f379ae8674e2bffd5bdc7b62cd800ca4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Thu, 24 Feb 2022 16:53:30 +0100 Subject: [PATCH] vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized There's too many broken hardware out there that wrongly has the ACPI_FADT_NO_VGA bit set. Ignore it unless running as a virtualized guest, as then the expectation would be that the hypervisor does provide correct ACPI tables. Sponsored by: Citrix Systems R&D PR: 230172 --- sys/dev/vt/hw/vga/vt_vga.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index 563867399e53..d3e7f00d1377 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -1260,7 +1260,11 @@ vga_acpi_disabled(void) uint16_t flags; int ignore; - ignore = 0; + /* + * Ignore the flag on real hardware: there's a lot of buggy firmware + * that will wrongly set it. + */ + ignore = vm_guest == VM_GUEST_NO; TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore); if (ignore || !acpi_get_fadt_bootflags(&flags)) return (false); -- 2.34.1