On 2/25/19 5:59 AM, Paul Mackerras wrote: > On Mon, Feb 25, 2019 at 11:35:27AM +1100, David Gibson wrote: >> On Fri, Feb 22, 2019 at 12:28:27PM +0100, Cédric Le Goater wrote: >>> + xc->xive = xive; >>> + xc->vcpu = vcpu; >>> + xc->server_num = cpu; >>> + xc->vp_id = xive->vp_base + cpu; >> >> Hrm. This ties the internal VP id to the userspace chosen server >> number, which isn't ideal. It puts a constraint on those server >> numbers that you wouldn't otherwise have. > > We should probably do the same as the xics-on-xive code, which is to > put the server number through kvmppc_pack_vcpu_id(), which is a > folding function that maps the QEMU vcpu id (which is the server > number) down to the range 0..KVM_MAX_VCPUS-1, and works for the > allocation patterns used in the various vSMT modes. yes. I will see how it goes. Thanks, C.