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

2012-02-08 Thread Peter Maydell
On 12 December 2011 17:40, Avi Kivity a...@redhat.com wrote: On 12/12/2011 06:31 PM, Peter Maydell wrote: I think with an in-kernel GIC model you'd only need to be able to set one of the (256 including internal-to-the-CPU inputs) GIC input lines; the GIC itself then connects directly to the

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

2011-12-29 Thread Christoffer Dall
On Dec 12, 2011, at 12:40 PM, Avi Kivity wrote: On 12/12/2011 06:31 PM, Peter Maydell wrote: On 11 December 2011 23:01, Jan Kiszka jan.kis...@web.de wrote: Enabling in-kernel irqchips usually means switching worlds. So the semantics of these particular IRQ inject interface details may change

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

2011-12-12 Thread Marc Zyngier
On 11/12/11 20:07, Christoffer Dall wrote: On Dec 11, 2011, at 2:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 11:03 AM, Peter Maydell peter.mayd...@linaro.org wrote: Removing

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

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 6:06 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 11/12/11 20:07, Christoffer Dall wrote: On Dec 11, 2011, at 2:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11,

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

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 8:28 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:24 PM, Christoffer Dall wrote: Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU

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

2011-12-12 Thread Avi Kivity
On 12/12/2011 04:38 PM, Christoffer Dall wrote: Why don't they match? The assignment of lines to actual pins differs, but essentially it's the same thing (otherwise we'd use a different ioctl). because there is no notion of gsi and irq_source_id on ARM. gsi = number of irq line, just

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

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 9:50 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 04:38 PM, Christoffer Dall wrote: Why don't they match?  The assignment of lines to actual pins differs, but essentially it's the same thing (otherwise we'd use a different ioctl). because there is no

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

2011-12-12 Thread Avi Kivity
On 12/12/2011 05:11 PM, Christoffer Dall wrote: If I should re-use the existing one, should I simply move it outside of __KVM_HAVE_IOAPIC? Protect it with __KVM_HAVE_IRQ_LINE so we don't leak unused tracepoints for other archs. ok. I used to be scared of touching your arch

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

2011-12-12 Thread Peter Maydell
On 11 December 2011 23:01, Jan Kiszka jan.kis...@web.de wrote: Enabling in-kernel irqchips usually means switching worlds. So the semantics of these particular IRQ inject interface details may change without breaking anything. However, things might look different if there will be a need to

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

2011-12-12 Thread Avi Kivity
On 12/12/2011 06:31 PM, Peter Maydell wrote: On 11 December 2011 23:01, Jan Kiszka jan.kis...@web.de wrote: Enabling in-kernel irqchips usually means switching worlds. So the semantics of these particular IRQ inject interface details may change without breaking anything. However, things

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

2011-12-11 Thread Christoffer Dall
On Dec 11, 2011, at 2:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 11:03 AM, Peter Maydell peter.mayd...@linaro.org wrote: Removing the mask would be wrong since the irq field

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

2011-12-11 Thread Peter Maydell
On 11 December 2011 20:07, Christoffer Dall christofferd...@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:

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

2011-12-11 Thread Christoffer Dall
On Sun, Dec 11, 2011 at 3:25 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 20:07, Christoffer Dall christofferd...@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?

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

2011-12-11 Thread Peter Maydell
On 11 December 2011 21:36, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 3:25 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 20:07, Christoffer Dall christofferd...@christofferdall.dk wrote: Well, if it was just irq 1, then I hear you,

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

2011-12-11 Thread Peter Maydell
On 11 December 2011 22:12, Peter Maydell peter.mayd...@linaro.org wrote: (Actually what would be clearest would be if the ioctl took the (interrupt-target, interrupt-line-for-that-target, value-of-line) tuple as three separate values rather than encoding two of them into a single integer, but

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

2011-12-11 Thread Christoffer Dall
On Sun, Dec 11, 2011 at 5:35 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 22:12, Peter Maydell peter.mayd...@linaro.org wrote: (Actually what would be clearest would be if the ioctl took the (interrupt-target, interrupt-line-for-that-target, value-of-line) tuple as

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

2011-12-11 Thread Jan Kiszka
On 2011-12-11 23:53, Christoffer Dall wrote: On Sun, Dec 11, 2011 at 5:35 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 22:12, Peter Maydell peter.mayd...@linaro.org wrote: (Actually what would be clearest would be if the ioctl took the (interrupt-target,

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

2011-12-11 Thread Alexander Graf
On 11.12.2011, at 20:48, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 11:03 AM, Peter Maydell peter.mayd...@linaro.org wrote: Removing the mask would be wrong since the irq field here