Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-24 Thread Andre Przywara
Hi, On 03/08/15 18:06, Marc Zyngier wrote: On 03/08/15 16:37, Eric Auger wrote: Andre, Pavel, On 08/03/2015 11:16 AM, Pavel Fedin wrote: Hello! Again the case that leaves me uncomfortable is the one where the userspace does not provide the devid whereas it must (GICv3 ITS case).

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-17 Thread Eric Auger
On 07/10/2015 04:21 PM, Andre Przywara wrote: When userland wants to inject a MSI into the guest, we have to use our data structures to find the LPI number and the VCPU to receive the interrupt. Use the wrapper functions to iterate the linked lists and find the proper Interrupt Translation

RE: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-04 Thread Pavel Fedin
Hello! I think this flag should be kept, as it really indicates what is valid in the MSI structure. It also has other benefits such as making obvious what userspace expects, which can then be checked against the kernel's own expectations. I'm OK with the flag despite it's indeed a small

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-03 Thread Eric Auger
Andre, Pavel, On 08/03/2015 11:16 AM, Pavel Fedin wrote: Hello! Again the case that leaves me uncomfortable is the one where the userspace does not provide the devid whereas it must (GICv3 ITS case). Hypothetical broken userland which does not exist for now ? Yes but that's the rule to

RE: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-03 Thread Pavel Fedin
Hello! Again the case that leaves me uncomfortable is the one where the userspace does not provide the devid whereas it must (GICv3 ITS case). Hypothetical broken userland which does not exist for now ? IMHO the userland should just know, that if it supports ITS, it has to provide devIDs.

RE: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-03 Thread Pavel Fedin
Hi! When I reworked our code to only use a flag and not a separate routing type I ended up with the flag only guarding assignments, which wouldn't hurt if done unconditionally (since they are all u32's). So the whole usage of the flag is somewhat in jeopardy now. Either the eventual MSI

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-03 Thread Eric Auger
Hi Andre, Pavel, On 08/03/2015 08:41 AM, Pavel Fedin wrote: Hi! When I reworked our code to only use a flag and not a separate routing type I ended up with the flag only guarding assignments, which wouldn't hurt if done unconditionally (since they are all u32's). So the whole usage of the

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-03 Thread Marc Zyngier
On 03/08/15 16:37, Eric Auger wrote: Andre, Pavel, On 08/03/2015 11:16 AM, Pavel Fedin wrote: Hello! Again the case that leaves me uncomfortable is the one where the userspace does not provide the devid whereas it must (GICv3 ITS case). Hypothetical broken userland which does not exist

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-02 Thread Andre Przywara
On 31/07/15 14:22, Eric Auger wrote: Salut Eric, On 07/10/2015 04:21 PM, Andre Przywara wrote: When userland wants to inject a MSI into the guest, we have to use our data structures to find the LPI number and the VCPU to receive the interrupt. Use the wrapper functions to iterate the linked

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-07-31 Thread Eric Auger
Hi Andre, On 07/10/2015 04:21 PM, Andre Przywara wrote: When userland wants to inject a MSI into the guest, we have to use our data structures to find the LPI number and the VCPU to receive the interrupt. Use the wrapper functions to iterate the linked lists and find the proper Interrupt

[PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-07-10 Thread Andre Przywara
When userland wants to inject a MSI into the guest, we have to use our data structures to find the LPI number and the VCPU to receive the interrupt. Use the wrapper functions to iterate the linked lists and find the proper Interrupt Translation Table Entry. Then set the pending bit in this ITTE to