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: 571133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CBF871402A9 for ; Thu, 21 Jan 2016 23:55:30 +1100 (AEDT) Received: from localhost ([::1]:47292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMEls-0006bF-8w for incoming@patchwork.ozlabs.org; Thu, 21 Jan 2016 07:55:28 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;