On Wed, 26 Jan 2022 at 09:14, Igor Mammedov <imamm...@redhat.com> wrote: > > On Wed, 26 Jan 2022 13:24:10 +0800 > Gavin Shan <gs...@redhat.com> wrote: > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > > index 141350bf21..b4a95522d3 100644 > > --- a/hw/arm/virt.c > > +++ b/hw/arm/virt.c > > @@ -2499,7 +2499,7 @@ virt_cpu_index_to_props(MachineState *ms, unsigned > > cpu_index) > > > > static int64_t virt_get_default_cpu_node_id(const MachineState *ms, int > > idx) > > { > > - return idx % ms->numa_state->num_nodes; > > + return idx / (ms->smp.dies * ms->smp.clusters * ms->smp.cores * > > ms->smp.threads); > > I'd like for ARM folks to confirm whether above is correct > (i.e. socket is NUMA node boundary and also if above topo vars > could have odd values. Don't look at horribly complicated x86 > as example, but it showed that vendors could stash pretty much > anything there, so we should consider it here as well and maybe > forbid that in smp virt-arm parser)
Is there anybody on the CC list who can answer this definitively? Certainly I have no idea about this virtual topology stuff -- from my point of view I just want VMs to be able to have multiple CPUs and I don't know anything about how real hardware might choose to do NUMA topology either now or in future... Put another way: this patch isn't on my list to do anything with; please ping me when a decision has been made about whether it should be applied or not. thanks -- PMM