]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 years agoqemu: domain: Export qemuDomainDeviceDefValidateDisk
Peter Krempa [Thu, 19 Apr 2018 11:44:04 +0000 (13:44 +0200)]
qemu: domain: Export qemuDomainDeviceDefValidateDisk

It will be used in the qemublocktest.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: Makefile: Sanitize entry for qemublocktest
Peter Krempa [Fri, 23 Mar 2018 07:16:09 +0000 (08:16 +0100)]
tests: Makefile: Sanitize entry for qemublocktest

Remove gnulib from _LDADD and move LDADDS to replace it. Also reformat
the _SOURCES so that they can be easily extended.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: qemublock: Rename variables in anticipation of new tests
Peter Krempa [Fri, 16 Mar 2018 16:11:29 +0000 (17:11 +0100)]
tests: qemublock: Rename variables in anticipation of new tests

New tests will add new data structures so rename the 'data' structure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Add support for creating 'format' layer for blockdev-add
Peter Krempa [Mon, 23 Oct 2017 10:26:10 +0000 (12:26 +0200)]
qemu: block: Add support for creating 'format' layer for blockdev-add

When using blockdev-add and friends, libvirt will need to create also
properties for the qcow2/raw/... format handler in qemu. This patch adds
the infrastructure and implements all formats known to libvirt including
all properties which are expressed at the format level in qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Always set discard for storage nodes
Peter Krempa [Thu, 19 Apr 2018 13:44:36 +0000 (15:44 +0200)]
qemu: block: Always set discard for storage nodes

Enabling discard for the storage node allows the format drivers to
discard snapshots and other things, while configuration of the format
layer actually decides whether to actually discard data on request from
the host.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Format 'read-only' attribute for JSON disk protocol
Peter Krempa [Fri, 6 Apr 2018 04:40:23 +0000 (06:40 +0200)]
qemu: block: Format 'read-only' attribute for JSON disk protocol

This will be required when doing blockdev-add to conform with the
approach qemu choses to create the disks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Format cache modes for disk storage backends
Peter Krempa [Wed, 25 Apr 2018 15:04:35 +0000 (17:04 +0200)]
qemu: block: Format cache modes for disk storage backends

When used directly with blockdev-add/-blockdev the cache mode will need
to be specified directly for every image rather than just for the disk
itself. This implements the backing options 'direct' and 'no-flush'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Validate node-names for use with qemu
Peter Krempa [Wed, 28 Mar 2018 07:04:49 +0000 (09:04 +0200)]
qemu: block: Validate node-names for use with qemu

qemu declares node-name as a 32 byte buffer and silently truncates
anything longer than that. This is unacceptable for libvirt, so we need
to make sure that we won't ever supply a node-name exceeding 31 chars.

Add a function which will do the validation and use it to validate
storage-protocol node names.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Propagate 'legacy' parameter when formatting disk backing
Peter Krempa [Thu, 22 Mar 2018 15:42:47 +0000 (16:42 +0100)]
qemu: block: Propagate 'legacy' parameter when formatting disk backing

The gluster protocol in qemu uses two styles, one of which is legacy and
not covered by the QAPI schema.

To allow using of the new style in the blockdev-add code, add a
parameter for qemuBlockStorageSourceGetBackendProps which will switch
between the two modes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Properly handle block storage in JSON generator
Peter Krempa [Tue, 24 Apr 2018 15:12:19 +0000 (17:12 +0200)]
qemu: block: Properly handle block storage in JSON generator

Block storage should actually be passed to qemu via 'host_device' or
'host_cdrom' according to the device type. There were no users of this
behaviour so we thankfully can change it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: domain: Store whether a virStorageSource is a host CDROM drive
Peter Krempa [Tue, 24 Apr 2018 14:59:00 +0000 (16:59 +0200)]
qemu: domain: Store whether a virStorageSource is a host CDROM drive

Use virFileIsCDROM to detect whether a block device is a cdrom drive and
store it in virStorageSource. This will be necessary to correctly create
the 'host_cdrom' backend in qemu when using -blockdev.

We assume that host_cdrom makes only sense when used directly as a raw
image, but if a backing chain would be put in front of it, libvirt will
use 'host_device' in that case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutil: file: Add helper to determine whether a path is a CDROM
Peter Krempa [Mon, 23 Apr 2018 15:41:14 +0000 (17:41 +0200)]
util: file: Add helper to determine whether a path is a CDROM

Add detection mechanism which will allow to check whether a path to a
block device is a physical CDROM drive. This will be useful once we will
need to pass it to hypervisors.

The linux implementation uses an ioctl to do the detection, while the
fallback uses a simple string prefix match.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutil: file: Use only one #ifdef for __linux__
Peter Krempa [Mon, 23 Apr 2018 15:10:07 +0000 (17:10 +0200)]
util: file: Use only one #ifdef for __linux__

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Add support for accessing directories via the 'vvfat' driver
Peter Krempa [Thu, 29 Mar 2018 06:44:02 +0000 (08:44 +0200)]
qemu: block: Add support for accessing directories via the 'vvfat' driver

Handle VIR_STORAGE_TYPE_DIR in qemuBlockStorageSourceGetBackendProps so
that a 'vvfat' driver is used, which emulates a FAT filesystem
containing the folders.

qemu requires us to add it as a storage layer, since a 'raw' layer is
usually put on top of it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: Move virtual FAT disk validation from command line builder
Peter Krempa [Wed, 18 Apr 2018 11:22:29 +0000 (13:22 +0200)]
qemu: Move virtual FAT disk validation from command line builder

Move it to the validation callback and make it more robust. This will
also put the checks in the correct place to use with -blockdev.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutils: storage: Mark that a virStorageSource is going to be used as a floppy
Peter Krempa [Thu, 19 Apr 2018 13:31:55 +0000 (15:31 +0200)]
utils: storage: Mark that a virStorageSource is going to be used as a floppy

Add a flag denoting that a virStorageSource is going to be used as a
floppy image. This will be useful in cases where the user passes in
files which shall be exposed as an image to the guest.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Handle iomode property for json 'file' driver
Peter Krempa [Tue, 5 Dec 2017 16:05:12 +0000 (17:05 +0100)]
qemu: block: Handle iomode property for json 'file' driver

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: block: Extract formatting of props for 'file' backend
Peter Krempa [Tue, 5 Dec 2017 16:02:28 +0000 (17:02 +0100)]
qemu: block: Extract formatting of props for 'file' backend

'file' backend in qemu supports few more options than the current
implementation. Extract it so that changes don't pollute the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: domain: Carefuly transfer configuration from disk to storage source
Peter Krempa [Fri, 23 Mar 2018 16:00:29 +0000 (17:00 +0100)]
qemu: domain: Carefuly transfer configuration from disk to storage source

Some properties don't make sense to be configured for every single layer
of the backing chain, but to avoid needing to pass the disk structure we
will copy them to the individual virStorageSource.

Zero detection is applied only for the top layer image, while caching
and iomode for all layers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutil: storage: Add shadow copies of few disk properties to virStorageSource
Peter Krempa [Tue, 5 Dec 2017 13:06:13 +0000 (14:06 +0100)]
util: storage: Add shadow copies of few disk properties to virStorageSource

Few things which are currently stored the virDomainDiskDef structure are
actually relevant for the storage source as well. Add the fields with a
note that they are just mirror of the values from the disk.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: domain: Format storage source node names into private data
Peter Krempa [Thu, 1 Mar 2018 17:39:45 +0000 (18:39 +0100)]
qemu: domain: Format storage source node names into private data

Save and restore node names if we know them or when we will be
generating them in the status XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agostorage: Properly track that backing chain members are readonly
Peter Krempa [Wed, 11 Apr 2018 13:35:02 +0000 (15:35 +0200)]
storage: Properly track that backing chain members are readonly

Everything besides the top of the chain is readonly. Track this when
parsing the XML and detecting the chain from the disk. Also fix the
state when taking snapshots.

All other cases where the top image is changed already preserve the
readonly state from the original image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoDeprecate QEMU_CAPS_TDF
Ján Tomko [Thu, 3 May 2018 10:12:29 +0000 (12:12 +0200)]
Deprecate QEMU_CAPS_TDF

This capability is unused since we stopped parsing -help output.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoDeprecate QEMU_CAPS_NO_KVM_PIT
Ján Tomko [Thu, 3 May 2018 08:38:42 +0000 (10:38 +0200)]
Deprecate QEMU_CAPS_NO_KVM_PIT

The -no-kvm-pit-reinjection option has been deprecated since
its introduction in QEMU 1.3. See commit <1569fa1>.

Drop the capability since all the QEMUs we support allow tuning
the kvm-pit properties via -global.

Also add the QEMU_CAPS_KVM_PIT_TICK_POLICY to the clock-catchup
tests, since expecting it to succeed with QEMU that does not
have kvm-pit makes no sense.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemuBuildMachineCommandLine: use a switch for virDomainVirtType
Ján Tomko [Thu, 3 May 2018 08:05:51 +0000 (10:05 +0200)]
qemuBuildMachineCommandLine: use a switch for virDomainVirtType

Enumerate all the cases and use virReportEnumRangeError.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: remove qemuBuildObsoleteAccelArg
Ján Tomko [Thu, 3 May 2018 08:05:27 +0000 (10:05 +0200)]
qemu: remove qemuBuildObsoleteAccelArg

Since we started assuming QEMU_CAPS_MACHINE_OPT in
commit <69420756>, this function can only be reached
for unsupported virt types.

Replace the call with a virReportError.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agostorage: remove qemu-img help scraping
Ján Tomko [Tue, 17 Apr 2018 21:00:33 +0000 (23:00 +0200)]
storage: remove qemu-img help scraping

We have been checking whether qemu-img supports the -o compat
option by scraping the -help output.

Since we require QEMU 1.5.0 now and this option was introduced in 1.1,
assume we support it and ditch the help parsing code along with the
extra qemu-img invocation.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: assume FMT_COMPAT for qemu-img tests
Ján Tomko [Tue, 17 Apr 2018 21:32:23 +0000 (23:32 +0200)]
tests: assume FMT_COMPAT for qemu-img tests

No point in testing outdated command lines.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: delete most qemu-img test cases assuming FMT_OPTIONS
Ján Tomko [Tue, 17 Apr 2018 21:25:45 +0000 (23:25 +0200)]
tests: delete most qemu-img test cases assuming FMT_OPTIONS

We have two leftover "capabilites" for qemu-img:
QEMU_IMG_BACKING_FORMAT_OPTIONS
QEMU_IMG_BACKING_FORMAT_OPTIONS_COMPAT

The former says we are able to specify the backing format via -o
(which has been the case for a long time now) and the second one
says we can use -o compat to specify the qcow2 version.

Since we require QEMU 1.5.0, we can always assume -o compat,
which was introduced in QEMU 1.1.

Drop the test cases using FMT_OPTIONS which have a FMT_COMPAT
counterpart to prepare for deprecating FMT_OPTIONS (and these flags)
completely.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agolxc: convert to typesafe virConf accessors in lxc_native.c
Prafullkumar Tale [Fri, 4 May 2018 13:16:51 +0000 (18:46 +0530)]
lxc: convert to typesafe virConf accessors in lxc_native.c

Signed-off-by: Prafullkumar Tale <talep158@gmail.com>
7 years agovirsh: Simplify control flow for 'qemu-agent-command' command
Lin Ma [Fri, 4 May 2018 09:28:52 +0000 (17:28 +0800)]
virsh: Simplify control flow for 'qemu-agent-command' command

Signed-off-by: Lin Ma <lma@suse.com>
7 years agovirsh: Simplify control flow for 'desc' command
Lin Ma [Fri, 4 May 2018 09:28:51 +0000 (17:28 +0800)]
virsh: Simplify control flow for 'desc' command

Just like the commit 8941c800, It does the similar thing.

Signed-off-by: Lin Ma <lma@suse.com>
7 years agovirsh: Error out while domain not found for 'event' command
Lin Ma [Fri, 4 May 2018 09:28:49 +0000 (17:28 +0800)]
virsh: Error out while domain not found for 'event' command

Signed-off-by: Lin Ma <lma@suse.com>
7 years agovirsh: Error out while domain not found for 'qemu-monitor-event' command
Lin Ma [Fri, 4 May 2018 09:28:48 +0000 (17:28 +0800)]
virsh: Error out while domain not found for 'qemu-monitor-event' command

Signed-off-by: Lin Ma <lma@suse.com>
7 years agoconf: Clean up object referencing for Add and Remove
John Ferlan [Mon, 23 Apr 2018 14:40:48 +0000 (10:40 -0400)]
conf: Clean up object referencing for Add and Remove

When adding a new object to the domain object list, there should
have been 2 virObjectRef calls made one for each list into which
the object was placed to match the 2 virObjectUnref calls that
would occur during Remove as part of virHashRemoveEntry when
virObjectFreeHashData is called when the element is removed from
the hash table as set up in virDomainObjListNew.

Some drivers (libxl, lxc, qemu, and vz) handled this inconsistency
by calling virObjectRef upon successful return from virDomainObjListAdd
in order to use virDomainObjEndAPI when done with the returned @vm.
While others (bhyve, openvz, test, and vmware) handled this via only
calling virObjectUnlock upon successful return from virDomainObjListAdd.

This patch will "unify" the approach to use virDomainObjEndAPI
for any @vm successfully returned from virDomainObjListAdd.

Because list removal is so tightly coupled with list addition,
this patch fixes the list removal algorithm to return the object
as entered - "locked and reffed".  This way, the callers can then
decide how to uniformly handle add/remove success and failure.
This removes the onus on the caller to "specially handle" the
@vm during removal processing.

The Add/Remove logic allows for some logic simplification such
as in libxl where we can Remove the @vm directly rather than
needing to set a @remove_dom boolean and removing after the
libxlDomainObjEndJob completes as the @vm is locked/reffed.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agolibxl: Add refcnt for args->conn during migration
John Ferlan [Mon, 23 Apr 2018 15:58:54 +0000 (11:58 -0400)]
libxl: Add refcnt for args->conn during migration

Since the @dconn reference via args->conn will be used via a thread
or callback, let's make sure memory associated with it isn't free'd
unexpectedly before we use it. The Unref will be done when the object
is Dispose'd.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agolibxl: Add refcnt for args->vm during migration
John Ferlan [Mon, 23 Apr 2018 15:53:16 +0000 (11:53 -0400)]
libxl: Add refcnt for args->vm during migration

When adding the @vm to the @args for usage during a thread or
callback, let's add the reference to it at the time of adding to
ensure nothing else deletes it. The corresponding Unref is then
added to the Dispose function.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agoconf: Move and use virDomainObjListRemoveLocked
John Ferlan [Fri, 9 Mar 2018 19:12:55 +0000 (14:12 -0500)]
conf: Move and use virDomainObjListRemoveLocked

Rather than open code within virDomainObjListRemove, just call
the *Locked function.

Additionally, add comments to virDomainObjListRemove to describe
the usage model.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agoconf: Use virDomainObjListFindBy*Locked for virDomainObjListAdd
John Ferlan [Fri, 9 Mar 2018 12:37:14 +0000 (07:37 -0500)]
conf: Use virDomainObjListFindBy*Locked for virDomainObjListAdd

Use the FindBy{UUID|Name}Locked helpers which will return a locked
and ref counted object rather than the direct virHashLookup and
virObjectLock of the returned object. We'll need to temporarily
virObjectUnref when we assign a new domain @def, but that will
change shortly when virDomainObjListAddObjLocked returns the
correct reference counted object.

Use the virDomainObjEndAPI in the error path to Unref/Unlock for
the corresponding Unref/Unlock of either the FindBy* return or
the virDomainObjNew since both return a reffed/locked object.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agoconf: Split FindBy{UUID|Name} into locked helpers
John Ferlan [Fri, 9 Mar 2018 12:09:20 +0000 (07:09 -0500)]
conf: Split FindBy{UUID|Name} into locked helpers

Create helpers virDomainObjListFindByUUIDLocked and
virDomainObjListFindByNameLocked to avoid the need
to lock the domain object list leaving that task
for the caller.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
7 years agotests: domaincapstest: Fix after iothreads addition
Cole Robinson [Thu, 3 May 2018 21:30:53 +0000 (17:30 -0400)]
tests: domaincapstest: Fix after iothreads addition

Introduced in 8525b9694. Some files weren't updated. I'm just
guessing on the bhyve ones

Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agodomain_capabilities: Report <vmcoreinfo> support
Cole Robinson [Tue, 17 Apr 2018 17:54:28 +0000 (13:54 -0400)]
domain_capabilities: Report <vmcoreinfo> support

Report <features><vmcoreinfo supported='yes'/> if the guest config
accepts <features><vmcoreinfo state='on'/>

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agoconf: Add a comment warning about boolean feature XML
Cole Robinson [Tue, 17 Apr 2018 16:44:56 +0000 (12:44 -0400)]
conf: Add a comment warning about boolean feature XML

This is the old style and we really shouldn't be adding any more
examples like this. Add a comment to warn devs away

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agoconf: format/parse <vmcoreinfo> as tristate
Cole Robinson [Tue, 17 Apr 2018 16:34:31 +0000 (12:34 -0400)]
conf: format/parse <vmcoreinfo> as tristate

<features><vmcoreinfo/> is a bare boolean XML property. We don't really
use this format anymore and instead prefer tristate <X state=on|off/>
since it's required for modeling on/off/default. If for example future
qemu started enabling vmcoreinfo by default we wouldn't have any way
for the user to turn this off.

Convert it to tristate. For writing XML this is semanticly the same,
<vmcoreinfo/> is processed as <vmcoreinfo state='on'/>.

For apps reading guest XML this is technically an API change,
as they might misinterpret <vmcoreinfo state='off'/>, however this
has only been present in libvirt since 3.10.0 and I don't think any
apps are dependent on this yet

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agoqemu: Add I/O thread support info into domain capabilities
Martin Kletzander [Thu, 19 Oct 2017 12:19:38 +0000 (14:19 +0200)]
qemu: Add I/O thread support info into domain capabilities

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoxenconfig/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
xenconfig/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agovz/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
vz/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agovmx/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
vmx/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agouml/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
uml/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agotest/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
test/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agostorage/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
storage/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agosecurity/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
security/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agorpc/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
rpc/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agoqemu/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
qemu/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agophyp/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
phyp/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agonwfilter/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
nwfilter/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agonetwork/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
network/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agolxc/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:34 +0000 (14:42 +0200)]
lxc/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agohyperv/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:33 +0000 (14:42 +0200)]
hyperv/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agoesx/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:33 +0000 (14:42 +0200)]
esx/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agoaccess/: Remove spaces after casts
Martin Kletzander [Wed, 25 Apr 2018 12:42:33 +0000 (14:42 +0200)]
access/: Remove spaces after casts

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agotests: Drop DO_TEST_LINUX()
Andrea Bolognani [Wed, 2 May 2018 15:37:59 +0000 (17:37 +0200)]
tests: Drop DO_TEST_LINUX()

Now that mocking NUMA information works on FreeBSD, there are
no longer any test cases that need to be restricted to Linux
only.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: Extend NUMA mocking
Andrea Bolognani [Wed, 2 May 2018 15:35:21 +0000 (17:35 +0200)]
tests: Extend NUMA mocking

While the current amount of mocking works just fine on most of
our target platforms, it somehow causes issues when using Clang
on FreeBSD.

Work around the issue by mocking a couple more functions. It's
not pretty, but it makes qemuxml2argvtest pass on FreeBSD at
long last.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: Build virpcimock on FreeBSD too
Andrea Bolognani [Mon, 30 Apr 2018 14:04:39 +0000 (16:04 +0200)]
tests: Build virpcimock on FreeBSD too

There are only a couple remaining issues preventing it from
working on FreeBSD. Let's fix them.

With the mocking in place, qemumemlocktest and qemuxml2xmltest
can finally succeed on FreeBSD.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: Fix mode_t usage with va_arg()
Andrea Bolognani [Mon, 30 Apr 2018 15:30:12 +0000 (17:30 +0200)]
tests: Fix mode_t usage with va_arg()

Clang complains about it:

  error: second argument to 'va_arg' is of promotable type
  'mode_t' (aka 'unsigned short'); this va_arg has undefined
  behavior because arguments will be promoted to 'int'
  [-Werror,-Wvarargs]

    mode = va_arg(ap, mode_t);
                      ^~~~~~

Work around the issue by passing int to va_arg() and casting
its return value to mode_t afterwards.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agosyntax-check: Prohibit canonicalize_file_name()
Andrea Bolognani [Mon, 30 Apr 2018 14:55:57 +0000 (16:55 +0200)]
syntax-check: Prohibit canonicalize_file_name()

We want to make sure our wrapper is used instead in order
to keep the test suite working.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: Stop mocking canonicalize_file_name()
Andrea Bolognani [Mon, 30 Apr 2018 15:23:08 +0000 (17:23 +0200)]
tests: Stop mocking canonicalize_file_name()

We're using virFileCanonicalizePath() everywhere now, so
mocking this function has become entirely pointless.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoall: Use virFileCanonicalizePath() instead of canonicalize_file_name()
Andrea Bolognani [Thu, 3 May 2018 08:04:38 +0000 (10:04 +0200)]
all: Use virFileCanonicalizePath() instead of canonicalize_file_name()

The latter is impossible to mock on platforms that use the
gnulib implementation, such as FreeBSD, while the former
doesn't suffer from this limitation.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: Mock virFileCanonicalizePath()
Andrea Bolognani [Thu, 3 May 2018 08:01:04 +0000 (10:01 +0200)]
tests: Mock virFileCanonicalizePath()

We're going to need this later on.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoutil: Introduce virFileCanonicalizePath()
Andrea Bolognani [Thu, 3 May 2018 07:55:19 +0000 (09:55 +0200)]
util: Introduce virFileCanonicalizePath()

It's a trivial wrapper around canonicalize_file_name(),
which we need in order to fully mock file access on non-Linux
platforms.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoconfigure: remove bogus LIBVIRT_GETTEXT macro reference
Daniel P. Berrangé [Thu, 3 May 2018 16:04:41 +0000 (17:04 +0100)]
configure: remove bogus LIBVIRT_GETTEXT macro reference

The LIBVIRT_GETTEXT macro was an artifact of patch development and
was later renamed to LIBVIRT_CHECK_NLS. This cruft causes configure
to print out

./configure: line 75084: LIBVIRT_GETTEXT: command not found

but fortunately this is non-fatal

Reported-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: pass vm name in when instantiating filters
Daniel P. Berrangé [Fri, 27 Apr 2018 13:28:11 +0000 (14:28 +0100)]
nwfilter: pass vm name in when instantiating filters

The vm name is not needed for any functional requirement, but it will be
useful when debugging problems to identify which VM is associated with a
filter, since UUID is not human friendly.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: introduce virNWFilterBinding to decouple from virDomainNet
Daniel P. Berrangé [Thu, 26 Apr 2018 11:26:51 +0000 (12:26 +0100)]
nwfilter: introduce virNWFilterBinding to decouple from virDomainNet

The virDomainNet struct contains everything related to configuring a
guest network device. Out of all of this info, only 5 fields are
relevant to configuring network filters. It will be more convenient for
future changes to the nwfilter driver if the relevant fields are kept in
a dedicated struct. Thus the virNWFilterBinding struct is created to
track this information.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: fix leaking of filter parameters upon error
Daniel P. Berrangé [Thu, 26 Apr 2018 16:52:13 +0000 (17:52 +0100)]
nwfilter: fix leaking of filter parameters upon error

The filter parameters were not correctly free'd when an error hits while
adding to the hash table.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: remove obsolete code related to firewalld
Daniel P. Berrangé [Thu, 26 Apr 2018 12:30:33 +0000 (13:30 +0100)]
nwfilter: remove obsolete code related to firewalld

There is a bunch of left over code in the nwfilter driver related to
monitoring firewalld over dbus, that is no longer used since the
conversion to use virFirewall APIs.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: make virNWFilterIPAddrLearnReq type private
Daniel P. Berrangé [Thu, 26 Apr 2018 11:31:06 +0000 (12:31 +0100)]
nwfilter: make virNWFilterIPAddrLearnReq type private

The virNWFilterIPAddrLearnReq type should only be used by the IP address
learning code, so can live in the implementation file instead of header
file.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: change methods returning virNWFilterIPAddrLearnReq to use bool
Daniel P. Berrangé [Thu, 26 Apr 2018 11:31:06 +0000 (12:31 +0100)]
nwfilter: change methods returning virNWFilterIPAddrLearnReq to use bool

Various methods return a virNWFilterIPAddrLearnReq struct, but the
callers are only interested in whether the return value is non-NULL.
It is thus preferrable to just return a bool.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: remove virNWFilterHashTable typedefs entirely
Daniel P. Berrangé [Thu, 26 Apr 2018 11:16:09 +0000 (12:16 +0100)]
nwfilter: remove virNWFilterHashTable typedefs entirely

All the code now just uses the virHashTablePtr type directly.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: remove methods that are trivial wrappers for virHash APIs
Daniel P. Berrangé [Thu, 26 Apr 2018 11:09:18 +0000 (12:09 +0100)]
nwfilter: remove methods that are trivial wrappers for virHash APIs

This removes the virNWFilterHashTableFree, virNWFilterHashTablePut
and virNWFilterHashTableRemove methods, in favour of just calling
the virHash APIs directly.

The virNWFilterHashTablePut method was unreasonably complex because
the virHashUpdateEntry already knows how to create the entry if it
does not currently exist.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agonwfilter: remove pointless virNWFilterHashTable struct
Daniel P. Berrangé [Thu, 26 Apr 2018 10:51:28 +0000 (11:51 +0100)]
nwfilter: remove pointless virNWFilterHashTable struct

The virNWFilterHashTable struct only contains a single virHashTable
member since

  commit 293d4fe2f11db98c91175525056c8883725d4b22
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Mon Mar 24 16:35:23 2014 +0000

    Remove pointless storage of var names in virNWFilterHashTable

Thus, this struct wrapper adds no real value over just using the
virHashTable directly, but brings the complexity of needing to derefence
the hashtable to call virHash* APIs, and adds extra memory allocation
step.

To minimize code churn this just turns virNWFilterHashTable into a
typedef aliases virHashTable.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoqemu: Add tpm-crb QEMU device to the command line
Stefan Berger [Thu, 26 Apr 2018 17:42:18 +0000 (13:42 -0400)]
qemu: Add tpm-crb QEMU device to the command line

Alter qemuBuildTPMDevStr to format the tpm-crb on the command line
and use the enum range checking for valid model.

Add a test case for the formation of the tpm-crb QEMU device
command line. The qemuxml2argvtest changes cannot use the newer
DO_TEST_CAPS_LATEST since building of the command line involves
calling qemuBuildTPMBackendStr which attempts to open the
path to the device (e.g. /dev/tmp0).

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: Extend the capabilities with tpm-crb device
Stefan Berger [Thu, 26 Apr 2018 17:42:17 +0000 (13:42 -0400)]
qemu: Extend the capabilities with tpm-crb device

QEMU on x86_64 (since v2.12) can support tpm-crb devices.
Introduce qemu capabilities for this device.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoconf: Enable TPM CRB interface in the domain XML
Stefan Berger [Thu, 26 Apr 2018 17:42:16 +0000 (13:42 -0400)]
conf: Enable TPM CRB interface in the domain XML

Enable the TPM CRB to be specified in the domain XML. This
now allows to describe the TPM device like this:

  <tpm model='tpm-crb'>
    <backend type='passthrough'>
      <device path='/dev/tpm0'/>
    </backend>
  </tpm>

Extend the XML schema to also allow tpm-crb.
Extend the documentation.
Add a test case for testing the XML parser and formatter.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotest: avoid slash characters to the new domain name.
Julio Faracco [Tue, 1 May 2018 15:56:09 +0000 (12:56 -0300)]
test: avoid slash characters to the new domain name.

As QEMU driver, test driver does not accept slashes inside domain names.
This commit fixes this problem checking slashes inside the new name when
'domrename' is executed.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: avoid slash characters to the new domain name.
Julio Faracco [Tue, 1 May 2018 15:56:08 +0000 (12:56 -0300)]
qemu: avoid slash characters to the new domain name.

The 'domrename' command needs to check if the new domain name contains
the slash character. This character is not accepted by libvirt XML
definition because it is an invalid char (see Cole's commit b1fc6a7b7).
This commit enhace the 'domrename' command adding this check.

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

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agostoragefile: conditional build of virStorageFileLoadBackendModule
Daniel P. Berrangé [Thu, 3 May 2018 14:42:59 +0000 (15:42 +0100)]
storagefile: conditional build of virStorageFileLoadBackendModule

The virStorageFileLoadBackendModule method is only used if either
fs or gluster storage is built in, which doesn't happen on mingw
leading to warning of an unused static function.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests: unlink libxl-driver.log
Daniel P. Berrangé [Thu, 3 May 2018 13:26:08 +0000 (14:26 +0100)]
tests: unlink libxl-driver.log

The libxlxml2domconfigtest causes a libxl-driver.log file to be created
which breaks make distchck if libxl is enabled. Delete the log file at
the end of the test.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agostorage: create separate loadable modules for storage file drivers
Daniel P. Berrangé [Wed, 25 Apr 2018 13:37:07 +0000 (14:37 +0100)]
storage: create separate loadable modules for storage file drivers

The storage file drivers are currently loaded as a side effect of
loading the storage driver. This is a bogus dependancy because the
storage file code has no interaction with the storage drivers, and
even ultimately be running in a completely separate daemon.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoutil: refactor storage file checks to allow error reporting
Daniel P. Berrangé [Wed, 25 Apr 2018 13:09:24 +0000 (14:09 +0100)]
util: refactor storage file checks to allow error reporting

The virStorageFileSupportsSecurityDriver and
virStorageFileSupportsAccess currently just return a boolean
value. This is ok because they don't have any failure scenarios
but a subsequent patch is going to introduce potential failure
scenario. This changes their return type from a boolean to an
int with values -1, 0, 1.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoutil: fix virStorageFileGetBackingStoreStr error handling
Daniel P. Berrangé [Wed, 25 Apr 2018 11:50:27 +0000 (12:50 +0100)]
util: fix virStorageFileGetBackingStoreStr error handling

The virStorageFileGetBackingStoreStr method has overloaded the NULL
return value to indicate both no backing available and a fatal
error dealing with it.

The caller is thus not able to correctly propagate the error
messages.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agostorage: split fs storage file code from storage driver backend
Daniel P. Berrangé [Wed, 25 Apr 2018 09:17:13 +0000 (10:17 +0100)]
storage: split fs storage file code from storage driver backend

The storage file code needs to be run in the hypervisor drivers, while
the storage backend code needs to be run in the storage driver. Split
the source code as a preparatory step for creating separate loadable
modules.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agostorage: remove unused imports of libxml headers
Daniel P. Berrangé [Thu, 3 May 2018 11:49:57 +0000 (12:49 +0100)]
storage: remove unused imports of libxml headers

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agostorage: split gluster storage file code from storage driver backend
Daniel P. Berrangé [Wed, 25 Apr 2018 09:17:13 +0000 (10:17 +0100)]
storage: split gluster storage file code from storage driver backend

The storage file code needs to be run in the hypervisor drivers, while
the storage backend code needs to be run in the storage driver. Split
the source code as a preparatory step for creating separate loadable
modules.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoutil: create new virmodule.{c,h} files for dlopen support code
Daniel P. Berrangé [Wed, 25 Apr 2018 14:35:27 +0000 (15:35 +0100)]
util: create new virmodule.{c,h} files for dlopen support code

The driver.{c,h} files are primarily targetted at loading hypervisor
drivers and some helper functions in that area. It also, however,
contains a generically useful function for loading extension modules
that is called by the storage driver. Split that functionality off
into a new virmodule.{c,h} file to isolate it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agodocs: Grammar and spelling fixes
Ville Skyttä [Thu, 3 May 2018 11:14:19 +0000 (13:14 +0200)]
docs: Grammar and spelling fixes

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
7 years agorpm: set wireshark plugin directory from pkg-config
Daniel P. Berrangé [Thu, 3 May 2018 11:17:31 +0000 (12:17 +0100)]
rpm: set wireshark plugin directory from pkg-config

The wireshark plugin directory moved again in Fedora 29, and will
move again every time wireshark do a new minor release. Call out
to pkg-config to find the right directory to use in the RPM file
list.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agorpm: libvirt-daemon-driver-libxl must obsolete libvirt-daemon-driver-xen
Daniel P. Berrangé [Thu, 3 May 2018 10:18:42 +0000 (11:18 +0100)]
rpm: libvirt-daemon-driver-libxl must obsolete libvirt-daemon-driver-xen

Snce the xen driver was deleted we need to ensure that the old
libvirt-daemon-driver-xen sub-RPM gets removed on upgrade. We
achieve this my making libvirt-daemon-driver-libxl obsolete it.

We don't add a Provides: too, because libvirt-daemon-driver-libxl
is not a functionally identical replacement, since we don't want
to satisfy deps for 3rd party apps that have a Requires on the
libvirt-daemon-driver-xen RPM.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agotests/Makefile.am: use LIBTOOL variable instead of hardcoded name
Maciej Wolny [Wed, 2 May 2018 16:54:08 +0000 (17:54 +0100)]
tests/Makefile.am: use LIBTOOL variable instead of hardcoded name

Fixes "can't find libtool" error when running valgrind checks.

Signed-off-by: Maciej Wolny <maciej.wolny@codethink.co.uk>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agoconf: remove unused VIR_DOMAIN_FS_RAM_DEFAULT_USAGE
Ján Tomko [Wed, 2 May 2018 12:37:51 +0000 (14:37 +0200)]
conf: remove unused VIR_DOMAIN_FS_RAM_DEFAULT_USAGE

Unused since its introduction in commit <76b644c>.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agodocs: schema: Add missing <interleave> element to panic device
Erik Skultety [Wed, 2 May 2018 11:54:55 +0000 (13:54 +0200)]
docs: schema: Add missing <interleave> element to panic device

Panic device has 2 optional sub-elements - <alias> and <address> the
order of which should be interchangeable in the XML.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>