On 10/1/25 14:37, Peter Xu wrote:
I only have a very preliminary understanding on this, so please bare with
me if I'll make silly mistakes...
I was expecting QEMU provides both the global view (address_space_memory),
and the per-vcpu view.
My hypothesis is that separate views for each cpu doesn't make sense.
In the true symmetric multiprocessor case, which is the vast majority of everything we
emulate in QEMU, each processor has the exact same view(s).
In the rare asymmetric multiprocessor case, of which we have a few, we have a couple of
clusters and within each cluster all cpus share the exact same view(s).
Thus access to address spaces on a per-cpu basis makes sense, but allocating them on a
per-cpu basis does not.
We have another question to ask besides this design discussion: Peter's
series here solidly fixes a memory leak that can easily reproduce with
x86_64 + KVM on cpu hotplugs.
Should we still merge it first considering it didn't change how we manage
per-vcpu address spaces, but only fixing it? Then anything like a big
overhaul can happen on top too.
Sure, I'm happy with that. I just wanted to raise the related problem that we encountered
over this past week.
r~