Commit Graph

6 Commits

Author SHA1 Message Date
Michal Privoznik
682dd480ac qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST
Currently, we have maybe a dozen tests for hugepages related stuff in
qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to
enumerate all capabilities needed (though, it's usually just
QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE,
exceptionally QEMU_CAPS_DEVICE_PC_DIMM too).

Instead of deleting the caps flags one-by-one, just switch the
tests to use DO_CAPS_LATEST().

Since some of our expected output files are just a symlink to their
respective input files, these are changed too. But from QEMU's
POV nothing changes as no .args file is changed.

Oh, and I'm also adding a 'hugepages-memaccess3' test case, which
was missing, surprisingly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-04 15:27:42 +01:00
Peter Krempa
c9880b647b qemuxml2argvdata: Use proper arch and emulator for x86 real capability tests
Upcoming patches will modify how we populate the capability cache in
tests to be more saner. This also means that the emulator binary and
architecture used in the test files using real capabilities must match
what the real capabilities have.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-01-07 09:25:14 +01:00
Daniel P. Berrangé
e88367095f qemu: populate <audio> element with default config
Currently the QEMU driver secretly sets the QEMU_AUDIO_DRV env variable

 - VNC - set to "none", unless passthrough of host env variable is set
 - SPICE - always set to "spice"
 - SDL - always passthrough host env
 - No graphics - set to "none", unless passthrough of host env variable is set

The setting of the QEMU_AUDIO_DRV env variable is done in the code which
configures graphics.

If no <audio> element is present, we now auto-populate <audio> elements
to reflect this historical default config. This avoids need to set audio
env when processing graphics.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-03-09 22:58:30 +00:00
Daniel P. Berrangé
fbf27730a3 conf: add support for specifying CPU "dies" parameter
Recently CPU hardware vendors have started to support a new structure
inside the CPU package topology known as a "die". Thus the hierarchy
is now:

  sockets > dies > cores > threads

This adds support for "dies" in the XML parser, with the value
defaulting to 1 if not specified for backwards compatibility.

For example a system with 64 logical CPUs might report

   <topology sockets="4" dies="2" cores="4" threads="2"/>

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-16 15:11:42 +00:00
Daniel P. Berrangé
0279a51b83 tests: fix name of 32-bit x86 QEMU binary
The 32-bit x86 binary is called qemu-system-i386, not
qemu-system-i686. This mistake across many test XML files was
not noticed because the mistake was also made in testutilsqemu.c
when mocking the capabilities.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-03 13:57:44 +00:00
Michal Privoznik
9eae8398ed qemu: Prefer nvdimmPath over hugepages for memory-backend-file
If a domain has hugepages configured and we're currently building
memory-backend-file for a nvdimm device that domain has we will
put hugepages path onto the command line. It should have been
nvdimm path configured in the XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-08-13 16:33:45 +02:00