Re: [PATCH v1 03/11] KVM: x86: dynamic kvm_apic_map

From: Paolo Bonzini
Date: Fri Jul 01 2016 - 03:33:30 EST




On 30/06/2016 22:54, Radim KrÄmÃÅ wrote:
> x2APIC supports up to 2^32-1 LAPICs, but most guest in coming years will
> have slighly less VCPUs. Dynamic size saves memory at the cost of
> turning one constant into a variable.
>
> apic_map mutex had to be moved before allocation to avoid races with cpu
> hotplug.
>
> Signed-off-by: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>

It's important to note another change here, which is that you start
using the phys_map for x2apic clustered mode. It's so important that
you could make it a separate patch while keeping the phys_map static! :)

Paolo