Commit Graph

499 Commits

Author SHA1 Message Date
Pavel Hrdina
0b0a633d1a tests: add AMD SEV bits into qemu-6.0.0 replies
Currently we only have AMD SEV bits in qemu-2.12.0 replies which is way
too old to test new features that require AMD SEV as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-06-15 11:33:27 +02:00
Pavel Hrdina
b560d1c876 qemu_capabilities: detect if confidential-guest-support is available
virQEMUCapsProbeQMPMachineProps currently skips any not supported
machine type which includes `none` as well.

In order to start probing that machine type we need to add an exception
to not skip it when probing QEMU capabilities.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-06-15 11:33:17 +02:00
Han Han
456d6c142e qemu_capabilities: Add QEMU_CAPS_VIRTIO_VGA_GL
It will be used for virtio-vga-gl device later.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-06-11 13:06:47 +02:00
Han Han
0263d6a93d qemu_capabilities: Add QEMU_CAPS_VIRTIO_GPU_GL_PCI
This flag will be used for the device virtio-gpu-gl-pci which is introduced
since QEMU 6.1.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-06-11 13:06:44 +02:00
Kristina Hanicova
3bfbc3c0ef qemu_capabilities: Add QEMU_CAPS_INPUT_LINUX
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-21 14:29:09 +02:00
Shalini Chellathurai Saroja
8a7fb16ada tests: Add capabilities for QEMU 6.0.0 on s390x
Introduce replies and xml files for QEMU 6.0.0 on s390x.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-05-19 10:40:50 +02:00
Peter Krempa
d53afa1e66 tests: qemucapabilities: Add test-data for the qemu-6.1 cycle
Add test data based on qemu commit v6.0.0-540-g6005ee07c3.

Notable changes are the removal of 'sheepdog' disk storage protocol.

Additionally the cpu model reported when probing seems to have changed
from:

"model-id": "AMD Ryzen 9 3900X 12-Core Processor            "

to:

"model-id": "QEMU TCG CPU version 2.5+"

despite building on the same machine. This probably also results in the
2 test changes in the CPU definition which popped up in this update.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-19 10:21:32 +02:00
Peter Krempa
b6a02345dc qemucapabilitiesdata: Update x86_64 capabilities for qemu-6.0 release
Update to the final state now that qemu 6.0 was released.

Notable changes are the addition of 'EPYC-Rome-v2' cpu type and removal
of 'query-netdev' which we didn't use.

The rest is the usual churn caused by random registration of objects at
compile time.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
4a0d9a123c qemu: capabilities: Retire QEMU_CAPS_NUMA_DIST
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
f20f266e66 qemu: capabilities: Retire QEMU_CAPS_EGL_HEADLESS
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

In addition the capability wasn't even used to gate any functionality
except for reporting the presence in the domain capabilities XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
994996ac9e qemu: capabilities: Retire QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
f69be987bc qemu: capabilities: Retire QEMU_CAPS_SDL_GL
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
78309f01a1 qemu: capabilities: Retire QEMU_CAPS_MACHINE_SMM_OPT
The feature is present in all supported QEMU versions and there isn't a
more elegant way to detect it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
4819a6c06f qemu: capabilities: Retire QEMU_CAPS_VHOSTUSER_MULTIQUEUE
All supported qemus have it, there isn't an elegant way to detect it and
it's unlikely to be ever removed on purpose.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
ab5afec1b3 qemu: capabilities: Fix detection of 'vmport'
'query-commandline-options' never returned 'vmport' but we can detect it
in the list of supported object types. This removes it from all non-x86
originating test data as it's platform specific.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
fb292c659f qemu: capabilities: Probe QMP schema before probing commands
All supported QEMU versions now support query-qmp-schema. In the future
it will be possible to use the output of query-qmp-schema to also detect
commands reliably.

Since we are at the point where we have the least amount of .replies
files needing changing for a long time, move the 'query-qmp-schema' bits
before 'query-commands' to prepare for the future.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
6073378990 qemu: capabilities: Always assume QEMU_CAPS_QUERY_QMP_SCHEMA
All supported qemu versions have 'query-qmp-schema' so we can remove the
check whether it exists and all logic conntected to it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
7b23eb4b8a qemu: capabilities: Retire QEMU_CAPS_DEVICE_VIDEO_PRIMARY
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
999f444a09 qemu: capabilities: Move setting of QEMU_CAPS_MACH_VIRT_GIC_VERSION to virQEMUCapsInitQMPBasicArch
Move it under AARCH 64, since it's a platform specific feature, thus it
will be removed from all other platforms.

Since virQEMUCapsInitQMPBasicArch is used in qemuxml2argv test to
initiate qemuCaps for tests with fake capabilities, all the tests gain
GIC support now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
184de10c1d qemucapabilitiesdata: Drop capability test data for qemu < 2.11
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:44 +02:00
Peter Krempa
096ac87a1a tests: qemucapabilitiesdata: Fix wrong command identifier in caps_4.0.0.riscv64.replies
Commit cbd4ab4cc6 added a hunk with a broken reply ID.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-04-12 16:09:42 +02:00
Peter Krempa
aa21615ccb tests: qemucapabilitiesdata: Fix formatting of manually added hunk
Commit 66c5674e79 added a query for the device properties of 'usb-host'
but the command header isn't formated the same way as if it were
autogenerated. Reformat all the files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-04-12 16:09:42 +02:00
Daniel P. Berrangé
1b80c6f0d0 qemu: probe for "acpi-index" property
This property is exposed by QEMU on any PCI device, but we have to pick
some specific device(s) to probe it against. We expect that at least one
of the virtio devices will be present, so probe against them.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-04-07 18:11:11 +01:00
Peter Krempa
a82a0b248e tests: qemucapabilitiesdata: Update qemu capabilities on x86_64 to 6.0.0-rc2
'block_passwd' command was removed 'display-reload' command was added
and the 'acpi-index' property for PCI devices was added.

There are no noticable changes for us.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-04-07 12:45:29 +02:00
Peter Krempa
d8793c6832 qemu: capabilities: Introduce QEMU_CAPS_COMPAT_DEPRECATED
The capability is asserted if qemu supports the -compat
deprecated-input= and deprecated-output= settings to control what should
happen if deprecated fields are used in QMP.

This will be used for a developer/tester-oriented setting which will
aid us in catching use of deprecated settings sooner.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2021-04-06 17:07:01 +02:00
Daniel P. Berrangé
8dac0ca1b2 qemu: implement setting of rotation rate for SCSI/IDE disks
This is available in QEMU with "ide-hd" and "scsi-hd" device
types. It was originally mistakenly added to the "scsi-block"
device type too, but later removed. This doesn't affect libvirt
since we restrict usage to device=disk.

When this property is not set then QEMU's default behaviour
is to not report any rotation rate information, which
causes most guest OS to assume rotational storage.

https://bugzilla.redhat.com/show_bug.cgi?id=1498955

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-04-01 15:11:38 +01:00
Peter Krempa
f763b6e439 qemu: capabilities: Enable detection of QEMU_CAPS_OBJECT_QAPIFIED
Base the detection on the presence of the 'secret' qom-type entry, which
isn't conditionally compiled in qemu.

All caps-based test now switch to using JSON for -object.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-03-23 14:06:31 +01:00
Peter Krempa
5ff9dd1ece tests: qemucapabilities: Update qemu caps for object-add qapification
qemu qapified object-add, which means that it's introspectable via
query-qmp-schema. Update the qemu-6.0 capabilities to commit
v5.2.0-3205-g92566947b3

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-03-23 14:06:31 +01:00
Peter Krempa
12758f040a qemu: capabilities: Introduce QEMU_CAPS_BLOCKDEV_BACKUP
Upcoming commit will enable full backup support (incremental part
requires blockdev-reopen, which won't happen in qemu for at least
another release).

Add a capability that the 'blockdev-backup' job is supported by qemu
capped, but limited to when qemu supports QEMU_CAPS_BLOCKDEV.

We can also use it in the expression to enable
QEMU_CAPS_INCREMENTAL_BACKUP since it's a pre-requisite too.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-03-19 16:41:39 +01:00
Daniel P. Berrangé
e07994aade qemu: probe for -vnc audiodev property
The -audiodev arg is a new way to configure audio devices in QEMU to
replace the QEMU_AUDIO_DRV env variable. This arg is not visible in
the "query-command-line-options" output since it is entirely QAPI
driven, not QemuOpts. It also isn't in "query-qmp-schema" though
since there's no QMP command that uses the Audiodev type yet.

So probe for the existance of this feature by looking for the
-vnc "audiodev" property. This won't let us determine which
precise audio backends QEMU has been built with, but for now
that's no worse than with env variables today.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-03-09 22:58:33 +00:00
Daniel P. Berrangé
bad5280a53 qemu: probe for -vnc power-control option support
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-03-08 21:04:06 +00:00
Peter Krempa
9e855e7589 qemu: capabilities: Introduce QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
The capability represents qemu's ability to setup mappings for migrating
block dirty bitmaps and is based on presence of the 'transform' property
of the 'block-bitmap-mapping' property of 'migrate-set-parameters' QMP
command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2021-02-20 13:20:32 +01:00
Peter Krempa
c49af8d2bd qemucapabilitiesdata: Update test data for qemu-6.0 on x86_64
Include the 'transform' member of 'block-bitmap-mapping'. This is based
on qemu commit v5.2.0-2208-gc79f01c945

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2021-02-20 13:20:32 +01:00
Daniel P. Berrangé
a4f57fa37d qemu: probe for -vnc supporting use of QemuOpts syntax
This was introduced in QEMU 2.2.0, and is visible by -vnc appearing in
the "query-command-line-options" data.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-16 14:02:59 +00:00
Michal Privoznik
204dfbe15d qemu_capabilities: Introduce QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID
This capability tracks whether memory-backend-file has
"x-use-canonical-path-for-ramblock-id" attribute. Introduced into
QEMU by commit fa0cb34d2210cc749b9a70db99bb41c56ad20831. As of
QEMU commit 8db0b20415c129cf5e577a593a4a0372d90b7cc9 the property
is considered stable by qemu despite the 'x-' prefix to preserve
compatibility with released qemu versions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-02-11 08:42:06 +01:00
Daniel P. Berrangé
c32f172d12 qemu: wire up support for maximum CPU model
The "max" model can be treated the same way as "host" model in general.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-10 11:44:48 +00:00
Peter Krempa
a619e28dba qemucapabilitiesdata: Update 6.0.0 x86_64 capability test data
Update to qemu commit v5.2.0-1684-gd0dddab40e which includes the removal
of pc-1.0/pc-1.1/pc-1.2 machine types, adds the new QMP commands for
internal snapshots as well as includes the background-snapshot
capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-02-09 11:30:19 +01:00
Pavel Hrdina
c8b0d5b0ad qemu_capabilities: introduce vhost-user-blk capability
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-02-03 18:56:34 +01:00
Daniel P. Berrangé
1e260cc449 qemu: report whether a machine type is deprecated in capabilities
QEMU has the ability to mark machine types as deprecated. This should be
exposed to management applications in the capabilities.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-03 17:30:52 +00:00
Daniel P. Berrangé
5138a09260 qemu: report whether a CPU model is deprecated in dom capabilities
QEMU has the ability to mark CPUs as deprecated. This should be exposed
to management applications in the domain capabilities.

This attribute is only set when the model is actually deprecated.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-03 17:26:39 +00:00
Ján Tomko
42dd7d797b qemu: add QEMU_CAPS_VHOST_USER_FS_BOOTINDEX
Introduced by QEMU commit:

commit 6da32fe5efdd71c9d254a436ce972194ff631285
Author:     Laszlo Ersek <lersek@redhat.com>
AuthorDate: 2021-01-12 14:16:03 +0100
Commit:     Michael S. Tsirkin <mst@redhat.com>
CommitDate: 2021-01-13 09:06:37 -0500

    vhost-user-fs: add the "bootindex" property

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-29 14:34:14 +01:00
Peter Krempa
715b5a9a08 tests: qemucapabilities: Add test data for qemu-6.0 release cycle
Add the capabilities test data for the next qemu development cycle so
that we stay up to date.

Based on v5.2.0-1374-g9cd69f1a27

Notable changes detected by libvirt are the new machine types and
'intel-pt-lip', 'avx512-fp16', 'kvm-msi-ext-dest-id' cpu features
reported by qemu.

Other qemu changes not detected by libvirt include removal of the
'change' command, addition of 'sev-inject-launch-secret', 'yank',
'query-yank' commands and other device properties.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-28 10:51:30 +01:00
Michal Privoznik
f06c1d908f qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_PMEM_PCI
This commit introduces a new capability that reflects virtio-pmem-pci
device support in qemu:

  QEMU_CAPS_DEVICE_VIRTIO_PMEM_PCI, /* -device virtio-pmem-pci */

The virtio-pmem-pci device was introduced in QEMU 4.1.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-01-18 11:53:31 +01:00
Shalini Chellathurai Saroja
9d5f9b7ae8 tests: add capabilities for QEMU 5.2.0 on s390x
Let us introduce the xml and reply files for QEMU 5.2.0 on s390x.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-12-17 12:10:40 +01:00
Peter Krempa
04fd7865f2 tests: qemucapabilities: Update capabilities for qemu-5.2 release (x86_64)
qemu-5.2 is out! Let's update the capabilities for the final version.

Note that the 'enable-fips' feature vanishing in this update is expected
as the removal was tied to a version check (see commit 7b1ed1cd73 ).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-12 16:10:36 +01:00
Andrea Bolognani
e3b9d3002a tests: Add capabilities for QEMU 5.2 on riscv64
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-11 15:04:28 +01:00
Andrea Bolognani
d1fac45c0d tests: Add capabilities for QEMU 5.2 on ppc64
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-11 15:04:26 +01:00
Andrea Bolognani
0c0651eae3 tests: Add capabilities for QEMU 5.2 on aarch64
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-11 15:04:23 +01:00
Daniel P. Berrangé
a46ca90d27 tests: add capabilities data files for sparc emulator target
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-20 12:09:51 +00:00
Daniel P. Berrangé
98caef4a55 qemu: add capabilities for the three ESP family SCSI controllers
Probing for the NCR53C90 controller is a little unusual. The
qom-list-types QMP command returns a list of all types known to
the QEMU binary. It does not distinguish devices which are user
creatable from those which are built-in.

Any QEMU target that supports PCI will have the DC390 / AM53C974
devices because they are PCI based. Due to code dependencies
in QEMU though, existence of these two devices will also pull in
the NCR53C90 device (called just 'esp' in QEMU). The NCR53C90 is
not user-creatable and can only be used when built-in to the
machine type.

This is only the case on sparc machines, and certain mips64 and
m68k machines.  IOW, we don't rely on qom-list-types as a guide
for existence of NCR53C90, as it shouldn't really exist in most
QEMU binaries.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-20 12:09:51 +00:00