On Mon, Sep 22, 2014 at 01:41:05PM -0500, Joel Schopp wrote: > > > > >> LR is at vgic_v2_sync_lr_elrsr+0x20/0x28 > > This code snippet is only called when using level interrupts. kvmtool > > and older QEMU version only use edge triggered interrupts and thus never > > call this code. > > I don't have a newest QEMU version running yet (due to having fun > > cross-compiling the bloody glib), so cannot test here, but obviously it > > uses level interrupts somewhere. > > EDIT: it does: > > http://git.qemu.org/?p=qemu.git;a=commitdiff;h=0be969a2d974971628fc4ed95834d22ecf0fd497 > > > > Riku, can you dump the guest's device tree (-dumpdtb on QEMU cmdline) to > > confirm that a device uses a level interrupt? They should have a 4 (or > > 8) in the last of the three numbers in the interrupts property. > pl031@9010000 { > clock-names = "apb_pclk"; > clocks = <0x8000>; > interrupts = <0x0 0x2 0x4>; > reg = <0x0 0x9010000 0x0 0x1000>; > compatible = "arm,pl031", "arm,primecell"; > }; > > pl011@9000000 { > clock-names = "uartclk", "apb_pclk"; > clocks = <0x8000 0x8000>; > interrupts = <0x0 0x1 0x4>; > reg = <0x0 0x9000000 0x0 0x1000>; > compatible = "arm,pl011", "arm,primecell"; > }; > > > > > > I am just about to think about the best fix (__set_bit, reordering > > members of the struct). > > > > Christoffer, any suggestions? Prepare for a sprint to get a fix into > > before the release. Marc is out of office (Murphy's law). > I'd be happy to test a patch on short notice and add my Tested-by line > to it if it works. > Thanks, can you give this little patch a spin: diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c index 01124ef..416baed 100644 --- a/virt/kvm/arm/vgic-v2.c +++ b/virt/kvm/arm/vgic-v2.c @@ -71,7 +71,7 @@ static void vgic_v2_sync_lr_elrsr(struct kvm_vcpu *vcpu, int lr, struct vgic_lr lr_desc) { if (!(lr_desc.state & LR_STATE_MASK)) - set_bit(lr, (unsigned long *)vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr); + __set_bit(lr, (unsigned long *)vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr); } static u64 vgic_v2_get_elrsr(const struct kvm_vcpu *vcpu) Thanks! -Christoffer _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm