[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [kvm-unit-tests PATCH v5 07/11] arm/arm64: g
Re: [Qemu-arm] [Qemu-devel] [kvm-unit-tests PATCH v5 07/11] arm/arm64: gicv2: add an IPI test
Mon, 14 Nov 2016 15:12:00 +0100
On Fri, Nov 11, 2016 at 02:13:31PM +0100, Andrew Jones wrote:
> On Fri, Nov 11, 2016 at 11:13:46AM +0000, Andre Przywara wrote:
> > Hi,
> > more a comment loosely related to this patch ...
> > > diff --git a/arm/unittests.cfg b/arm/unittests.cfg
> > > index 3f6fa45c587e..68bf5cd6008f 100644
> > > --- a/arm/unittests.cfg
> > > +++ b/arm/unittests.cfg
> > > @@ -54,3 +54,10 @@ file = selftest.flat
> > > smp = $MAX_SMP
> > > extra_params = -append 'smp'
> > > groups = selftest
> > > +
> > > +# Test GIC emulation
> > > +[gicv2-ipi]
> > > +file = gic.flat
> > > +smp = $((($MAX_SMP < 8)?$MAX_SMP:8))
> > So here we always go with the maximum number of VCPUs in the guest.
> > However (as you also noted in your cover-letter) running with a
> > different number of CPUs might be interesting, for instance with less
> > than 8 CPUs on a GICv2 (the ITARGETSR register must be masked) or in
> > general with an odd number (both literally and in the broader sense). I
> > have a test case with passes with 8 VCPUs but fails with less.
> > Is there any good way to run some tests multiple times with different
> > numbers of VCPUS?
> > Shall we add some "set" functionality to the smp parameter, so that we
> > can specify a list of desired test points?
> We can just add multiple entries, e.g.
> file = gic.flat
> smp = $((($MAX_SMP < 8)?$MAX_SMP:8))
> file = gic.flat
> smp = $((($MAX_SMP > 3)?3:$MAX_SMP))
> or whatever. But we need to always consider MAX_SMP, since some
> machines may less than 8.
Hmm, thinking about this some more, the unit test needs to know how
many processors the test wants, in order to ensure it's testing
correctly. We should provide the number to both -smp and -append,
like we do for selftest-setup.
So, we can have one test that doesn't care, just uses MAX_SMP or 8,
like this patch introduces, but then for each test that does care we
smp = 3
extra_params = '... smp=3 ...'
Then the unit test will start exactly 2 secondaries (or abort if
they're not available)
Anyway, I don't think this is something we should extend the framework
for, but rather address it with unittests.cfg and unit test input
Re: [Qemu-arm] [kvm-unit-tests PATCH v5 06/11] arm/arm64: add initial gicv2 support, Andre Przywara, 2016/11/11
[Qemu-arm] [kvm-unit-tests PATCH v5 08/11] libcflat: add IS_ALIGNED() macro, and page sizes, Andrew Jones, 2016/11/10
[Qemu-arm] [kvm-unit-tests PATCH v5 07/11] arm/arm64: gicv2: add an IPI test, Andrew Jones, 2016/11/10
[Qemu-arm] [kvm-unit-tests PATCH v5 09/11] arm/arm64: add initial gicv3 support, Andrew Jones, 2016/11/10
[Qemu-arm] [kvm-unit-tests PATCH v5 10/11] arm/arm64: gicv3: add an IPI test, Andrew Jones, 2016/11/10