The new optional property "always-on" indicates that the timers
are, well, always on when used with KVM.

This allows for substantial performance improvement in the guest
(it switches to NOHZ instead of using a periodic tick per vcpu)
and removes a lot of burden from the host (no need to inject tons
of interrupts with the associated rescheduling overhead).

Old kernels that don't understand this property will simply ignore it.

Signed-off-by: Marc Zyngier <marc.zyng...@arm.com>
---
 tools/kvm/arm/timer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/kvm/arm/timer.c b/tools/kvm/arm/timer.c
index d757c1d..209251e 100644
--- a/tools/kvm/arm/timer.c
+++ b/tools/kvm/arm/timer.c
@@ -33,6 +33,7 @@ void timer__generate_fdt_nodes(void *fdt, struct kvm *kvm, 
int *irqs)
        _FDT(fdt_begin_node(fdt, "timer"));
        _FDT(fdt_property(fdt, "compatible", compatible, sizeof(compatible)));
        _FDT(fdt_property(fdt, "interrupts", irq_prop, sizeof(irq_prop)));
+       _FDT(fdt_property(fdt, "always-on", NULL, 0));
        if (kvm->cfg.arch.force_cntfrq > 0)
                _FDT(fdt_property_cell(fdt, "clock-frequency", 
kvm->cfg.arch.force_cntfrq));
        _FDT(fdt_end_node(fdt));
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to