On 09/06/15 14:16, Peter Maydell wrote: > On 9 June 2015 at 13:27, Marc Zyngier <marc.zyng...@arm.com> wrote: >> On 09/06/15 12:24, Peter Maydell wrote: >>> So either: >>> * QEMU needs to tell the kernel the MPIDR for each vCPU >>> * QEMU needs to ask the kernel the MPIDR for each vCPU >>> >>> Which is better? The latter is simpler and will work with >>> existing kernels. The former would let us (for instance) >>> use KVM when we're modelling (real world) boards which have >>> particular cluster configurations (which might not match the >>> kernel's current simplistic "always 16 CPUs at Aff0" setup). >> >> Given that it is userspace that provides the description of the >> platform, it feels natural to let userspace set MPIDR accordingly. >> >> This will require some interesting rework in the kernel, but this >> doesn't feel too bad. > > On the other hand QEMU needs to keep working with current kernels, > so we need the "ask the kernel" code at least for the moment. > Probably needs a capability for "kernel allows userspace to > set MPIDR" so we can adapt.
Yeah, what I had in mind was something along the lines of: - kernel computes its "default MPDIR" - kernel exposes a new capability "KVM_ARM_ALLOW_MPIDR_OVERRIDE" (or something along those lines) - userspace does the right thing. M. -- Jazz is not dead. It just smells funny...