From nobody Wed Mar 23 13:51: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 ABDE41A2F82B; Wed, 23 Mar 2022 13:51:57 +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 4KNqXY4Mnvz4ZBD; Wed, 23 Mar 2022 13:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648043517; 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=wLqGYWVkQExctqZfDddQLFOTZmmItIoJZ1RhLNFE5c0=; b=ZdW17Ba4FJTUXLreeRamH6b6C6VmP5V74+q90NJ0Js9POnmGeCdvq0pRTurJMZpmgkdQGh 2fGnu//UcaOcqC/oWYckSfv9Zw907a4TDfN+eYiXEXmnHaj9h4ZZ+qDkAhhWQq7nZb4ARR 8kezPxFd9MRcmd/578qywrIL5DAysXFnvY93osO4cmp5O50Agoy6ZtymFFtd2otnDubdoC 0yaYJaec7CmjUJRz9rEsoDWGKDE2tlXzn/+byyw/LzLI7kMkzHuGWfrFwB1rDHswkF2Dbh 0juC5GVMeQ+MlF4vmPwxKnI+JEh5pyJ3zYR8MSz7DYzw6tBHLIdz0YmMiTz01g== 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 768AC248F7; Wed, 23 Mar 2022 13:51: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 22NDpvpN033591; Wed, 23 Mar 2022 13:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NDpv6i033590; Wed, 23 Mar 2022 13:51:57 GMT (envelope-from git) Date: Wed, 23 Mar 2022 13:51:57 GMT Message-Id: <202203231351.22NDpv6i033590@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: ad4277c7250c - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: ad4277c7250cc8d26b6acdbc2efa21cfe97c9b51 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648043517; 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=wLqGYWVkQExctqZfDddQLFOTZmmItIoJZ1RhLNFE5c0=; b=tjXbunAdx7vS3G3zuUVUgsBW2pZAUU0Pq9G1XZFc+qZBqXcW1vMdGr8ozzuj6V8piF54UP KmfpUxbNfiDQeW7qEFcBxFyw9KKsNb4VXiSCEjX2zv+ppZjuo8iiNrT5egdblrb2zBkHsd +iS2gwsrsF//HEveVND6VOnyfpsklLxKHAcZM0vrVmzVmVzqNwxDzH23QfDffap139naXy S67hPJE9ko2pn/P7BJabtBGoPEhxrjsqrrDMMShCAj310EUxb9P8oUCIc2Jc8bv8YkNACw PxfpAp+JNyZ/9t0yXo7buefawSCDtqbpFVKh7i9sRUQUaUI6wSePQ9+XcKkSIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648043517; a=rsa-sha256; cv=none; b=HXzCcw4UQlJwza6YFQ941twCFfj0tl2R8cM5gQWTnPvty3arAH6ty1G7EVhlxTi1JNfpDQ 2pDN399/XhsDoanxYBOc4oeC9SMFkgyeRRr0R+imfBD0yL8nE6rn4nKlO+YRgWKuRSHZSz iRtfacIYaL3roywSriF8396osVEeQyOeYuCyY38WgQ9NcRkhgK78RQmamLIRhFFa8yibkw /mci8RgA+ulWAInhF3TIyuT56aVS7KDabGJ0lrJ1n2wlvDDJk4TaW5CGEKYuKnFS0j0M/x KyNVcrmjwDXFHHDkkM+XuQdqCXrDyzqZaEi9o0hp8z6bjXO7CE39EASMl4b94Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ad4277c7250cc8d26b6acdbc2efa21cfe97c9b51 commit ad4277c7250cc8d26b6acdbc2efa21cfe97c9b51 Author: Roger Pau Monné AuthorDate: 2022-02-24 15:53:30 +0000 Commit: Roger Pau Monné CommitDate: 2022-03-23 13:50:33 +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 e057ca6e0351..9c8019925544 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);