[Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

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

 



On 11 December 2011 20:07, Christoffer Dall
<christofferdall at christofferdall.dk> 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


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux