From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVXK-0008HY-12 for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:37:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLVXF-0006NX-SF for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:37:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVXF-0006NS-MK for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:37:21 -0500 Date: Tue, 19 Jan 2016 13:37:16 +0100 From: Andrew Jones Message-ID: <20160119123716.GA10814@hawk.localdomain> References: <1453204158-11412-1-git-send-email-christoffer.dall@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453204158-11412-1-git-send-email-christoffer.dall@linaro.org> Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoffer Dall Cc: qemu-devel@nongnu.org On Tue, Jan 19, 2016 at 12:49:18PM +0100, Christoffer Dall wrote: > The virt board has an arch timer, which is always on. Emit the > "always-on" property to indicate to Linux that it can switch off the > periodic timer and reduces the amount of interrupts injected into a > guest. > > Signed-off-by: Christoffer Dall > --- > hw/arm/virt.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 05f9087..265fe9a 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -291,6 +291,7 @@ static void fdt_add_timer_nodes(const VirtBoardInfo *vbi, int gictype) > qemu_fdt_setprop_string(vbi->fdt, "/timer", "compatible", > "arm,armv7-timer"); > } > + qemu_fdt_setprop(vbi->fdt, "/timer", "always-on", NULL, 0); > qemu_fdt_setprop_cells(vbi->fdt, "/timer", "interrupts", > GIC_FDT_IRQ_TYPE_PPI, ARCH_TIMER_S_EL1_IRQ, irqflags, > GIC_FDT_IRQ_TYPE_PPI, ARCH_TIMER_NS_EL1_IRQ, irqflags, > -- > 2.1.2.330.g565301e.dirty > > Hi Christoffer, We should also patch the ACPI generation at the same time. I think something like - gtdt->non_secure_el1_flags = ACPI_EDGE_SENSITIVE; + gtdt->non_secure_el1_flags = ACPI_EDGE_SENSITIVE | ACPI_GTDT_ALWAYS_ON; should do it. Also, having the guest reduce the number of interrupts sounds good. Can you point me to something to read about how/why a guest may choose to do that, and what the trade-offs are? Thanks, drew