On 06/09/19 18:34, Sean Christopherson wrote: > The max number of CPUs is not actually enforced anywhere, e.g. manually > setting '-smp 240' when running a unit test will cause random corruption > and hangs during smp initialization. Increase the max number of test > CPUs to 255, which is the true max kvm-unit-tests can support without > significant changes, e.g. it would need to boot with x2APIC enabled, > support interrupt remapping, etc... > > There is no known use case for running with more than 64 CPUs, but the > cost of supporting 255 is minimal, e.g. increases the size of each test > binary by a few kbs and burns a few extra cycles in init_apic_map(). > > Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> > --- > lib/x86/apic-defs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/x86/apic-defs.h b/lib/x86/apic-defs.h > index 7107f0f..b2014de 100644 > --- a/lib/x86/apic-defs.h > +++ b/lib/x86/apic-defs.h > @@ -6,7 +6,7 @@ > * both in C and ASM > */ > > -#define MAX_TEST_CPUS (64) > +#define MAX_TEST_CPUS (255) > > /* > * Constants for various Intel APICs. (local APIC, IOAPIC, etc.) > Since this is not a multiple of 8 anymore, the previous patch should have used (max_cpus + 7) / 8. Fixed that and queued. Paolo