aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-06-13 15:09:45 +0100
committerWill Deacon <will.deacon@arm.com>2016-06-14 10:26:34 +0100
commite4f04b1997082a93d8c7d58fe6666168c58b692c (patch)
treeb3bdff29924d8015fb9a123e550514bb6d08b04a
parent289c5e5a98d93be55d2e23d9e745a925ac2630cb (diff)
downloadkvmtool-e4f04b1997082a93d8c7d58fe6666168c58b692c.tar.gz
kvmtool/arm: Fix timer trigger
KVM exposes a level triggered timer to the guest, and yet kvmtool presents it as being edge-triggered in the DT. Let's fix it and match what the kernel exposes. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arm/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arm/timer.c b/arm/timer.c
index 29991dab..71bfe8d4 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -15,19 +15,19 @@ void timer__generate_fdt_nodes(void *fdt, struct kvm *kvm, int *irqs)
u32 irq_prop[] = {
cpu_to_fdt32(GIC_FDT_IRQ_TYPE_PPI),
cpu_to_fdt32(irqs[0]),
- cpu_to_fdt32(cpu_mask | IRQ_TYPE_EDGE_RISING),
+ cpu_to_fdt32(cpu_mask | IRQ_TYPE_LEVEL_LOW),
cpu_to_fdt32(GIC_FDT_IRQ_TYPE_PPI),
cpu_to_fdt32(irqs[1]),
- cpu_to_fdt32(cpu_mask | IRQ_TYPE_EDGE_RISING),
+ cpu_to_fdt32(cpu_mask | IRQ_TYPE_LEVEL_LOW),
cpu_to_fdt32(GIC_FDT_IRQ_TYPE_PPI),
cpu_to_fdt32(irqs[2]),
- cpu_to_fdt32(cpu_mask | IRQ_TYPE_EDGE_RISING),
+ cpu_to_fdt32(cpu_mask | IRQ_TYPE_LEVEL_LOW),
cpu_to_fdt32(GIC_FDT_IRQ_TYPE_PPI),
cpu_to_fdt32(irqs[3]),
- cpu_to_fdt32(cpu_mask | IRQ_TYPE_EDGE_RISING),
+ cpu_to_fdt32(cpu_mask | IRQ_TYPE_LEVEL_LOW),
};
_FDT(fdt_begin_node(fdt, "timer"));