[PATCH] kvmtool/arm: Fix timer trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 arm/timer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arm/timer.c b/arm/timer.c
index 29991da..71bfe8d 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"));
-- 
2.1.4

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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux