]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 years agoqemu: driver: Allow passing disk target as top image with block commit
Peter Krempa [Wed, 17 May 2017 15:16:15 +0000 (17:16 +0200)]
qemu: driver: Allow passing disk target as top image with block commit

Since we allow active layer block commit the users are allowed to commit
the top of the chain (e.g. vda) into the backing image. The API would
not accept that parameter, as it tried to look up the image in the
backing chain.

Add the ability to use the top level image target name explicitly as the
top image of the block commit operation.

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

7 years agonews: Update for GIC version on TCG changes
Andrea Bolognani [Fri, 12 May 2017 13:40:51 +0000 (15:40 +0200)]
news: Update for GIC version on TCG changes

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agogic: Remove VIR_GIC_VERSION_DEFAULT
Andrea Bolognani [Fri, 12 May 2017 12:38:08 +0000 (14:38 +0200)]
gic: Remove VIR_GIC_VERSION_DEFAULT

The QEMU default is GICv2, and some of the code in libvirt
relies on the exact value. Stop pretending that's not the
case and use GICv2 explicitly where needed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agoqemu: Use GICv2 for aarch64/virt TCG guests
Andrea Bolognani [Fri, 12 May 2017 11:29:57 +0000 (13:29 +0200)]
qemu: Use GICv2 for aarch64/virt TCG guests

There are currently some limitations in the emulated GICv3
that make it unsuitable as a default. Use GICv2 instead.

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

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agotests: Check default GIC version for aarch64/virt TCG guests
Andrea Bolognani [Fri, 12 May 2017 12:05:55 +0000 (14:05 +0200)]
tests: Check default GIC version for aarch64/virt TCG guests

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agoqemu: Use qemuDomainMachineIsVirt() more
Andrea Bolognani [Fri, 12 May 2017 09:03:19 +0000 (11:03 +0200)]
qemu: Use qemuDomainMachineIsVirt() more

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agoqemu: improve detection of UNIX path generated by libvirt
Pavel Hrdina [Thu, 11 May 2017 12:09:35 +0000 (14:09 +0200)]
qemu: improve detection of UNIX path generated by libvirt

Currently we consider all UNIX paths with specific prefix as generated
by libvirt, but that's a wrong assumption.  Let's make the detection
better by actually checking whether the whole path matches one of the
paths that we generate or generated in the past.

The UNIX path isn't stored in config XML since libvirt-1.3.1.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agoremove hack for debian etch limits.h
Daniel P. Berrange [Mon, 15 May 2017 16:00:09 +0000 (17:00 +0100)]
remove hack for debian etch limits.h

The debian etch distro was end-of-life a long time ago so we no
longer need the ULLONG_MAX hack. In any case gnulib now provides
an equivalent fix by default, and so our definition now triggers
syntax-check rule failure

src/internal.h:#    define ULLONG_MAX   ULONG_LONG_MAX
maint.mk: define the above via some gnulib .h file
maint.mk:843: recipe for target 'sc_prohibit_always-defined_macros' failed

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agomaint: update to latest gnulib
Daniel P. Berrange [Thu, 11 May 2017 14:40:25 +0000 (15:40 +0100)]
maint: update to latest gnulib

This pulls in the fixes for poll() on Win32 which finally
makes the remote driver work again.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agoconf: add ABI stability checks for IOMMU options
Ján Tomko [Fri, 12 May 2017 14:59:45 +0000 (16:59 +0200)]
conf: add ABI stability checks for IOMMU options

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

7 years agoconf: split out virDomainIOMMUDefCheckABIStability
Ján Tomko [Fri, 12 May 2017 14:59:09 +0000 (16:59 +0200)]
conf: split out virDomainIOMMUDefCheckABIStability

7 years agoqemu: format caching-mode on iommu command line
Ján Tomko [Fri, 17 Mar 2017 07:28:04 +0000 (08:28 +0100)]
qemu: format caching-mode on iommu command line

Format the caching-mode option for the intel-iommu device,
based on its <driver caching> attribute value.

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

7 years agoconf: add caching_mode attribute to iommu device
Ján Tomko [Fri, 17 Mar 2017 07:27:49 +0000 (08:27 +0100)]
conf: add caching_mode attribute to iommu device

Add a new attribute to control the caching mode.

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

7 years agoqemu: format intel-iommu,intremap on the command line
Ján Tomko [Wed, 3 May 2017 13:23:12 +0000 (15:23 +0200)]
qemu: format intel-iommu,intremap on the command line

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

7 years agoconf: add <driver intremap> to <iommu>
Ján Tomko [Fri, 17 Mar 2017 07:35:22 +0000 (08:35 +0100)]
conf: add <driver intremap> to <iommu>

Add a new attribute to control interrupt remapping.

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

7 years agoqemu: format kernel_irqchip on the command line
Ján Tomko [Fri, 17 Mar 2017 07:26:49 +0000 (08:26 +0100)]
qemu: format kernel_irqchip on the command line

Add kernel_irqchip=split/on to the QEMU command line
and a capability that looks for it in query-command-line-options
output. For the 'split' option, use a version check
since it cannot be reasonably probed.

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

7 years agoconf: add <ioapic driver> to <features>
Ján Tomko [Fri, 17 Mar 2017 07:26:35 +0000 (08:26 +0100)]
conf: add <ioapic driver> to <features>

Add a new <ioapic> element with a driver attribute.

Possible values are qemu and kvm. With 'qemu', the I/O
APIC can be put in the userspace even for KVM domains.

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

7 years agoutil: conf: Don't log when adding commented out lines
Peter Krempa [Fri, 12 May 2017 14:29:15 +0000 (16:29 +0200)]
util: conf: Don't log when adding commented out lines

virConfAddEntry spams debug logs even for fully commented out lines.
Skip such messages to avoid:

2017-05-12 12:35:38.867+0000: 10820: debug : virConfAddEntry:241 : Add entry (null) (nil)
2017-05-12 12:35:38.867+0000: 10820: debug : virConfAddEntry:241 : Add entry (null) (nil)
2017-05-12 12:35:38.867+0000: 10820: debug : virConfAddEntry:241 : Add entry (null) (nil)
2017-05-12 12:35:38.867+0000: 10820: debug : virConfAddEntry:241 : Add entry (null) (nil)
2017-05-12 12:35:38.867+0000: 10820: debug : virConfAddEntry:241 : Add entry (null) (nil)
...

This also fixes NULL passed to printf.

7 years agostorage: use 0711 as the default perms for dirs
Serge Hallyn [Mon, 15 May 2017 11:05:31 +0000 (13:05 +0200)]
storage: use 0711 as the default perms for dirs

There should be no need to make dir based pools world/group readable.
So use 0711, not 0755, as the default perms for storage dirs.

Updates in v2:
 - adapt commit wording to mention dropping group readable as well

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agoDetect VMDK version 3 files
Daniel P. Berrange [Mon, 8 May 2017 09:05:09 +0000 (10:05 +0100)]
Detect VMDK version 3 files

The metadata libvirt cares about is identical for version 3
as for previous versions, so we merely need list the new
version number.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: monitor: do not report error on shutdown
Christian Ehrhardt [Thu, 9 Mar 2017 09:54:32 +0000 (10:54 +0100)]
qemu: monitor: do not report error on shutdown

If a shutdown is expected because it was triggered via libvirt we can
also expect the monitor to close. In those cases do not report an
internal error like:
  "internal error: End of file from qemu monitor"

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
8 years agotest-wrap-argv.pl: Accept short parameter -i for --in-place
Martin Kletzander [Fri, 12 May 2017 13:08:51 +0000 (15:08 +0200)]
test-wrap-argv.pl: Accept short parameter -i for --in-place

I like to use it that way and every time I try running it I just
instinctively use '-i' (like with sed, etc.) and it makes sense, IMHO.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoutil: introduce virBufferEscapeRegex
Pavel Hrdina [Fri, 12 May 2017 12:26:09 +0000 (14:26 +0200)]
util: introduce virBufferEscapeRegex

Add a helper to escape all possible meta-characters used for
POSIX extended regular expressions.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoutil: introduce virStringMatch
Pavel Hrdina [Thu, 11 May 2017 15:16:13 +0000 (17:16 +0200)]
util: introduce virStringMatch

Simply tries to match the provided regex on a string and returns
the result.  Useful if caller don't care about the matched substring
and want to just test if some pattern patches a string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agodocs: install html fonts and related
Nikolay Shirokovskiy [Thu, 11 May 2017 09:01:27 +0000 (12:01 +0300)]
docs: install html fonts and related

8 years agovirsh: Add --tls description for the virsh man page
John Ferlan [Wed, 10 May 2017 14:07:31 +0000 (10:07 -0400)]
virsh: Add --tls description for the virsh man page

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

Commit id '6a8d898d' neglected to update the man page.

8 years agoconf: Fix resource leak in virCapabilitiesInitCaches
John Ferlan [Fri, 12 May 2017 10:46:20 +0000 (06:46 -0400)]
conf: Fix resource leak in virCapabilitiesInitCaches

The @type from virFileReadValueString needs to be VIR_FREE each time
through the loop since it's not saved and since cleanup can be reached
prior to decoding it for @kernel_type amd bank->type, the cleanup code
needs to also have a VIR_FREE

Found by Coverity

8 years agospec: Use HTTPS instead of HTTP
Andrea Bolognani [Thu, 11 May 2017 16:31:08 +0000 (18:31 +0200)]
spec: Use HTTPS instead of HTTP

libvirt.org supports HTTPS, so might as well use it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
8 years agospec: Support maintenance releases on mingw
Andrea Bolognani [Thu, 11 May 2017 16:28:00 +0000 (18:28 +0200)]
spec: Support maintenance releases on mingw

The regular spec file contains code to deal with the fact
that maintenance releases are uploaded to their own
directory: copy it over to the mingw spec file so that it's
possible to build maintenance releases there as well.

This also switches the source URL from FTP to HTTP for
consistency with the main spec file.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
8 years agoqemu: Provide a much clearer message on device hot-plug
Erik Skultety [Thu, 11 May 2017 13:26:47 +0000 (15:26 +0200)]
qemu: Provide a much clearer message on device hot-plug

Adjust the current message to make it clear, that it is the hotplug
operation that is unsupported with the given host device type.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agotests: stub out virfilewrapper.c on Win32
Daniel P. Berrange [Thu, 11 May 2017 10:42:14 +0000 (11:42 +0100)]
tests: stub out virfilewrapper.c on Win32

The Win32 platform can not do link time overrides in the same way
that we can on POSIX / ELF based platforms, so we cannot build
the virfilewrapper.c code reliably. Just stub it out on Win32
so it is a no-op. Tests that use this file are already written
to skip on Win32.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agolibxl: report numa sibling distances on host capabilities
Wim ten Have [Tue, 9 May 2017 18:06:29 +0000 (20:06 +0200)]
libxl: report numa sibling distances on host capabilities

When running on a NUMA machine, populate the sibling node
and distance information using data supplied by Xen.

With locality distances information, under Xen, new host
capabilities would like:

    <topology>
      <cells num='4'>
        <cell id='0'>
          <memory unit='KiB'>263902380</memory>
          <distances>
            <sibling id='0' value='10'/>
            <sibling id='1' value='21'/>
          </distances>
          ...
        </cell>
        ...
      </cells>
      ...
    </topology>

Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
8 years agoAdd missing deps on virfilewrapper.h
Daniel P. Berrange [Wed, 10 May 2017 15:15:05 +0000 (16:15 +0100)]
Add missing deps on virfilewrapper.h

The test programs depend on virfilewrapper.h as well as the
virfilewrapper.c. Adding the dep ensures that virfilewrapper.h
gets included in the dist tarball.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: driver: Fix usage of qemuOpenFile
Peter Krempa [Wed, 10 May 2017 10:33:19 +0000 (12:33 +0200)]
qemu: driver: Fix usage of qemuOpenFile

The function returns -errno on failure, not only -1.

8 years agoqemu: driver: Document qemuOpenFile
Peter Krempa [Wed, 10 May 2017 10:28:38 +0000 (12:28 +0200)]
qemu: driver: Document qemuOpenFile

The function is nontrivial to follow and has non-standard return values.
Recent usage was buggy.

8 years agoconf: Check CPU cache for ABI stability
Jiri Denemark [Tue, 9 May 2017 14:03:19 +0000 (16:03 +0200)]
conf: Check CPU cache for ABI stability

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoDon't inline virStringTrimOptionalNewline
Daniel P. Berrange [Wed, 10 May 2017 08:16:11 +0000 (09:16 +0100)]
Don't inline virStringTrimOptionalNewline

GCC complains that inlining virStringTrimOptionalNewline is not
likely on some platforms:

  cc1: warnings being treated as errors
  ../../src/util/virfile.c: In function 'virFileReadValueBitmap':
  ../../src/util/virstring.h:292: error: inlining failed in call to 'virStringTrimOptionalNewline': call is unlikely and code size would grow [-Winline]
  ../../src/util/virfile.c:3987: error: called from here [-Winline]

Inlining this function is not going to be a measurable performance
benefit either, since the time required to execute it is going to
be dominated by running of strlen() over the string, not by the
function call overhead.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agospec: Update version check for maint Source URL
Cole Robinson [Fri, 5 May 2017 00:08:55 +0000 (20:08 -0400)]
spec: Update version check for maint Source URL

New maint release version numbers of just A.B.C format, not the old
A.B.C.D format. Adjust the check that dynamically changes the Source
URL for maint releases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agoAdding POWER9 cpu model to cpu_map.xml
Kothapally Madhu Pavan [Tue, 9 May 2017 09:04:10 +0000 (05:04 -0400)]
Adding POWER9 cpu model to cpu_map.xml

As POWER9 model is not available in cpu_map.xml virsh capabilities
donot display the cpu model and vendor details. This patch
provides those details

8 years agotests: fix virfilewrapper
Roman Bogorodskiy [Tue, 9 May 2017 13:02:26 +0000 (17:02 +0400)]
tests: fix virfilewrapper

If __lxstat() and __xstat() functions are not available, build fails with:

  CC       virfilewrapper.o
virfilewrapper.c:180:5: error: no previous prototype for function '__lxstat' [-Werror,-Wmissing-prototypes]
int __lxstat(int ver, const char *path, struct stat *sb)
    ^
virfilewrapper.c:208:5: error: no previous prototype for function '__xstat' [-Werror,-Wmissing-prototypes]
int __xstat(int ver, const char *path, struct stat *sb)

Luckily, we already check presence of these functions in configure
using AC_CHECK_FUNCS, so just don't wrap these if they're not available.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
8 years agoutil: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu
Martin Kletzander [Tue, 9 May 2017 12:17:38 +0000 (14:17 +0200)]
util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu

The code is already prepared to handle the non-existence of it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Add resctrl test for vircaps2xmltest
Martin Kletzander [Fri, 31 Mar 2017 12:36:58 +0000 (14:36 +0200)]
tests: Add resctrl test for vircaps2xmltest

Add info from yet another machine, this time with resctrl data so that
we can extend tests easily in a test-driven way.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Add support for more complicated hierarchies in vircaps2xmltest
Martin Kletzander [Fri, 31 Mar 2017 12:33:57 +0000 (14:33 +0200)]
tests: Add support for more complicated hierarchies in vircaps2xmltest

More directories will need to be mocked, so let's prepare for that.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoInit host cache info in drivers
Martin Kletzander [Wed, 29 Mar 2017 13:52:31 +0000 (15:52 +0200)]
Init host cache info in drivers

Added only in drivers that were already calling
virCapabilitiesInitNUMA().  Instead of refactoring all the callers to
behave the same way in case of error, just follow what the callers are
doing for all the functions.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoAdd host cache information in capabilities
Martin Kletzander [Thu, 30 Mar 2017 13:01:27 +0000 (15:01 +0200)]
Add host cache information in capabilities

We're only adding only info about L3 caches, we can add more
later (just by changing one line), but for now that's more than enough
without overwhelming anyone.

XML snippet of how this should look like (also seen as part of the commit):

  <cache>
    <bank id='0' level='3' type='both' size='8192' unit='KiB' cpus='0-7'/>
  </cache>

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Add missing cache data for vircaps2xmltest
Martin Kletzander [Mon, 27 Mar 2017 06:27:38 +0000 (08:27 +0200)]
tests: Add missing cache data for vircaps2xmltest

Commit a0fdd2f6f9a0cc77ae285c289e2c16d314b6a907 added some data from
the system but forgot 3 files for each cache.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Test vircaps2xmldata XMLs in virschematest
Martin Kletzander [Thu, 30 Mar 2017 12:55:12 +0000 (14:55 +0200)]
tests: Test vircaps2xmldata XMLs in virschematest

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoutil: Remove virsysfs and instead enhance virFileReadValue* functions
Martin Kletzander [Wed, 5 Apr 2017 14:13:52 +0000 (16:13 +0200)]
util: Remove virsysfs and instead enhance virFileReadValue* functions

It is no longer needed thanks to the great virfilewrapper.c.  And this
way we don't have to add a new set of functions for each prefixed
path.

While on that, add two functions that weren't there before, string and
scaled integer reading ones.  Also increase the length of the string
being read by one to accompany for the optional newline at the
end (i.e. change INT_STRLEN_BOUND to INT_BUFSIZE_BOUND).

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Add virfilewrapper -- the new super "mock"
Martin Kletzander [Mon, 3 Apr 2017 12:29:45 +0000 (14:29 +0200)]
tests: Add virfilewrapper -- the new super "mock"

This mock (which is actually not mock at all, see later) can redirect
all accesses to a path into another path.  There is no need to
create mocks for particular directories, you just create a directory
with all the data a redirect the test there.

In the future, this should also be able to register callbacks for
calls/paths, e.g. when the test is going to write into anything under
"/sys/devices", call function fce();  Then in the open() call we would
add information about the fd into some structure and in write() we
would call fce() with parameters like @path to write to, @data to
be written and pointer to optional return value, so that fce() itself
could stop the call from happening or change its behaviour.  But
that's an idea for a latter day.

This is not a mock because it will not be preloaded, but compiled in
the test itself.  See future patches for usage.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agomdev: Cleanup code after commits @daf5081b and @2739a983
Erik Skultety [Thu, 4 May 2017 13:36:37 +0000 (15:36 +0200)]
mdev: Cleanup code after commits @daf5081b and @2739a983

So, because mingw is somehow OK with dereferencing a pointer within a
VIR_DEBUG macro, compared to outside of it to which it complained with a
"potential NULL pointer dereference" error (still a false positive), we
can make the code a tiny bit cleaner.

Sighed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agoDon't use ceph-devel on Fedora
Daniel P. Berrange [Mon, 8 May 2017 09:54:08 +0000 (10:54 +0100)]
Don't use ceph-devel on Fedora

A previous commit changed the spec to use librbd1-devel on
RHEL-7, since this replaces ceph-devel from RHEL-6:

  commit 6cfc8834c858849cc74c3082078dc91fb1cbae38
  Author: Peter Krempa <pkrempa@redhat.com>
  Date:   Thu Mar 5 11:40:54 2015 +0100

    spec: Enable RBD storage driver in RHEL-7

    Use correct package names too as they differ.

RHEL-7 inherited this rename from Fedora though, so it should
have also made Fedora use the new names.

This was missed, because Fedora still provides a (deprecated)
back-compat RPM for ceph-devel that just pulls in librbd1-devel
(and others).

Fixing this stops libvirt pulling Java into the build root in
Fedora.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoHACKING: Document developer tooling
Andrea Bolognani [Fri, 28 Apr 2017 16:30:07 +0000 (18:30 +0200)]
HACKING: Document developer tooling

Advertise some of the useful developer tooling libvirt
integrates with out of the box.

8 years agoAdd YouCompleteMe support
Andrea Bolognani [Fri, 21 Apr 2017 14:47:02 +0000 (16:47 +0200)]
Add YouCompleteMe support

YouCompleteMe[1] is a vim plugin that implements semantic
code completion using libclang.

For non-trivial projects such as libvirt, the plugin needs
some help figuring out where to find the various header
files: generate its configuration file at configure time
so that the plugin works out of the box.

[1] http://valloric.github.io/YouCompleteMe/

8 years agoAdd color_coded support
Andrea Bolognani [Fri, 21 Apr 2017 14:05:19 +0000 (16:05 +0200)]
Add color_coded support

color_coded[1] is a vim plugin that implements semantic
syntax highlighting using libclang.

For non-trivial projects such as libvirt, the plugin needs
some help figuring out where to find the various header
files: generate its configuration file at configure time
so that the plugin works out of the box.

[1] https://github.com/jeaye/color_coded

8 years agoPost-release version bump to 3.4.0
Erik Skultety [Tue, 9 May 2017 07:17:54 +0000 (09:17 +0200)]
Post-release version bump to 3.4.0

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agoconfigure: enforce presence of python for build
Daniel P. Berrange [Mon, 8 May 2017 10:35:17 +0000 (11:35 +0100)]
configure: enforce presence of python for build

The API docs extractor, ESX code generator and keycodemapdb tools
rely on python. Historically every platform that this present, but
with switch to Python3 by default, we're increasingly seeing
installs without a /usr/bin/python.

This tightens up the check during configure, so it exits immediately
if python is missing, rather than leaving an empty $(PYTHON) make
variable which leads to more obscure errors later.

Also add it as a build dep for Mingw, since Fedora build roots no
longer get python2 by default. This was not previously a major
problem, since both ESX & API generated files were included in
EXTRA_DIST, but the keycodemapdb generated files are not, so we
require python all the time now.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoRelease of libvirt-3.3.0
Daniel Veillard [Fri, 5 May 2017 19:38:00 +0000 (21:38 +0200)]
Release of libvirt-3.3.0

* docs/news.xml: updated for release
* po/*.po*: regenerated

8 years agovirNWFilterObjListFree: Don't leak nwfilters->objs
Michal Privoznik [Thu, 4 May 2017 15:25:09 +0000 (17:25 +0200)]
virNWFilterObjListFree: Don't leak nwfilters->objs

When adding a nwfilter onto the list in
virNWFilterObjListAssignDef() this array is re-allocated to match
demand for new size. However, it is never freed leading to a
leak:

==26535== 136 bytes in 1 blocks are definitely lost in loss record 1,079 of 1,250
==26535==    at 0x4C2E2BE: realloc (vg_replace_malloc.c:785)
==26535==    by 0x54BA28E: virReallocN (viralloc.c:245)
==26535==    by 0x54BA384: virExpandN (viralloc.c:294)
==26535==    by 0x54BA657: virInsertElementsN (viralloc.c:436)
==26535==    by 0x55DB011: virNWFilterObjListAssignDef (virnwfilterobj.c:362)
==26535==    by 0x55DB530: virNWFilterObjListLoadConfig (virnwfilterobj.c:503)
==26535==    by 0x55DB635: virNWFilterObjListLoadAllConfigs (virnwfilterobj.c:539)
==26535==    by 0x2AC5A28B: nwfilterStateInitialize (nwfilter_driver.c:250)
==26535==    by 0x5621C64: virStateInitialize (libvirt.c:770)
==26535==    by 0x124379: daemonRunStateInit (libvirtd.c:881)
==26535==    by 0x554AC78: virThreadHelper (virthread.c:206)
==26535==    by 0x8F5F493: start_thread (in /lib64/libpthread-2.23.so)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agovirPerfEventIsEnabled: Accept NULL @perf
Michal Privoznik [Thu, 4 May 2017 14:27:45 +0000 (16:27 +0200)]
virPerfEventIsEnabled: Accept NULL @perf

After bdcf6e481 there is a crasher in libvirt. The commit assumes
that priv->perf is always set. That is not true. For inactive
domains, the priv->perf is not allocated as it is set in
qemuProcessLaunch(). Now, usually we differentiate between
accesses to inactive and active definition and it works just
fine. Except for 'domstats'. There priv->perf is accessed without
prior check for domain inactivity. While we could check for that,
more robust solution is to make virPerfEventIsEnabled() accept
NULL.

How to reproduce:
1) ensure you have at least one inactive domain
2) virsh domstats

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
8 years agomdev: Fix mingw build by adding a check for non-NULL pointer
Erik Skultety [Thu, 4 May 2017 09:26:10 +0000 (11:26 +0200)]
mdev: Fix mingw build by adding a check for non-NULL pointer

This patch fixes the following MinGW error (although actually being a
false positive):

../../src/util/virmdev.c: In function 'virMediatedDeviceListMarkDevices':
../../src/util/virmdev.c:453:21: error: potential null pointer
dereference [-Werror=null-dereference]
          const char *mdev_path = mdev->path;
                      ^~~~~~~~~

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agonews: Fix typo
Andrea Bolognani [Thu, 4 May 2017 11:16:37 +0000 (13:16 +0200)]
news: Fix typo

Pointed-out-during-review-by: Ján Tomko <jtomko@redhat.com>
Not-fixed-before-pushing-by: Andrea Bolognani <abologna@redhat.com>
8 years agonews: Add even more v3.3.0 entries
Andrea Bolognani [Wed, 3 May 2017 16:01:58 +0000 (18:01 +0200)]
news: Add even more v3.3.0 entries

8 years agomdev: Fix daemon crash on domain shutdown after reconnect
Erik Skultety [Fri, 28 Apr 2017 07:24:31 +0000 (09:24 +0200)]
mdev: Fix daemon crash on domain shutdown after reconnect

The problem resides in virHostdevUpdateActiveMediatedDevices which gets
called during qemuProcessReconnect. The issue here is that
virMediatedDeviceListAdd takes a pointer to the item to be added to the
list to which VIR_APPEND_ELEMENT is used, which also clears the pointer.
However, in this case only the local copy of the pointer got cleared,
leaving the original pointing to valid memory. To sum it up, during
cleanup phase, the original pointer is freed and the daemon crashes
basically any time it would access it.

Backtrace:
0x00007ffff3ccdeba in __strcmp_sse2_unaligned
0x00007ffff72a444a in virMediatedDeviceListFindIndex
0x00007ffff7241446 in virHostdevReAttachMediatedDevices
0x00007fffc60215d9 in qemuHostdevReAttachMediatedDevices
0x00007fffc60216dc in qemuHostdevReAttachDomainDevices
0x00007fffc6046e6f in qemuProcessStop
0x00007fffc6091596 in processMonitorEOFEvent
0x00007fffc6091793 in qemuProcessEventHandler
0x00007ffff7294bf5 in virThreadPoolWorker
0x00007ffff7294184 in virThreadHelper
0x00007ffff3fdc3c4 in start_thread () from /lib64/libpthread.so.0
0x00007ffff3d269cf in clone () from /lib64/libc.so.6

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
8 years agoutil: mdev: Use a local variable instead of a direct pointer access
Erik Skultety [Fri, 28 Apr 2017 05:52:52 +0000 (07:52 +0200)]
util: mdev: Use a local variable instead of a direct pointer access

Use a local variable to hold data, rather than accessing the pointer
after calling virMediatedDeviceListAdd (therefore VIR_APPEND_ELEMENT).
Although not causing an issue at the moment, this change is a necessary
prerequisite for tweaking virMediatedDeviceListAdd in a separate patch,
which will take a reference for the source pointer (instead of pointer
value) and will clear it along the way.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoqemuDomainDetachDeviceUnlink: Don't unlink files we haven't created
Michal Privoznik [Fri, 28 Apr 2017 11:17:04 +0000 (13:17 +0200)]
qemuDomainDetachDeviceUnlink: Don't unlink files we haven't created

Even though there are several checks before calling this function
and for some scenarios we don't call it at all (e.g. on disk hot
unplug), it may be possible to sneak in some weird files (e.g. if
domain would have RNG with /dev/shm/some_file as its backend). No
matter how improbable, we shouldn't unlink it as we would be
unlinking a file from the host which we haven't created in the
first place.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
8 years agoqemuDomainAttachDeviceMknodRecursive: Don't try to create devices under preserved...
Michal Privoznik [Fri, 28 Apr 2017 09:28:53 +0000 (11:28 +0200)]
qemuDomainAttachDeviceMknodRecursive: Don't try to create devices under preserved mount points

Just like in previous commit, this fixes the same issue for
hotplug.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
8 years agoqemuDomainCreateDeviceRecursive: Don't try to create devices under preserved mount...
Michal Privoznik [Fri, 28 Apr 2017 08:45:45 +0000 (10:45 +0200)]
qemuDomainCreateDeviceRecursive: Don't try to create devices under preserved mount points

While the code allows devices to already be there (by some
miracle), we shouldn't try to create devices that don't belong to
us. For instance, we shouldn't try to create /dev/shm/file
because /dev/shm is a mount point that is preserved. Therefore if
a file is created there from an outside (e.g. by mgmt application
or some other daemon running on the system like vhostmd), it
exists in the qemu namespace too as the mount point is the same.
It's only /dev and /dev only that is different. The same
reasoning applies to all other preserved mount points.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
8 years agoqemuDomainCreateDeviceRecursive: pass a structure instead of bare path
Michal Privoznik [Fri, 28 Apr 2017 07:30:23 +0000 (09:30 +0200)]
qemuDomainCreateDeviceRecursive: pass a structure instead of bare path

Currently, all we need to do in qemuDomainCreateDeviceRecursive() is to
take given @device, get all kinds of info on it (major & minor numbers,
owner, seclabels) and create its copy at a temporary location @path
(usually /var/run/libvirt/qemu/$domName.dev), if @device live under
/dev. This is, however, very loose condition, as it also means
/dev/shm/* is created too. Therefor, we will need to pass more arguments
into the function for better decision making (e.g. list of mount points
under /dev). Instead of adding more arguments to all the functions (not
easily reachable because some functions are callback with strictly
defined type), lets just turn this one 'const char *' into a 'struct *'.
New "arguments" can be then added at no cost.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
8 years agoqemuDomainBuildNamespace: Move /dev/* mountpoints later
Michal Privoznik [Thu, 27 Apr 2017 14:29:21 +0000 (16:29 +0200)]
qemuDomainBuildNamespace: Move /dev/* mountpoints later

When setting up mount namespace for a qemu domain the following
steps are executed:

1) get list of mountpoints under /dev/
2) move them to /var/run/libvirt/qemu/$domName.ext
3) start constructing new device tree under /var/run/libvirt/qemu/$domName.dev
4) move the mountpoint of the new device tree to /dev
5) restore original mountpoints from step 2)

Note the problem with this approach is that if some device in step
3) requires access to a mountpoint from step 2) it will fail as
the mountpoint is not there anymore. For instance consider the
following domain disk configuration:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/shm/vhostmd0'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>

In this case operation fails as we are unable to create vhostmd0
in the new device tree because after step 2) there is no /dev/shm
anymore. Leave aside fact that we shouldn't try to create devices
living in other mountpoints. That's a separate bug that will be
addressed later.

Currently, the order described above is rearranged to:

1) get list of mountpoints under /dev/
2) start constructing new device tree under /var/run/libvirt/qemu/$domName.dev
3) move them to /var/run/libvirt/qemu/$domName.ext
4) move the mountpoint of the new device tree to /dev
5) restore original mountpoints from step 3)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
8 years agonews: Add more v3.3.0 entries
Andrea Bolognani [Tue, 2 May 2017 15:20:16 +0000 (17:20 +0200)]
news: Add more v3.3.0 entries

These entries cover a number of features, improvements and
bug fixes that had not been documented during the development
cycle.

8 years agonews: Tweak existing v3.3.0 entries
Andrea Bolognani [Tue, 2 May 2017 13:52:02 +0000 (15:52 +0200)]
news: Tweak existing v3.3.0 entries

Some of the content was not following the (loosely established)
style, and some of the XML was not aligned properly.

8 years agoclient: Report proper close reason
Jiri Denemark [Tue, 2 May 2017 14:39:57 +0000 (16:39 +0200)]
client: Report proper close reason

When we get a POLLHUP or VIR_EVENT_HANDLE_HANGUP event for a client, we
still want to read from the socket to process any accumulated data. But
doing so inevitably results in an error and a call to
virNetClientMarkClose before we get to processing the hangup event (and
another call to virNetClientMarkClose). However the close reason passed
to the second virNetClientMarkClose call is ignored because another one
was already set. We need to pass the correct close reason when marking
the socket to be closed for the first time.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Fix persistent migration of transient domains
Jiri Denemark [Tue, 2 May 2017 16:01:04 +0000 (18:01 +0200)]
qemu: Fix persistent migration of transient domains

While fixing a bug with incorrectly freed memory in commit
v3.1.0-399-g5498aa29a, I accidentally broke persistent migration of
transient domains. Before adding qemuDomainDefCopy in the path, the code
just took NULL from vm->newDef and used it as the persistent def, which
resulted in no persistent XML being sent in the migration cookie. This
scenario is perfectly valid and the destination correctly handles it by
using the incoming live definition and storing it as the persistent one.

After the mentioned commit libvirtd would just segfault in the described
scenario.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoFix padding of encrypted data
Daniel P. Berrange [Tue, 2 May 2017 10:32:43 +0000 (11:32 +0100)]
Fix padding of encrypted data

If we are encoding a block of data that is 16 bytes in length,
we cannot leave it as 16 bytes, we must pad it out to the next
block boundary, 32 bytes. Without this padding, the decoder will
incorrectly treat the last byte of plain text as the padding
length, as it can't distinguish padded from non-padded data.

The problem exhibited itself when using a 16 byte passphrase
for a LUKS volume

  $ virsh secret-set-value 55806c7d-8e93-456f-829b-607d8c198367 \
       $(echo -n 1234567812345678 | base64)
  Secret value set

  $ virsh start demo
  error: Failed to start domain demo
  error: internal error: process exited while connecting to monitor: >>>>>>>>>>Len 16
  2017-05-02T10:35:40.016390Z qemu-system-x86_64: -object \
    secret,id=virtio-disk1-luks-secret0,data=SEtNi5vDUeyseMKHwc1c1Q==,\
    keyid=masterKey0,iv=zm7apUB1A6dPcH53VW960Q==,format=base64: \
    Incorrect number of padding bytes (56) found on decrypted data

Notice how the padding '56' corresponds to the ordinal value of
the character '8'.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: Don't reset "events" migration capability
Jiri Denemark [Fri, 28 Apr 2017 13:56:44 +0000 (15:56 +0200)]
qemu: Don't reset "events" migration capability

When creating v3.2.0-77-g8be3ccd04 commit, I completely forgot that one
migration capability is very special. It's the "events" capability which
tells QEMU to report "MIGRATION" events. Since libvirt always wants the
events, it is enabled in qemuConnectMonitor and the rest of the code
should not touch it.

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

Messed-up-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agovirsh-domain-monitor: add human readable output for 'domblkinfo'.
Julio Faracco [Mon, 1 May 2017 22:35:55 +0000 (19:35 -0300)]
virsh-domain-monitor: add human readable output for 'domblkinfo'.

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

The virsh command 'domblkinfo' returns the capacity, allocation and phisycal
size of the devices attached in a domain. Usually, this sizes are very big
and hard to understand and calculate. This commits introduce a human readable
support to check the size of each field easilly.

For example, the command before:

virsh # domblkinfo my_domain hda
Capacity:       21474836480
Allocation:     14875545600
Physical:       21474836480

and after this patch:

virsh # domblkinfo my_domain hda --human
Capacity:       20.000G
Allocation:     13.900G
Physical:       20.000G

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 years agonews: Document libxl nested HVM support
Jim Fehlig [Thu, 27 Apr 2017 21:02:36 +0000 (15:02 -0600)]
news: Document libxl nested HVM support

Nested HVM support in the libxl driver is a news-worthy
improvement for libvirt 3.3.0.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
8 years agoutil: rename/move VIR_NET_GENERATED_PREFIX to be consistent
Laine Stump [Tue, 25 Apr 2017 18:43:24 +0000 (14:43 -0400)]
util: rename/move VIR_NET_GENERATED_PREFIX to be consistent

... with VIR_NET_GENERATED_MACV???_PREFIX, which is defined in
util/virnetdevmacvlan.h.

Since VIR_NET_GENERATED_PREFIX is used for plain tap devices, it is
renamed to VIR_NET_GENERATED_TAP_PREFIX and moved to virnetdev.h

8 years agoconf: don't ignore <target dev='blah'/> for macvtap interfaces
Laine Stump [Mon, 27 Mar 2017 01:57:54 +0000 (21:57 -0400)]
conf: don't ignore <target dev='blah'/> for macvtap interfaces

The parser had been clearing out *all* suggested device names for
type='direct' (aka macvtap) interfaces. All of the code implementing
macvtap allows for a user-specified device name, so we should allow
it. In the case that an interface name starts with "macvtap" or
"macvlan" though, we do still clear it out, just as we do with "vnet"
(which is the prefix used for automatically generated tap device
names), since those are the prefixes for the names we autogenerate for
macvtap and macvlan devices.

Resolves: https://bugzilla.redhat.com/1335798

8 years agoutil: make macvtap/macvlan generated name #defines available to other files
Laine Stump [Tue, 25 Apr 2017 18:09:45 +0000 (14:09 -0400)]
util: make macvtap/macvlan generated name #defines available to other files

MACVTAP_NAME_PREFIX and MACVLAN_NAME_PREFIX could be useful to other
files if they were defined in virnetdevmacvlan.h instead of
virnetdevmacvlan.c, so do that (while slightly renaming them and also
adding yet another #define that chooses between macvlan/macvtap based
on flags).

This is a prerequisite to fix: https://bugzilla.redhat.com/1335798

8 years agonetwork: better log message when network is inactive during reconnect
Laine Stump [Tue, 25 Apr 2017 16:26:43 +0000 (12:26 -0400)]
network: better log message when network is inactive during reconnect

If the network isn't active during networkNotifyActualDevice(), we
would log an error message stating that the bridge device didn't
exist. This patch adds a check to see if the network is active, making
the logs more useful in the case that it isn't.

Partially resolves: https://bugzilla.redhat.com/1442700

8 years agoqemu: don't kill qemu process on restart if networkNotify fails
Laine Stump [Tue, 25 Apr 2017 16:20:30 +0000 (12:20 -0400)]
qemu: don't kill qemu process on restart if networkNotify fails

Nothing that could happen during networkNotifyActualDevice() could
justify unceremoniously killing the qemu process, but that's what we
were doing.

In particular, new code added in commit 85bcc022 (first appearred in
libvirt-3.2.0) attempts to reattach tap devices to their assigned
bridge devices when libvirtd restarts (to make it easier to recover
from a restart of a libvirt network). But if the network has been
stopped and *not* restarted, the bridge device won't exist and
networkNotifyActualDevice() will fail.

This patch changes networkNotifyActualDevice() and
qemuProcessNotifyNets() to return void, so that qemuProcessReconnect()
will soldier on regardless of what happens (any errors will still be
logged though).

Partially resolves: https://bugzilla.redhat.com/1442700

8 years agoconf: format only relevant attributes for graphics based on listen type
Pavel Hrdina [Wed, 26 Apr 2017 10:47:49 +0000 (12:47 +0200)]
conf: format only relevant attributes for graphics based on listen type

This patch changes following output:

    ...
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='none'/>
    </graphics>
    ...

into this output:

    ...
    <graphics type='vnc'>
      <listen type='none'/>
    </graphics>
    ...

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoiohelper: Remove unused mode
Michal Privoznik [Fri, 7 Apr 2017 14:50:31 +0000 (16:50 +0200)]
iohelper: Remove unused mode

After 1eb6647979f8c nobody calls the iohelper with 6 arguments.
Everybody uses the other mode. Well, the only user of iohelper
after the previous commit is virFileWrapperFd really.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agovirfdstream: Drop iohelper in favour of a thread
Michal Privoznik [Thu, 6 Apr 2017 16:21:39 +0000 (18:21 +0200)]
virfdstream: Drop iohelper in favour of a thread

Currently we use iohelper for virFDStream implementation. This is
because UNIX I/O can lie sometimes: even though a FD for a
file/block device is set as unblocking, actual read()/write() can
block. To avoid this, a pipe is created and one end is kept for
read/write while the other is handed over to iohelper to
write/read the data for us. Thus it's iohelper which gets blocked
and not our event loop.

This approach has two problems:
1) we are spawning a new process.
2) any exchange of information between daemon and iohelper can be
done only through the pipe.

Therefore, iohelper is replaced with an implementation in thread
which is created just for the stream lifetime. The data are still
transferred through pipe (for now), but both problems described
above are solved.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agovirFDStreamData: Turn into virObjectLockable
Michal Privoznik [Thu, 16 Jun 2016 10:07:41 +0000 (12:07 +0200)]
virFDStreamData: Turn into virObjectLockable

While this is no functional change, it makes the code look a bit
nicer. Moreover, it prepares ground for future work.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agofdstream: s/struct virFDStreamData */virFDStreamDataPtr/
Michal Privoznik [Thu, 16 Jun 2016 09:54:42 +0000 (11:54 +0200)]
fdstream: s/struct virFDStreamData */virFDStreamDataPtr/

There is really no reason why we should have to have 'struct'
everywhere.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agofdstreamtest: Print more info on read failure
Michal Privoznik [Tue, 11 Apr 2017 07:51:41 +0000 (09:51 +0200)]
fdstreamtest: Print more info on read failure

It helps with debugging if we know what's the return value of
saferead().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agofdstreamtest: Rename tempdir
Michal Privoznik [Tue, 11 Apr 2017 07:50:26 +0000 (09:50 +0200)]
fdstreamtest: Rename tempdir

Because of copy-paste the temporary directory used for this test
is called "fakesysdir". That's probably misleading.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
8 years agoqemu: use qemu-xhci USB controller by default for ppc64 and aarch64
Pavel Hrdina [Thu, 27 Apr 2017 15:56:41 +0000 (17:56 +0200)]
qemu: use qemu-xhci USB controller by default for ppc64 and aarch64

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agoqemu: add support for qemu-xhci USB controller
Pavel Hrdina [Thu, 13 Apr 2017 10:25:25 +0000 (12:25 +0200)]
qemu: add support for qemu-xhci USB controller

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agoqemu: introduce QEMU_CAPS_DEVICE_QEMU_XHCI
Pavel Hrdina [Fri, 28 Apr 2017 08:44:03 +0000 (10:44 +0200)]
qemu: introduce QEMU_CAPS_DEVICE_QEMU_XHCI

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agoqemu: use nec-usb-xhci as a default controller for aarch64 if available
Pavel Hrdina [Thu, 27 Apr 2017 15:53:51 +0000 (17:53 +0200)]
qemu: use nec-usb-xhci as a default controller for aarch64 if available

This is a USB3 controller and it's a better choice than piix3-uhci.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agoqemu: change the logic of setting default USB controller
Pavel Hrdina [Thu, 27 Apr 2017 15:41:56 +0000 (17:41 +0200)]
qemu: change the logic of setting default USB controller

The new logic will set the piix3-uhci if available regardless of
any architecture and it will be updated to better model based on
architecture and device existence.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
8 years agotests: genericxml2xml: Add test case for HTTP based disk
Peter Krempa [Mon, 24 Apr 2017 13:56:31 +0000 (15:56 +0200)]
tests: genericxml2xml: Add test case for HTTP based disk

8 years agoconf: Extract formatting of network disk source into separate function
Peter Krempa [Mon, 24 Apr 2017 12:54:02 +0000 (14:54 +0200)]
conf: Extract formatting of network disk source into separate function

8 years agodocs: schemas: Split up definitions for NBD and gluster
Peter Krempa [Fri, 21 Apr 2017 13:41:29 +0000 (15:41 +0200)]
docs: schemas: Split up definitions for NBD and gluster

NBD does not mandate a "filename". Gluster can have more servers. Split
them so that we can tighten the schema.

8 years agodocs: schemas: Split out simple network protocols
Peter Krempa [Fri, 21 Apr 2017 10:19:46 +0000 (12:19 +0200)]
docs: schemas: Split out simple network protocols

ftp/tftp/sheepdog have a mandatory filename and support only one host.
There are no additional options for them.

8 years agodocs: schemas: Extract HTTP disk source specification
Peter Krempa [Thu, 20 Apr 2017 14:41:17 +0000 (16:41 +0200)]
docs: schemas: Extract HTTP disk source specification

Make the schema more strict for HTTP disks requiring a name and
mandating exactly one source host.

ftp/tftp entries were not moved here, since http transport also will
support cookies and other options, which will be added later.

8 years agodocs: schemas: Extract RBD-specific data
Peter Krempa [Fri, 21 Apr 2017 09:48:12 +0000 (11:48 +0200)]
docs: schemas: Extract RBD-specific data

RBD driver supports specifying a snapshot image name or config file.
Create a define for RBD and move the specifics there.