On 11 December 2011 20:07, Christoffer Dall <christofferdall@xxxxxxxxxxxxxxxxxx> wrote: > Well, if it was just "irq & 1", then I hear you, but it would be "(irq > >> cpu_idx) & 1" which I don't think is more clear. Er, what? The fields are [31..1] CPU index and [0] irqtype, right? So what you have now is: vcpu_idx = irq_level->irq / 2; irqtype = irq_level->irq % 2; and the bitshifting equivalent is: vcpu_idx = irq_level->irq >> 1; irqtype = irq_level->irq & 1; surely? Shifting by the cpuindex is definitely wrong. (Incidentally I fixed a bug in your QEMU-side code which wasn't feeding this field to the kernel in the way it expects: http://git.linaro.org/gitweb?p=qemu/qemu-linaro.git;a=commitdiff;h=2502ba067e795e48d346f9816fad45177ca64bca Sorry, I should have posted that to the list. I'll do that now.) -- PMM -- 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