From nobody Mon Feb 9 12:29:14 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1613026808; cv=none; d=zohomail.com; s=zohoarc; b=SLoewwsNeZ7JSZ6dXMtXeI7UIEGEmnuhGcwD2xqf5q4yLBXezsHEAZlPSYP3prmQdE9LhAbTWzCAPTohaRqfQ44k5oG83SlEUVSxunHA8Bh8Nfs/KrYUdVBHIHzb9ne5xJUE0fBxoauvuZbGhfzSxKg+matzq3w7MxyXcrQrAKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613026808; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y/wMRUoH/kCcJqu9hehIOJ/ZHyYy4psmoR/Jjv0cMvw=; b=cK2SAR3gFQKUu5YF/e8XsddEEUMWEWFiqCe0TFndLdz4ciPp8W2XXivTlDGo6Ecm5ScWbdjb689y+J5j+LC2WgdHyQW4Va6WsqcwV55JWgjqBMzEf99o7ZxHE02NReiuT+WBdPyZZlHm/YrkFDwFLQwDFDgLYeJbqoJo2gKpCeE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161302680813466.64687655281591; Wed, 10 Feb 2021 23:00:08 -0800 (PST) Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lA5xO-000199-PC for importer@patchew.org; Thu, 11 Feb 2021 02:00:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lA5mQ-0002CJ-A8 for qemu-devel@nongnu.org; Thu, 11 Feb 2021 01:48:46 -0500 Received: from mga11.intel.com ([192.55.52.93]:48359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lA5mL-0008Dl-6v for qemu-devel@nongnu.org; Thu, 11 Feb 2021 01:48:46 -0500 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2021 22:48:24 -0800 Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2021 22:48:24 -0800 IronPort-SDR: UtCFuFZ4bR+20x1YPs3C/5cuNtqZiYatxsricdpV4jOWn9dsR8vTSPu2PwwIPQQzybF0fDXqih BaDWYmafHmRQ== X-IronPort-AV: E=McAfee;i="6000,8403,9891"; a="178692965" X-IronPort-AV: E=Sophos;i="5.81,169,1610438400"; d="scan'208";a="178692965" IronPort-SDR: SIfOttuWQhuL6dKmQujwjBe3FB9hvhqQ+tJDt+ghg9yJEPviwNwpX+iemud9C11B+VRsIIbO2Q e+VcDvGQPTHQ== X-IronPort-AV: E=Sophos;i="5.81,169,1610438400"; d="scan'208";a="588716286" From: Isaku Yamahata To: qemu-devel@nongnu.org, imammedo@redhat.com, mst@redhat.com, marcel.apfelbaum@gmail.com Subject: [PATCH v3 08/10] i386: acpi: Don't build HPET ACPI entry if HPET is disabled Date: Wed, 10 Feb 2021 22:46:44 -0800 Message-Id: <92685581110170e7db1d361e4bbde3167affd44e.1613025709.git.isaku.yamahata@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.93; envelope-from=isaku.yamahata@intel.com; helo=mga11.intel.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: isaku.yamahata@intel.com, Sean Christopherson , isaku.yamahata@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Sean Christopherson Omit HPET AML if the HPET is disabled, QEMU is not emulating it and the guest may get confused by seeing HPET in the ACPI tables without a "physical" device present. The change of DSDT when -no-hpet is as follows. @@ -141,47 +141,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS " } } - Scope (_SB) - { - Device (HPET) - { - Name (_HID, EisaId ("PNP0103") /* HPET System Timer */) // _H= ID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID - OperationRegion (HPTM, SystemMemory, 0xFED00000, 0x0400) - Field (HPTM, DWordAcc, Lock, Preserve) - { - VEND, 32, - PRD, 32 - } - - Method (_STA, 0, NotSerialized) // _STA: Status - { - Local0 =3D VEND /* \_SB_.HPET.VEND */ - Local1 =3D PRD /* \_SB_.HPET.PRD_ */ - Local0 >>=3D 0x10 - If (((Local0 =3D=3D Zero) || (Local0 =3D=3D 0xFFFF))) - { - Return (Zero) - } - - If (((Local1 =3D=3D Zero) || (Local1 > 0x05F5E100))) - { - Return (Zero) - } - - Return (0x0F) - } - - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Set= tings - { - Memory32Fixed (ReadOnly, - 0xFED00000, // Address Base - 0x00000400, // Address Length - ) - }) - } - } - Scope (_SB.PCI0) { Device (ISA) Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov Signed-off-by: Sean Christopherson --- hw/i386/acpi-build.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index e369908b1a..bfdadd7907 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1280,7 +1280,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(sb_scope, dev); aml_append(dsdt, sb_scope); =20 - build_hpet_aml(dsdt); + if (misc->has_hpet) { + build_hpet_aml(dsdt); + } build_piix4_isa_bridge(dsdt); build_isa_devices_aml(dsdt); if (pm->pcihp_bridge_en || pm->pcihp_root_en) { @@ -1328,7 +1330,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, =20 aml_append(dsdt, sb_scope); =20 - build_hpet_aml(dsdt); + if (misc->has_hpet) { + build_hpet_aml(dsdt); + } build_q35_isa_bridge(dsdt); build_isa_devices_aml(dsdt); build_q35_pci0_int(dsdt); --=20 2.17.1