[PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation
From: andre.przywara@arm.com (Andre Przywara)
Date: 2015-08-24 14:14:19
Also in:
kvm, kvmarm
From: andre.przywara@arm.com (Andre Przywara)
Date: 2015-08-24 14:14:19
Also in:
kvm, kvmarm
Hi, On 03/08/15 18:06, Marc Zyngier wrote:
On 03/08/15 16:37, Eric Auger wrote:quoted
Andre, Pavel, On 08/03/2015 11:16 AM, Pavel Fedin wrote:quoted
Hello!quoted
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 be not confident in *any* userspace, isn't it?
Well, that's only regarding safety, not regarding functionality, right? So if we could break the kernel by not providing the flag and/or devid, this needs to be fixed. But if it just doesn't work, that's OK.
quoted
As of now I prefer keeping the flags at uapi level and propagate it downto the kernel, as long as I don't have any answer for the unset devid discrimination question. Please apologize for my stubbornness ;-)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 agree on this. Usually this kind of redundancy leads to strange code, but this does not seem to apply here, since we can at least still guard the assignments to demonstrate that the devid field needs to go along with the flag. Cheers, Andre.