[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM |
Date: |
Mon, 30 Jul 2018 11:59:00 +0200 |
On Mon, 30 Jul 2018 10:41:45 +0200
Greg Kurz <address@hidden> wrote:
> On Mon, 30 Jul 2018 15:57:15 +1000
> David Gibson <address@hidden> wrote:
[...]
> > > > I'm pretty sure trying to change the accelerator on a qtest test just
> > > > doesn't make sense. We'd need a different approach for testing cpu
> > > > hotplug against kvm & tcg backends.
> > > >
> > >
> > > The test starts QEMU, triggers the CPU hotplug code with a QMP command
> > > and checks the command didn't fail (or QEMU didn't crash, as it would
> > > have before commit b585395b655a)... I really don't understand what
> > > is wrong with that... Please elaborate.
> >
> > Well, ok, let me turn that around. A test that doesn't rely on
> > controlling the guest side behaviour at all probably shouldn't be a
> > qtest based test, since that's what qtest is all about.
> >
>
> The CPU hotplug test doesn't seem to do anything on the guest side: it
> just checks that 'device_add' returns a response that isn't an error.
> I'm not aware that the guest is expected to have a specific behavior
> during 'device_add', apart from not crashing or hanging. That was the
> initial idea behind passing '-S' to ensure the guest doesn't run.
>
> Your remark seems to be more general though... are you meaning that
> doing something like qtest_start("-machine accel=kvm:tcg") is just
> wrong ?
The purpose of this test is simply to exercise a path in QEMU that
is only used with KVM, but it can also be achieved the other way
around:
@@ -189,7 +190,7 @@ static void xics_system_init(MachineState *machine, int
nr_irqs, Error **errp)
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
Error *local_err = NULL;
- if (kvm_enabled()) {
+ if (kvm_enabled() || qtest_enabled()) {
if (machine_kernel_irqchip_allowed(machine) &&
!xics_kvm_init(spapr, &local_err)) {
This will test the setup of the in-kernel XICS when run on a book3s host,
and fallback to emulated XICS otherwise (eg, travis).
Would this be more acceptable ?
pgpCCScYUafEl.pgp
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM, Greg Kurz, 2018/07/25
- Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM, David Gibson, 2018/07/30
- Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM, Greg Kurz, 2018/07/30
- Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM,
Greg Kurz <=
- Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM, David Gibson, 2018/07/30
- Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM, David Gibson, 2018/07/30