Commit Graph

119 Commits

Author SHA1 Message Date
Andrea Bolognani
36e9b16e24 tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3
Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Note that as a gicv3 machine was not available the schema data is taken
from the gicv2 case. It should be identical since qemu would be built
from the same source.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:52:40 +01:00
Andrea Bolognani
10b108a603 tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2
Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:52:40 +01:00
Prasanna Kumar Kalever
74bbb8c2ec qemu: capabilities: Detect support for gluster debug setting
Teach qemu driver to detect whether qemu supports specifying debug level
for gluster volumes.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:52:40 +01:00
Peter Krempa
70c7025d3b qemu: capabilities: Add support for QMP schema introspection
Allow detecting capabilities according to the qemu QMP schema. This is
necessary as sometimes the availability of certain options depends on
the presence of a field in the schema.

This patch adds support for loading the QMP schema when detecting qemu
capabilities and adds a very simple query language to allow traversing
the schema and selecting a certain element from it.

The infrastructure in this patch uses a query path to set a specific
capability flag according to the availability of the given element in
the schema.
2016-11-09 16:51:54 +01:00
Peter Krempa
4182ffa0a8 tests: qemucaps: Temporarily remove 'query-qmp-schema' from test data
Remove the command from the supported commands list temporarily so that
QMP introspection code can be added without breaking tests and having to
tweak the test data in the same commit.

This will be later reverted and test data will be added. The aarch64
code is special as it calls additional commands and thus the test data
can't be added upfront.
2016-11-09 16:50:32 +01:00
Andrea Bolognani
4a3d34729a tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Pavel Hrdina
782579bec6 tests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Pavel Hrdina
a2cc6bf953 tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Pavel Hrdina
56ef5184e1 tests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86
Add output of 'query-qmp-schema' to the capabilities test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Andrea Bolognani
30d0a8f9e4 tests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release
Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Andrea Bolognani
33877c815d tests: qemucaps: Update ppc64 replies for qemu 2.6.0 release
Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2016-11-09 16:50:32 +01:00
Martin Kletzander
22d94ca46d qemu: Add capabilities for ivshmem-{plain,doorbell}
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-11-02 16:05:39 +01:00
John Ferlan
d379552b41 caps: Add new capability for the bps/iops throttling length
Add the capability to detect if the qemu binary can support the feature
to use bps-max-length and friends.
2016-10-25 17:16:26 -04:00
Pavel Hrdina
6869428c12 qemu_capabilities: check for existence of virtio-vga
Commit 21373feb added support for primary virtio-vga device but it was
checking for virtio-gpu.  Let's check for existence of virtio-vga if we
want to use it.

Virtio video device is currently represented by three different models
*virtio-gpu-device*, *virtio-gpu-pci* and *virtio-vga*.  The first two
models are tied together and if virtio video devices is compiled in they
both exist.  However, the *virtio-vga* model doesn't have to exist on
some architectures even if the first two models exist.  So we cannot
group all three together.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-10-12 17:46:48 +02:00
Pavel Hrdina
f5eae0a595 qemu_capabilities: detect properties for virtio-gpu-device
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-10-12 17:46:47 +02:00
Pavel Hrdina
05af6784b1 qemu_capabilities: mark QEMU_CAPS_VGA_QXL capability as deprecated
If QEMU in question supports QMP, this capability is set if
QEMU_CAPS_DEVICE_QXL was set based on existence of "-device qxl". If
libvirt needs to parse *help*, because there is no QMP support, it
checks for existence of "-vga qxl", but it also parses output of
"-device ?" and sets QEMU_CAPS_DEVICE_QXL too.

Now that libvirt supports only QEMU that has "-device" implemented it's
safe to drop this capability and stop using it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-10-12 17:46:47 +02:00
Pavel Hrdina
34a4447bd4 qemu_capabilities: join capabilities for qxl and qxl-vga devices
This patch simplifies QEMU capabilities for QXL video device.  QEMU
exposes this device as *qxl-vga* and *qxl* and they are both the same
device with the same set of parameters, the only difference is that
*qxl-vga* includes VGA compatibility.

Based on QEMU code they are tied together so it's safe to check only for
presence of only one of them.

This patch also removes an invalid test case "video-qxl-sec-nodevice"
where there is only *qxl-vga* device and *qxl* device is not present.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-10-12 17:46:47 +02:00
Daniel P. Berrange
5dee668632 qemu: fix command line building for iommu devices
The intel-iommu device has existed since QEMU 2.2.0, but
it was only possible to create it with -device since
QEMU 2.7.0, thanks to:

  commit 621d983a1f9051f4cfc3f402569b46b77d8449fc
  Author: Marcel Apfelbaum <marcel@redhat.com>
  Date:   Mon Jun 27 18:38:34 2016 +0300

    hw/iommu: enable iommu with -device

    Use the standard '-device intel-iommu' to create the IOMMU device.
    The legacy '-machine,iommu=on' can still be used.

The libvirt capability check & command line formatting code
is thus broken for all QEMU versions 2.2.0 -> 2.6.0 inclusive.

This fixes it to use iommu=on instead.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-10-07 16:52:35 +01:00
Pavel Hrdina
4e4b7fbf01 test: update capability replies for qemu-2.7.0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-09-20 11:46:30 +02:00
Peter Krempa
920bbe5c15 qemu: capabilities: Extract availability of new cpu hotplug for machine types
QEMU reports whether 'query-hotpluggable-cpus' is supported for a given
machine type. Extract and cache the information using the capability
cache.

When copying the capabilities for a new start of qemu, mask out the
presence of QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS if the machine type
doesn't support hotpluggable cpus.
2016-08-24 15:44:47 -04:00
Peter Krempa
f17ddfeee3 qemu: Add capability for query-hotpluggable-cpus command 2016-08-24 15:44:47 -04:00
Ján Tomko
41f5c2ca27 Introduce QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
Check whether the disable-legacy property is present on the following
devices:
  virtio-balloon-pci
  virtio-blk-pci
  virtio-scsi-pci
  virtio-serial-pci
  virtio-9p-pci
  virtio-net-pci
  virtio-rng-pci
  virtio-gpu-pci
  virtio-input-host-pci
  virtio-keyboard-pci
  virtio-mouse-pci
  virtio-tablet-pci

Assuming that if QEMU knows other virtio devices where this property
is applicable, it will have at least one of these devices.

Added in QEMU by:
commit e266d421490e0ae83044bbebb209b2d3650c0ba6
    virtio-pci: add flags to enable/disable legacy/modern
2016-08-17 18:13:06 +02:00
Peter Krempa
2cda2628db tests: qemucapabilities: Add data for qemu 2.7.0
As of (v2.7.0-rc1-52-g42e0d60)
2016-08-05 09:47:08 +02:00
Michal Privoznik
d0e4be9d02 Introduce SMM feature
Since its release of 2.4.0 qemu is able to enable System
Management Module in the firmware, or disable it. We should
expose this capability in the XML. Unfortunately, there's no good
way to determine whether the binary we are talking to supports
it. I mean, if qemu's run with real machine type, the smm
attribute can be seen in 'qom-list /machine' output. But it's not
there when qemu's run with -M none. Therefore we're stuck with
version based check.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-08-04 17:14:20 +02:00
Ján Tomko
8e7e79738d Add QEMU_CAPS_DEVICE_INTEL_IOMMU
Check whether QEMU supports -device intel-iommu

Note that the presence of this option does not mean that it's
usable because of a bug in earlier QEMU versions, but it's
better than nothing.

https://bugzilla.redhat.com/show_bug.cgi?id=1235580
2016-07-12 12:36:13 +02:00
Peter Krempa
e114b09157 qemu: caps: Always assume QEMU_CAPS_SMP_TOPOLOGY
Support for SMP topology was added by qemu commit dc6b1c09849484fbbc50
prior to 0.12.0, our minimum supported qemu version.

$ git describe --tags dc6b1c09849484fbbc50803307e4c7a3d81eab62
v0.11.0-rc0-449-gdc6b1c0
$ git describe --tags --contains dc6b1c09849484fbbc50803307e4c7a3d81eab
v0.12.0-rc0~1477
2016-07-07 15:08:35 +02:00
Paolo Bonzini
ca57b5d60c qemu: detect -display
Add a new capability for the -display command line option, which has
been present since QEMU 1.0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-07-07 11:51:39 +02:00
John Ferlan
d2e14efb05 caps: Add capability for tls-x509-creds
Add the capability flag and checks for the qemu object 'tls-creds-x509'

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-06-14 08:41:45 -04:00
Martin Kletzander
6445ad488f qemu: Add support for zero-detection writes
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-14 08:25:25 +02:00
Pavel Hrdina
61a63abfe8 qemu_capabilites: add QEMU_CAPS_SPICE_UNIX
Add a new capability to detect support of unix sockets for spice
graphics.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:43:09 +02:00
Martin Kletzander
6e81a1f9ef qemu: Check for qxl's max_outputs parameter
Add capabilities for both qxl and qxl-vga devices.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-07 12:40:01 +02:00
Pavel Hrdina
c81415065e qemucapstest: replace caps-1.6.50 with updated caps-1.7.0
The qemu-1.6.50 is a beta before the new minor version, let's replace it with
the release qemu-1.7.0.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-25 17:04:22 +02:00
Pavel Hrdina
750b83137b qemucapstest: update caps for qemu-2.6.0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:03 +02:00
Pavel Hrdina
733b2a9174 qemucapstest: update caps for qemu-2.5.0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:03 +02:00
Pavel Hrdina
b728ede9f2 qemucapstest: update caps for qemu-2.4.0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:03 +02:00
Pavel Hrdina
e1d09e88a0 qemucapstest: update caps for qemu-2.1.1 2016-05-24 15:46:03 +02:00
Pavel Hrdina
233851b4c7 qemucapstest: update caps for qemu-1.6.0
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:03 +02:00
Pavel Hrdina
f91284045c qemucapstest: update caps for qemu-1.5.3
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:02 +02:00
Pavel Hrdina
5063c49375 qemucapstest: update caps for qemu-1.4.2
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:02 +02:00
Pavel Hrdina
6815c9e0eb qemucapstest: update caps for qemu-1.3.1
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:02 +02:00
Pavel Hrdina
98e638d655 qemucapstest: update caps for qemu-1.2.2
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-24 15:46:02 +02:00
Ján Tomko
5572cd7f0e Deprecate QEMU_CAPS_DEVICE
We support qemu version 0.12.0+, which has it.
2016-05-23 10:38:45 +02:00
Ján Tomko
e9488fcd20 Deprecate QEMU_CAPS_DRIVE_READONLY
We have been assuming its support if qemu supports -device,
which all the supported versions do.
2016-05-23 10:37:09 +02:00
Andrea Bolognani
0e8a72a5ef qemu: Drop QEMU_CAPS_VIRTIO_BLK_SG_IO
The only QEMU versions that don't have such capability are <0.11,
which we no longer support anyway
2016-05-17 00:01:45 +02:00
Andrea Bolognani
859743c27c qemu: Drop QEMU_CAPS_CPU_HOST
The only QEMU versions that don't have such capability are <0.11,
which we no longer support anyway
2016-05-17 00:01:45 +02:00
Andrea Bolognani
8531b85ba6 qemu: Drop QEMU_CAPS_PCI_ROMBAR
The only QEMU versions that don't have such capability are <0.12,
which we no longer support anyway.

Additionally, this solves the issue of some QEMU binaries being
reported as not having such capability just because they lacked
the {kvm-}pci-assign QMP object.
2016-05-17 00:01:45 +02:00
Cole Robinson
e3a6859019 qemu: command: Use -name guest= if available
-name guest= is the explicit parameter for passing a VM name. Using
it is required to allow a VM with an '=' in the name

https://bugzilla.redhat.com/show_bug.cgi?id=1276485
2016-05-16 10:30:38 -04:00
Jiri Denemark
1522503189 qemuaincapstest: Give better names to test data files
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-05-16 10:37:29 +02:00
Jiri Denemark
3d59cce230 qemucapabilitiestest: Add tests for aarch64 and ppc64le
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-05-06 10:38:30 +02:00
Jiri Denemark
7aa86f6358 qemucapabilitiestest: Rename *.caps to *.xml
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-05-06 10:38:30 +02:00