qemu_cpu.cfg: set auto_cpu_model = no

Without this option, autotest will set a "cpu_model" config option by
itself.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu/cpuid: use utils_misc.get_qemu_cpu_models() function

With this change, the test_qemu_cpu_models_list() command won't include
the full QEMU "-cpu ?" output in the test failure message anymore, but
it can be found in the test logs if necessary.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu/cpuid: default_vendor: support both single-model and multi-model mode

I don't know yet what will be the best way to configure the tests, but
this changes the test code to allow both modes to be used: a single
model can be set using the "cpu_model" option, or multiple models may be
tested using the "cpu_models" option. Or, if cpu_models is "*", all
models reported by QEMU can be tested (that was the current behavior
when cpu_models was not set).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu/cpuid: check_models: use cpu_models_to_test()

This way we can use the "cpu_model" config option to check for a single
CPU model, if necessary.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu/cpuid: default_vendor: accept "host" as special vendor value

This allows us to make the configuration clearer than just omitting the
vendor value.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: put "cpuid defaults" and "cpuid custom" in a "cpuid" block

This shouldn't have any visible change, but it will make it easier to
review the changes made later when introducing the per-CPU-model
variants.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: create per-CPU-model variants

This will allow us to more easily filter and combine CPU models with the
multiple test cases we have. We can easily introduce new tests that will
automatically be run once for each known CPU model.

Test cases that don't need to be re-run for each CPU model can use the
"cpu.unset" variant that doesn't set any specific cpu_model option.

This also introduces "kvm" and "nokvm" variants, to allow test cases to
be run with KVM disabled and enabled, if necessary.

This way the test output will now look like this:

    (1/94) qemu_cpu.check_models.kvm.cpu.intel.486.qemu13: PASS (0.42 s)
    (2/94) qemu_cpu.check_models.kvm.cpu.intel.core2duo.qemu13: PASS (0.44 s)
    [...]
    (49/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.intel.core2duo.qemu13: PASS (20.63 s)
    (50/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.intel.kvm32.qemu13: PASS (21.66 s)
    [...]
    (62/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.intel.SandyBridge.qemu13: PASS (20.58 s)
    (63/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.intel.Haswell.qemu13: PASS (20.52 s)
    (64/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.amd.qemu64.qemu13: PASS (21.51 s)
    (65/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.amd.phenom.qemu13: PASS (20.53 s)
    [...]
    (71/94) qemu_cpu.cpuid.default.vendor.nokvm.cpu.amd.Opteron_G5.qemu13: PASS (21.59 s)
    (72/94) qemu_cpu.cpuid.custom.vendor.normal.kvm.cpu.unset.qemu13: PASS (20.53 s)
    (73/94) qemu_cpu.cpuid.custom.vendor.tooshort.kvm.cpu.unset.qemu13: PASS (0.87 s)
    (74/94) qemu_cpu.cpuid.custom.vendor.empty.kvm.cpu.unset.qemu13: PASS (0.81 s)
    (75/94) qemu_cpu.cpuid.custom.level.level5.kvm.cpu.unset.qemu13: PASS (20.60 s)
    [...]

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
qemu_cpu.cfg: run cpuid.custom test cases with and without KVM

This will help us check if we didn't break anything in KVM-specific or
TCG-specific code inside QEMU.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>