From nobody Wed Mar 23 14:52:27 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 ACB671A3E98A; Wed, 23 Mar 2022 14:52:27 +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 4KNrtM4NQzz4ltx; Wed, 23 Mar 2022 14:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648047147; 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=54EN8Tz+PWMAvFQpT494TMaDgatClCF0s4ayxFtjzwE=; b=UcRlNKQmQMEL/jaMHzrqVz+hzpG3dEAC7hUI2gtFzR+FrAWunP8snQIIztBM2Nd7c0ij42 FAO4Ez8/OwOKABfUxtZzhO8FL4Q1J4iJVudzZ4yFKXXRT6rlzVuHKT6Qy6Izsac8rifaGK M2Sp7bEjGPp+lO+/4U9yaiJsQYtu8E6q3xcTvR58B/4l8WY5N3cC8kVjorMCKmQ6xXw3kj +/eQRdjGivk9ZEIMWByXIoU77ogtf5u95InITHbYWwhsdYhQbZCBCH8u8BGyWW6QsEELQN OB4WCuk7e7s0IK/cndCuI4oRgvn8Qz5X4YDxqrafF1GrjM/muR1jgSLonGw7bA== 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 7631425970; Wed, 23 Mar 2022 14:52:27 +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 22NEqRHb014147; Wed, 23 Mar 2022 14:52:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NEqRcS014146; Wed, 23 Mar 2022 14:52:27 GMT (envelope-from git) Date: Wed, 23 Mar 2022 14:52:27 GMT Message-Id: <202203231452.22NEqRcS014146@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: b6370a2c00e1 - releng/13.1 - 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/releng/13.1 X-Git-Reftype: branch X-Git-Commit: b6370a2c00e193fa4b086c3983c7276fe69a97b6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648047147; 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=54EN8Tz+PWMAvFQpT494TMaDgatClCF0s4ayxFtjzwE=; b=JK4tOkIgw+xmIlSDXOtEVjYg6CU3rnQbb6o8wwQqTfqC4hrXo41m4KePADpYPRdD4HsT0V FqF9ODX4V4iAdQsmDnCbboTvosMknAjVrHPwGg/kTbtVN+9MZ2RT0Bl8ScpjbB8nOyG2uY ujyBUwApzj4ip1SYccmZJl8Lwl8K+P1I07G6cLHZ5fCszOVkm7SBRQpiJC6sGbXl9seKH/ CD1Suj+qVc4tdoNClUEs0gYfKDokS/W93dfaizQGqnaXDijFbeeJWvArtwTox6IyakowY8 e6BMryhmVx/8iqdbs9TJOt0Jlao3pc29MGjSokOJoxInoHCZ9YgIKBP+wFfJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648047147; a=rsa-sha256; cv=none; b=UHpDWEseKWrntTvRfLYUdA7svVzS7NcWasAIXdQX0icA3Hr6nHzVx12Hyh8JPL5NDrAhoU mIaxUaXGGF/QCHszNJ7Z0/LxSg/0cG9IHZd2vfeDEiXP+vcO0FF/ODYFDCyaYVzMOiYWvW h2YzOVSBMRtH7DMZ7BGR10E/ikve2ctwToE1OMehYvRgB3XPa8Su7SE4Obzb1DoJOC5XB+ AC2pcLygwyhuI7Bbr5DcabqNtrboGVEUOrx5lbrt0YiCMDfoBB6JLwk9aPY+WVOfco5ZkH bTV58YR49cP6EnVlE4Xsa5X8DVA3cOfjXpQG3Mvdi45fIh79Zr1Gm/WZRdEGQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=b6370a2c00e193fa4b086c3983c7276fe69a97b6 commit b6370a2c00e193fa4b086c3983c7276fe69a97b6 Author: Roger Pau Monné AuthorDate: 2022-02-24 15:53:30 +0000 Commit: Roger Pau Monné CommitDate: 2022-03-23 14:51:27 +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 Approved by: re (gjb) (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);