From nobody Wed Mar 23 13:46:57 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9BC311A2D352; Wed, 23 Mar 2022 13:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNqQn6rG3z4X16; Wed, 23 Mar 2022 13:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648043218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zO1UlmLgjNKHs8QVR4K9G1jfnBqmos+mlNPSxwYqbjM=; b=uBC6ZHqacpU3i/tJnRdsZi1U0YkTDedW6qfh/nTbr/4Y53jdYyaZdAONKk50Kc5ujz90/x pyzFWMQQPbGkFBdHOPgUit/xShBuUCmmX+scqc1vWAEO8+wtHUMYV/f8bjNXtjkCz0+Ama ziMH0oN7oUdcpAglOTnmJuK865HgZuQdbFq/Sf4kck+xOiwleyE1CJ1nN802bE2cmgu56J IYvYNugTXBLIZsIVQq5eAF2+CLymqmBeFe/+xqDGnbueJIo+SPRNiy72wVyhv8Z7WDB5Bb nc69tde0FjL7jAV9oevxc4w8tXNq1ymXKx5CF4KFAz46IxtJJIlsDFZ8bG/5wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE7E02498E; Wed, 23 Mar 2022 13:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22NDkvN4020078; Wed, 23 Mar 2022 13:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NDkvpU020077; Wed, 23 Mar 2022 13:46:57 GMT (envelope-from git) Date: Wed, 23 Mar 2022 13:46:57 GMT Message-Id: <202203231346.22NDkvpU020077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Roger Pau Monn=C3=A9?= Subject: git: 41a0aef5048a - stable/13 - vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41a0aef5048aae1094f4f131185cf249050affa5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648043218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zO1UlmLgjNKHs8QVR4K9G1jfnBqmos+mlNPSxwYqbjM=; b=fuvCe57mMZLw8dsD/V7m3bvUK+PRsWgfGsiLDync2QO6x7IHuByX+dtADDDPwb1Ryb+Zd2 utG9+dujmB9wH24N5UIqdS9slhyJzT9DcTYb+0u6TDwhVOCBCA3AdKDx3NmmBaqo5bdSku X+lZi+vpMxE8flwiCUS4MRUKBd7MqPDwuqLnUgFADmDJ0+zhoUFKaH7hK4dMGDl0xOkNoW 4s8vI2OLxFozwWedVB6Ksrav0QSjNDh0c+NYK4uPMnbdZ0wgMMFwESKLNg373FZL2+cybz ExrcbCiSF7YNFPW5/ymM7FxEQ4q2nSRfAKlWRcMWHjgmwfF8+Mm7jrMT26micQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648043218; a=rsa-sha256; cv=none; b=p/TjNb0Uv9LowXsOKROgopme6/v8pMFilUPQ5tzf9VMTPF+I1O3CqXSytDoSVxtK79iY3Z b8zwwBEDxSlkH0G0fCi1lAuyBHd+r/KXLjMa4xwA8ccvXIGUxorFqItuL/0yZSW1MLMJ9k yMlgqa6Heq9hIMUw2anvtzo0qelCDSU6dPrd/4pbiXbBeCYwYPTAMxchRuP6uNOUmfQk5q vPS3gvIOHptSvzS2IDQ8D4fT8TE/v6CyYYmASbjBrRdjACdqx4nsYhpltnW3xp8FgTdM41 0pK7thQWArvmsQuuJJz1yCAkNFrQrTcFzUns6T4oJot99Z0bxjr6hKSYjOBKNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=41a0aef5048aae1094f4f131185cf249050affa5 commit 41a0aef5048aae1094f4f131185cf249050affa5 Author: Roger Pau Monné AuthorDate: 2022-02-24 15:53:30 +0000 Commit: Roger Pau Monné CommitDate: 2022-03-23 13:44:30 +0000 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. Reviewed by: emaste, 0mp, eugen Sponsored by: Citrix Systems R&D PR: 230172 (cherry picked from commit 0518832011caba1e9dcee054d7884797ed8a74c2) --- share/man/man4/vt.4 | 5 ++++- sys/dev/vt/hw/vga/vt_vga.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index f41acd11e4e2..9ec24cf2e140 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2022 +.Dd March 17, 2022 .Dt "VT" 4 .Os .Sh NAME @@ -204,6 +204,9 @@ graphics mode. Set to 1 to force the usage of the VGA driver regardless of whether ACPI IAPC_BOOT_ARCH signals no VGA support. Can be used to workaround firmware bugs in the ACPI tables. +Note no VGA support is only acknowledged when running virtualized. +There is too many broken firmware that wrongly reports no VGA support on +physical hardware. .It Va kern.vty Set this value to .Ql vt diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index bac8f3eb7b97..d457f8c7b31d 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -1261,7 +1261,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);