Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-26 Thread Eric Auger
Hi Pavel, On 06/25/2015 10:46 AM, Pavel Fedin wrote: Hi! But personally I would prefer we check irqchip routing entries have flat mapping, ie gsi = irqchip.pin since in any case we don't want/expect the userspace to play with that. Why? On x86 userspace perfectly can play with it. We

RE: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-25 Thread Pavel Fedin
Hi! But personally I would prefer we check irqchip routing entries have flat mapping, ie gsi = irqchip.pin since in any case we don't want/expect the userspace to play with that. Why? On x86 userspace perfectly can play with it. We can imagine some very new qemu version in future which has

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-24 Thread Eric Auger
Hi Pavel, On 06/24/2015 02:20 PM, Pavel Fedin wrote: Hello! What I can simply do is preventing any non identity mapping for irqchip routing entries, ie. gsi != irqchip.pin. This fixes the problem of KVM_IRQ_LINE. This check can happen in arm kvm_set_routing_entry() and that's it. You

RE: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-24 Thread Pavel Fedin
Hello! What I can simply do is preventing any non identity mapping for irqchip routing entries, ie. gsi != irqchip.pin. This fixes the problem of KVM_IRQ_LINE. This check can happen in arm kvm_set_routing_entry() and that's it. You cannot fix problem of KVM_IRQ_LINE because anyway with

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Eric Auger
Andre, On 06/23/2015 11:03 AM, Andre Przywara wrote: Hi Eric, I went back reading the code and looked at how the x86 APIC works more closely to understand the GSI routing better. See below for more ... On 22/06/15 10:21, Eric Auger wrote: On 06/22/2015 10:40 AM, Andre Przywara wrote: Hi

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Eric Auger
Salut Andre, On 06/23/2015 11:03 AM, Andre Przywara wrote: Hi Eric, I went back reading the code and looked at how the x86 APIC works more closely to understand the GSI routing better. See below for more ... On 22/06/15 10:21, Eric Auger wrote: On 06/22/2015 10:40 AM, Andre Przywara

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Andre Przywara
Hi Eric, I went back reading the code and looked at how the x86 APIC works more closely to understand the GSI routing better. See below for more ... On 22/06/15 10:21, Eric Auger wrote: On 06/22/2015 10:40 AM, Andre Przywara wrote: Hi Eric, I briefly looked over the series, the patches

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Eric Auger
Hi Favel, On 06/23/2015 10:50 AM, Pavel Fedin wrote: Hello! I was talking about what is done without this gsi direct mapping feature. In that case the low GSI numbers are used by irqchip routing entries. So kvm_irqchip_get_virq returns a gsi beyond the irqchip routed gsi's. But aren't

RE: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Pavel Fedin
Hello! I was talking about what is done without this gsi direct mapping feature. In that case the low GSI numbers are used by irqchip routing entries. So kvm_irqchip_get_virq returns a gsi beyond the irqchip routed gsi's. But aren't these low numbers just routed by the qemu too? I don't

RE: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Pavel Fedin
Hello! What is done currently at qemu level for other archs - if I understand it correctly - is there is static GSI routing for standard IRQ. Yes, this is correct. GSI number = SPI number for ARM. Also something similar for MIPS (haven't study that). For MSI irqfd setup they use spare

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-23 Thread Eric Auger
Hi Pavel, On 06/23/2015 09:38 AM, Pavel Fedin wrote: Hello! What is done currently at qemu level for other archs - if I understand it correctly - is there is static GSI routing for standard IRQ. Yes, this is correct. GSI number = SPI number for ARM. Also something similar for MIPS

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-22 Thread Eric Auger
Hi Pavel, On 06/19/2015 08:37 AM, Pavel Fedin wrote: Hello! The series therefore allows and mandates the usage of KVM_SET_GSI_ROUTING ioctl along with KVM_IRQFD. If the userspace does not define any routing table, no irqfd injection can happen. The user-space can use KVM_CAP_IRQ_ROUTING to

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-22 Thread Andre Przywara
Hi Eric, I briefly looked over the series, the patches itself look good overall. I have one or two comments on the actual code, but want to discuss the general approach first (more a dump of some first thoughts): On 18/06/15 18:40, Eric Auger wrote: With the advent of GICv3 ITS in-kernel

Re: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-22 Thread Eric Auger
On 06/22/2015 10:40 AM, Andre Przywara wrote: Hi Eric, I briefly looked over the series, the patches itself look good overall. I have one or two comments on the actual code, but want to discuss the general approach first (more a dump of some first thoughts): On 18/06/15 18:40, Eric Auger

RE: [RFC 0/6] KVM: arm/arm64: gsi routing support

2015-06-19 Thread Pavel Fedin
Hello! The series therefore allows and mandates the usage of KVM_SET_GSI_ROUTING ioctl along with KVM_IRQFD. If the userspace does not define any routing table, no irqfd injection can happen. The user-space can use KVM_CAP_IRQ_ROUTING to detect whether a routing table is needed. Yesterday,