All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer
@ 2016-01-21 12:54 Andrew Jones
  2016-01-22  1:28 ` Shannon Zhao
  2016-01-25 11:56 ` Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Jones @ 2016-01-21 12:54 UTC (permalink / raw)
  To: qemu-devel, qemu-arm; +Cc: peter.maydell, zhaoshenglong

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 <drjones@redhat.com>
---
 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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer
  2016-01-21 12:54 [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer Andrew Jones
@ 2016-01-22  1:28 ` Shannon Zhao
  2016-01-25 11:56 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Shannon Zhao @ 2016-01-22  1:28 UTC (permalink / raw)
  To: Andrew Jones, qemu-devel, qemu-arm; +Cc: peter.maydell



On 2016/1/21 20:54, Andrew Jones wrote:
> 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.
> 
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>

> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  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;
> 

-- 
Shannon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer
  2016-01-21 12:54 [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer Andrew Jones
  2016-01-22  1:28 ` Shannon Zhao
@ 2016-01-25 11:56 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-01-25 11:56 UTC (permalink / raw)
  To: Andrew Jones; +Cc: qemu-arm, QEMU Developers, Shannon Zhao

On 21 January 2016 at 12:54, Andrew Jones <drjones@redhat.com> wrote:
> 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 <drjones@redhat.com>



Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-25 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21 12:54 [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer Andrew Jones
2016-01-22  1:28 ` Shannon Zhao
2016-01-25 11:56 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.