From patchwork Thu Jan 21 12:54:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 60068 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3757747lbb; Thu, 21 Jan 2016 04:55:39 -0800 (PST) X-Received: by 10.140.28.66 with SMTP id 60mr51188656qgy.74.1453380939217; Thu, 21 Jan 2016 04:55:39 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 199si1220403qhe.38.2016.01.21.04.55.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jan 2016 04:55:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMEm2-0006bF-R3 for patch@linaro.org; Thu, 21 Jan 2016 07:55:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMElY-0006IC-9T for qemu-devel@nongnu.org; Thu, 21 Jan 2016 07:55:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMElX-0005Mj-EI for qemu-devel@nongnu.org; Thu, 21 Jan 2016 07:55:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMElR-0005Fc-4b; Thu, 21 Jan 2016 07:55:01 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 502CD29B224; Thu, 21 Jan 2016 12:55:00 +0000 (UTC) Received: from apm-mustang-ev3-03.lab.eng.brq.redhat.com (apm-mustang-ev3-03.lab.eng.brq.redhat.com [10.34.42.82]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0LCsvJo011925; Thu, 21 Jan 2016 07:54:58 -0500 From: Andrew Jones To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Thu, 21 Jan 2016 13:54:53 +0100 Message-Id: <1453380893-26174-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, zhaoshenglong@huawei.com Subject: [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This patch is the ACPI equivalent of "hw/arm/virt: Add always-on property to the virt board timer". The timer is always on, and thus setting this informs Linux that it may switch off the periodic timer. Switching off the periodic timer substantially reduces the number of interrupts the host needs to inject. Testing note: AArch64 guests (the only ones currently booting with ACPI) do not actually need this patch to determine it can turn the periodic timer off. I therefore used a hacked guest kernel to ensure this patch works as the equivalent DT patch does. Signed-off-by: Andrew Jones --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3.1 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 87fbe7c97d99b..f6e538f3d02ea 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -443,7 +443,7 @@ build_gtdt(GArray *table_data, GArray *linker) gtdt->secure_el1_flags = ACPI_EDGE_SENSITIVE; gtdt->non_secure_el1_interrupt = ARCH_TIMER_NS_EL1_IRQ + 16; - gtdt->non_secure_el1_flags = ACPI_EDGE_SENSITIVE; + gtdt->non_secure_el1_flags = ACPI_EDGE_SENSITIVE | ACPI_GTDT_ALWAYS_ON; gtdt->virtual_timer_interrupt = ARCH_TIMER_VIRT_IRQ + 16; gtdt->virtual_timer_flags = ACPI_EDGE_SENSITIVE;