Re: [Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

Andrew Jones
2015-08-02T16:40:21Z

On Fri, Jul 31, 2015 at 09:17:12PM +0200, Andrew Jones wrote:
> On Fri, Jul 31, 2015 at 04:53:59PM +0100, Alex Bennée wrote:
> > From: Alex Bennée <alex@bennee.com>
> >
> > The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default
> > maximum VCPU configuration is 4 on arm64 machines which typically have
> > more actual cores.
>
> The kernel should probably bump that up to 8, but that's an aside,
> as it wouldn't resolve the general issue.
>
> For this patch, I don't think we need a C utility as we can probe
> with QEMU, and thus just need a script.
>
> $QEMU -machine virt,accel=kvm -smp 9
> Number of SMP cpus requested (9), exceeds max cpus supported by machine `virt' (8)
>
> The script can live in $root/scripts/, which is a directory recently
> created for standalone test support.

I decided to take a stab at this and came up with

https://github.com/rhdrjones/kvm-unit-tests/commit/336d87338da86a0e7f2018a1e509b606b9a2baa2

Thanks,
drew