copy-ref-dumps: don't copy empty files

Empty dump files are not useful for the test code.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
qemu_cpu.cfg: fix typo on cpu64-rhel5 variant name

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
qemu_cpu.cfg: unify similar rules in a single one

Simplify the config file a little bit.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
cpuid: don't setup USB devices

The CPUID dump test kernel doesn't need USB devices.

This allows some older QEMU versions to be tested.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
cpuid: handle "restricted to guest" message as TestNAError too

The RHEL-6 qemu-kvm binary prints that message when SVM is not available
and can't be used. Treat this case as TestNAError too, as it means the
test can't be run, not a test failure.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
qemu_cpu.cfg: ignore known Opteron_G* CPUID difference introduce on RHEL-6.1

Those bits were changed on RHEL-6.1 without any compat code, so we need
to ignore the differences we find.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
cpuid: check_cpuid_dump: use cpu_model_flags

Use cpu_model_flags when running the test and reading CPUID dumps.

In some cases it will be useful to check if dumps are OK on specific
cases where flags are removed (e.g. removing the "svm" flag when running
without -enable-nesting). This change will allow dumps for those special
cases to be used if cpu_model_flags is configured on qemu_cpu.cfg.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
dump-cpus-from-qemu: allow list of CPU models to be specified via env var

Helpful for testing and for saving time when just a few CPU models need
to be dumped again.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
dump-cpus-from-qemu: dump some additional special cases

They will be useful when some features are not available on the host.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
cpuid: added new CPUID dumps

This includes:

 * Opteron_G* CPU model dumps
 * Dumps for CPUs having 3dnow & 3dnowext (they couldn't be generated
   previously because the machine didn't have 3dnow available)
 * Some new special-cases that will be used (e.g. removing the "svm"
   and/or "monitor" flags) when the original CPU model can't be tested
   as-is

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
qemu_cpu.cfg: exceptions for cases where the full CPU model can't be tested

Add extra CPU model flags to some CPU models when the full CPU model
can't be tested easily.

Note that the code loads the reference files using the CPU flags as part
of the file name too (so we can be sure we're reading the right dump
file)  This way we can be sure we are comparing the output of "-cpu
Foo,-flag" against a dump that was surely generated using "-cpu
Foo,-flag" as well (not just "-cpu Foo").

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>