]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
8 years agoqemuDomainAttachNetDevice: Don't overwrite error on rollback
Michal Privoznik [Tue, 25 Oct 2016 10:16:36 +0000 (12:16 +0200)]
qemuDomainAttachNetDevice: Don't overwrite error on rollback

If there is an error hotpluging a net device (for whatever
reason) a rollback operation is performed. However, whilst doing
so various helper functions that are called report errors on
their own. This results in the original error to be overwritten
and thus misleading the user.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Make sure shmem memory is shared
Martin Kletzander [Thu, 10 Nov 2016 07:20:07 +0000 (08:20 +0100)]
qemu: Make sure shmem memory is shared

Even though using /dev/shm/asdf as the backend, we still need to make
the mapping shared.  The original patch forgot to add that parameter.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agolxc.conf: s/QEMU/LXC/
Michal Privoznik [Wed, 9 Nov 2016 17:13:45 +0000 (18:13 +0100)]
lxc.conf: s/QEMU/LXC/

There's one copy paste error where a comment mentions QEMU
instead of LXC driver.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu_capabilities: fix build with for old gcc
Pavel Hrdina [Wed, 9 Nov 2016 17:40:14 +0000 (18:40 +0100)]
qemu_capabilities: fix build with for old gcc

../../src/qemu/qemu_capabilities.c:3757: error: declaration of
'basename' shadows a global declaration [-Wshadow]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoqemu: Fix double free when live-attaching shmem
Martin Kletzander [Wed, 9 Nov 2016 16:40:17 +0000 (17:40 +0100)]
qemu: Fix double free when live-attaching shmem

Function qemuDomainAttachShmemDevice() steals the device data if the
hotplug was successful, but the condition checked for unsuccessful
execution otherwise.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: command: Add debug option for gluster volumes
Prasanna Kumar Kalever [Fri, 14 Oct 2016 03:37:45 +0000 (05:37 +0200)]
qemu: command: Add debug option for gluster volumes

Propagate the selected or default level to qemu if it's supported.

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

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: conf: add option for tuning debug logging level
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:18 +0000 (01:04 +0530)]
qemu: conf: add option for tuning debug logging level

This helps in selecting log level of the gluster gfapi, output to stderr.
The option is 'gluster_debug_level', can be tuned by editing
'/etc/libvirt/qemu.conf'

Debug levels ranges 0-9, with 9 being the most verbose, and 0
representing no debugging output.  The default is the same as it was
before, which is a level of 4.  The current logging levels defined in
the gluster gfapi are:

    0 - None
    1 - Emergency
    2 - Alert
    3 - Critical
    4 - Error
    5 - Warning
    6 - Notice
    7 - Info
    8 - Debug
    9 - Trace

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Detect support for gluster debug setting
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:19 +0000 (01:04 +0530)]
qemu: capabilities: Detect support for gluster debug setting

Teach qemu driver to detect whether qemu supports specifying debug level
for gluster volumes.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Add support for QMP schema introspection
Peter Krempa [Wed, 19 Oct 2016 12:40:53 +0000 (14:40 +0200)]
qemu: capabilities: Add support for QMP schema introspection

Allow detecting capabilities according to the qemu QMP schema. This is
necessary as sometimes the availability of certain options depends on
the presence of a field in the schema.

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

The infrastructure in this patch uses a query path to set a specific
capability flag according to the availability of the given element in
the schema.

8 years agotests: qemucaps: Temporarily remove 'query-qmp-schema' from test data
Peter Krempa [Thu, 20 Oct 2016 08:11:05 +0000 (10:11 +0200)]
tests: qemucaps: Temporarily remove 'query-qmp-schema' from test data

Remove the command from the supported commands list temporarily so that
QMP introspection code can be added without breaking tests and having to
tweak the test data in the same commit.

This will be later reverted and test data will be added. The aarch64
code is special as it calls additional commands and thus the test data
can't be added upfront.

8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:22 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:13 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:52:02 +0000 (16:52 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86

Add output of 'query-qmp-schema' to the capabilities test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update ppc64 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update ppc64 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: monitor: Add code to retrieve and store QMP schema data
Peter Krempa [Mon, 17 Oct 2016 12:20:42 +0000 (14:20 +0200)]
qemu: monitor: Add code to retrieve and store QMP schema data

Call 'query-qmp-schema' and store the returned types in a hash table
keyed by the 'name' field so that the capabilities code can traverse it.

8 years agoutil: json: add helper to iterate and steal members of json array
Peter Krempa [Mon, 17 Oct 2016 11:44:16 +0000 (13:44 +0200)]
util: json: add helper to iterate and steal members of json array

Simplifies cases where JSON array members need to be transferred to a
different structure.

8 years agotest driver: Deny some operations on inactive domains
Michal Privoznik [Tue, 8 Nov 2016 08:49:22 +0000 (09:49 +0100)]
test driver: Deny some operations on inactive domains

Some operations like reboot, save, coreDump, blockStats,
ifaceStats make sense iff domain is running. While it is
technically possible for our test driver to return success
regardless of domain state, we should copy constraints from
other drivers and thus deny these operations over inactive
domains.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Only allow 'raw' format for scsi-block using virtio-scsi
John Ferlan [Mon, 31 Oct 2016 19:44:34 +0000 (15:44 -0400)]
qemu: Only allow 'raw' format for scsi-block using virtio-scsi

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

Add check in qemuCheckDiskConfig for an invalid combination
of using the 'scsi' bus for a block 'lun' device and any disk
source format other than 'raw'.

8 years agoAdd vbox 5.1 driver file
Daniel P. Berrange [Tue, 8 Nov 2016 11:19:02 +0000 (11:19 +0000)]
Add vbox 5.1 driver file

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add note about when lxc: XML namespace was added
Daniel P. Berrange [Tue, 8 Nov 2016 09:59:41 +0000 (09:59 +0000)]
docs: add note about when lxc: XML namespace was added

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agovbox: hookup the 5.1 C API to the unified driver
Dawid Zamirski [Tue, 8 Nov 2016 09:56:33 +0000 (09:56 +0000)]
vbox: hookup the 5.1 C API to the unified driver

8 years agovbox: add vbox 5.1 C API header file.
Dawid Zamirski [Thu, 20 Oct 2016 20:13:45 +0000 (16:13 -0400)]
vbox: add vbox 5.1 C API header file.

extracted from VirutalBox SDK and reindented with cppi.

8 years agotest driver: error out when domain destroy twice
Félix Bouliane [Mon, 7 Nov 2016 20:09:26 +0000 (15:09 -0500)]
test driver: error out when domain destroy twice

Fixes the behavior when destroying a domain more than once.
VIR_ERR_OPERATION_INVALID should be raised when destroying an
already destroyed domain.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoUnbreak rebuilding docs with release tarballs
Guido Günther [Fri, 4 Nov 2016 17:30:16 +0000 (18:30 +0100)]
Unbreak rebuilding docs with release tarballs

Release tarballs ship the include/libvirt/libvirt-common.h.

when srcdir != builddir we end up including libvirt-common.h twice: from
$top_srcdir/include/libvirt-common.h and from
$builddir/include/libvirt-common.h leading to

  function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
  function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
   …

Only add the builddir to the search list if there is no pregenerated
libvirt-common.h.

Reuse the existing check that predates the libvirt.h → libvirt-common.h
split and that probably was meant for exactly that.

References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452

8 years agospec: Run all make jobs in parallel
Andrea Bolognani [Mon, 7 Nov 2016 15:09:17 +0000 (16:09 +0100)]
spec: Run all make jobs in parallel

Commit e8861f69714f changed our spec file to compile and run
tests in parallel. That's a very good step forward, but why
stop there? Let's run *all* make jobs in parallel and really
put those expensive cores to use!

On my laptop, this shaves ~10s off 'make rpm'.

8 years agowireshark: Use ${exec_prefix} instead of ${prefix}
Andrea Bolognani [Wed, 26 Oct 2016 14:27:05 +0000 (16:27 +0200)]
wireshark: Use ${exec_prefix} instead of ${prefix}

${exec_prefix} and ${prefix} point to the same directory in
most setups, but when that's not the case the former should
be used for architecture-dependent data such as shared objects,
which makes it the best fit for our Wireshark dissector.

While at it, change all uses of $(var) to ${var}: they are
absolutely identicaly as far as make's concerned, but autoconf
itself seems to prefer the latter form so we might as well
follow suit.

8 years agowireshark: Make fallback path construction more reliable
Andrea Bolognani [Thu, 27 Oct 2016 12:43:00 +0000 (14:43 +0200)]
wireshark: Make fallback path construction more reliable

We only need to strip $ws_prefix from $ws_plugindir if we've
retrieved it from pkg-config: if we're building it ourselves
from $libdir, we can just use it without further processing.

8 years agowireshark: Don't redefine ws_plugindir
Andrea Bolognani [Wed, 26 Oct 2016 14:06:18 +0000 (16:06 +0200)]
wireshark: Don't redefine ws_plugindir

autoconf already defines the variable for us, and prints out
a warning if we try to do it a second time. So let's not :)

8 years agoqemu: Fix build on RHEL-6
Jiri Denemark [Fri, 4 Nov 2016 12:16:44 +0000 (13:16 +0100)]
qemu: Fix build on RHEL-6

Commit c29e6d4805 cause build failure on RHEL-6:

../../src/qemu/qemu_capabilities.c: In function 'virQEMUCapsIsValid':
../../src/qemu/qemu_capabilities.c:4085: error: declaration of 'ctime'
shadows a global declaration [-Wshadow]
/usr/include/time.h:258: error: shadowed declaration is here [-Wshadow]

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agovshReadlineParse: Remove unused variable
Michal Privoznik [Fri, 4 Nov 2016 08:07:04 +0000 (09:07 +0100)]
vshReadlineParse: Remove unused variable

After 06a7b1ff4 the @&opts_need_arg is not used anywhere. Well,
it is set but never read:

vsh.c: In function 'vshReadlineParse':
vsh.c:2658:14: warning: variable 'opts_need_arg' set but not used [-Wunused-but-set-variable]
     uint64_t opts_need_arg, opts_seen;
              ^~~~~~~~~~~~~

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodocs: Add Qt Virtual machines manager and Qt Remote viewer
Alexander Vasilenko [Thu, 3 Nov 2016 12:44:20 +0000 (15:44 +0300)]
docs: Add Qt Virtual machines manager and Qt Remote viewer

8 years agoqemu: Unify cached caps validity checks
Jiri Denemark [Thu, 27 Oct 2016 09:13:28 +0000 (11:13 +0200)]
qemu: Unify cached caps validity checks

Let's keep all run time validation of cached QEMU capabilities in
virQEMUCapsIsValid and call it whenever we access the cache.
virQEMUCapsInitCached should keep only the checks which do not make
sense once the cache is loaded in memory.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Store loaded QEMU binary ctime in qemuCaps
Jiri Denemark [Thu, 27 Oct 2016 08:54:13 +0000 (10:54 +0200)]
qemu: Store loaded QEMU binary ctime in qemuCaps

virQEMUCapsLoadCache loads QEMU capabilities from a file, but strangely
enough it returns the loaded QEMU binary ctime in qemuctime parameter
instead of storing it in qemuCaps.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoconfigure: check gnutls related stuff only if gnutls was found
Pavel Hrdina [Thu, 3 Nov 2016 14:38:09 +0000 (15:38 +0100)]
configure: check gnutls related stuff only if gnutls was found

This fixes a build issue with old gnutls.
Broken by commit 680d2f49da.

Reported-by: Olga Krishtal <okrishtal@virtuozzo.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agolibvirt.spec: Build & run tests in parallel
Michal Privoznik [Thu, 3 Nov 2016 12:34:53 +0000 (20:34 +0800)]
libvirt.spec: Build & run tests in parallel

So far, the main code is built in parallel, which makes it pretty
fast. But with a lots of tests we have now I've noticed this part
takes too much time to build. The problem was that tests were
build and run in a single job.

Also, 'make' in the first hunk is useless. The test suite is not
built due to 'make all' because there's no .git in the sources
unpacked from a tar.xz archive. It's 'make check' which triggers
tests build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoloopback is not always just lo
Pavel Timofeev [Tue, 1 Nov 2016 15:15:59 +0000 (18:15 +0300)]
loopback is not always just lo

 On BSD family OSes (Free/Net/Open/DragonFlyBSD, Mac OS) and
 Solaris loopback interface is called 'lo0' instead of just 'lo'.

8 years agoqemu: Add support for hot/cold-(un)plug of shmem devices
Martin Kletzander [Mon, 12 Sep 2016 13:40:48 +0000 (15:40 +0200)]
qemu: Add support for hot/cold-(un)plug of shmem devices

This is needed in order to migrate a domain with shmem devices as that
is not allowed to migrate.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Support newer ivshmem device variants
Martin Kletzander [Wed, 10 Aug 2016 09:15:22 +0000 (11:15 +0200)]
qemu: Support newer ivshmem device variants

QEMU added support for ivshmem-plain and ivshmem-doorbell.  Those are
reworked varians of legacy ivshmem that are compatible from the guest
POV, but not from host's POV and have sane specification and handling.

Details about the newer device type can be found in qemu's commit
5400c02b90bb:

  http://git.qemu.org/?p=qemu.git;a=commit;h=5400c02b90bb

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Save various defaults for shmem
Martin Kletzander [Wed, 3 Aug 2016 15:34:51 +0000 (17:34 +0200)]
qemu: Save various defaults for shmem

We're keeping some things at default and that's not something we want to
do intentionally.  Let's save some sensible defaults upfront in order to
avoid having problems later.  The details for the defaults (of the newer
implementation) can be found in qemu's commit 5400c02b90bb:

  http://git.qemu.org/?p=qemu.git;a=commit;h=5400c02b90bb

Since we are merely saving the defaults it will not change the guest ABI
and thanks to the fact that we're doing it in the PostParse callback it
will not break the ABI stability checks.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Add capabilities for ivshmem-{plain,doorbell}
Martin Kletzander [Tue, 2 Aug 2016 06:48:45 +0000 (08:48 +0200)]
qemu: Add capabilities for ivshmem-{plain,doorbell}

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoconf, qemu: Add newer shmem models
Martin Kletzander [Fri, 19 Aug 2016 12:58:35 +0000 (14:58 +0200)]
conf, qemu: Add newer shmem models

The old ivshmem is deprecated in QEMU, so let's use the better
ivshmem-{plain,doorbell} variants instead.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoconf, qemu: Add support for shmem model
Martin Kletzander [Fri, 19 Aug 2016 12:57:07 +0000 (14:57 +0200)]
conf, qemu: Add support for shmem model

Just the default one now, new ones will be added in following commits.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Reset post-copy capability after migration
Jiri Denemark [Wed, 2 Nov 2016 13:20:42 +0000 (14:20 +0100)]
qemu: Reset post-copy capability after migration

Unlike other migration capabilities, post-copy is also set on the
destination host which means it doesn't disappear once domain is
migrated. As a result of that other functionality which internally uses
migration to a file (virDomainManagedSave, virDomainSave,
virDomainCoreDump) may fail after migration because the post-copy
capability is still set.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agom4/virt-gnutls: remove code for gnutls < 2.2.0
Pavel Hrdina [Fri, 21 Oct 2016 21:17:08 +0000 (23:17 +0200)]
m4/virt-gnutls: remove code for gnutls < 2.2.0

Commit d8a8af3492 changed the minimal required version of gnutls
so it's safe to remove the code for older versions.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoconfigure: move gnutls check into virt-gnutls.m4
Pavel Hrdina [Fri, 21 Oct 2016 21:09:53 +0000 (23:09 +0200)]
configure: move gnutls check into virt-gnutls.m4

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoPost-release version bump to 2.5.0
Jiri Denemark [Wed, 2 Nov 2016 09:10:02 +0000 (10:10 +0100)]
Post-release version bump to 2.5.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoRelease of libvirt-2.4.0
Daniel Veillard [Tue, 1 Nov 2016 20:47:10 +0000 (21:47 +0100)]
Release of libvirt-2.4.0

* docs/news.html.in: update for the release
* po/*.po*: regenerated

8 years agodocs: remove obsolete library.xen file
Daniel P. Berrange [Mon, 31 Oct 2016 13:39:34 +0000 (13:39 +0000)]
docs: remove obsolete library.xen file

The library.xen file contains a braindump of thoughts dating
from the very first days of libvirt, when it was briefly
called libxen. This is not useful and potentially misleading
or confusing for people.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agovsh: Pass correct values for command line completion
John Ferlan [Fri, 28 Oct 2016 20:59:58 +0000 (16:59 -0400)]
vsh: Pass correct values for command line completion

Commit id 'dcfdf341' passes 'opts_need_arg' and 'opts_seen' to
vshCmddefGetData, but that seems to be incorrect as those values
are not initialized properly (something at least one compiler found).
Instead the static 'const_opts_need_arg' and 'const_opts_seen' values
should be passed.

By passing unitialized values leads to not finding possible options
for simpler commands (domfsfreeze for example), where if you're in
a virsh shell using command line completion - you'll get a list of
files in your current directory instead of two options --domain and
--mountpoint (as would happen with this patch applied.

8 years agovsh: Using VSH_REQUIRE_OPTION rather than virReportError
Kothapally Madhu Pavan [Tue, 18 Oct 2016 17:33:11 +0000 (13:33 -0400)]
vsh: Using VSH_REQUIRE_OPTION rather than virReportError

Correcting the error reporting method by using VSH_REQUIRE_OPTION
instead of virReportError

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
8 years agonetwork: fix endless loop when starting network with multiple IPs and no dhcp
Laine Stump [Fri, 28 Oct 2016 15:43:56 +0000 (11:43 -0400)]
network: fix endless loop when starting network with multiple IPs and no dhcp

commit 9065cfaa added the ability to disable DNS services for a
libvirt virtual network. If neither DNS nor DHCP is needed for a
network, then we don't need to start dnsmasq, so code was added to
check for this.

Unfortunately, it was written with a great lack of attention to detail
(I can say that, because I was the author), and the loop that checked
if DHCP is needed for the network would never end if the network had
multiple IP addresses and the first <ip> had no <dhcp> subelement
(which would have contained a <range> or <host> subelement, thus
requiring DHCP services).

This patch rewrites the check to be more compact and (more
importantly) finite.

This bug was present in release 2.2.0 and 2.3.0, so will need to be
backported to any relevant maintainence branches.

Reported here:
  https://www.redhat.com/archives/libvirt-users/2016-October/msg00032.html
  https://www.redhat.com/archives/libvirt-users/2016-October/msg00045.html

8 years agoqemu_driver: unlink new domain cfg file when rollback
Chen Hanxiao [Fri, 28 Oct 2016 00:45:41 +0000 (08:45 +0800)]
qemu_driver: unlink new domain cfg file when rollback

If we failed to unlink old dom cfg file, we goto rollback.
But inside rollback, we fogot to unlink the new dom cfg file.
This patch fixes this issue.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Minimalize global driver accesses
Michal Privoznik [Wed, 26 Oct 2016 10:56:01 +0000 (12:56 +0200)]
qemu: Minimalize global driver accesses

Whilst working on another issue, I've noticed that in some
functions we have a local @driver variable among with access to
global @qemu_driver variable. This makes no sense.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Fix crash during qemuStateCleanup
Nikolay Shirokovskiy [Tue, 4 Oct 2016 14:27:45 +0000 (17:27 +0300)]
qemu: Fix crash during qemuStateCleanup

Rather than waiting until we've free'd up all the resources, cause the
'workerPool' thread pool to flush as soon as possible during stateCleanup.
Otherwise, it's possible something waiting to run will SEGV such as is the
case during race conditions of simultaneous exiting libvirtd and qemu process.
Resolves the following crash:

[1] crash backtrace: (bt is shortened a bit):

0  0x00007ffff7282f2b in virClassIsDerivedFrom
   (klass=0xdeadbeef, parent=0x55555581d650) at util/virobject.c:169
1  0x00007ffff72835fd in virObjectIsClass
   (anyobj=0x7fffd024f580, klass=0x55555581d650) at util/virobject.c:365
2  0x00007ffff7283498 in virObjectLock
   (anyobj=0x7fffd024f580) at util/virobject.c:317
3  0x00007ffff722f0a3 in virCloseCallbacksUnset
   (closeCallbacks=0x7fffd024f580, vm=0x7fffd0194db0,
    cb=0x7fffdf1af765 <qemuProcessAutoDestroy>)
   at util/virclosecallbacks.c:164
4  0x00007fffdf1afa7b in qemuProcessAutoDestroyRemove
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0) at qemu/qemu_process.c:6365
5  0x00007fffdf1adff1 in qemuProcessStop
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0, reason=VIR_DOMAIN_SHUTOFF_CRASHED,
    asyncJob=QEMU_ASYNC_JOB_NONE, flags=0)
   at qemu/qemu_process.c:5877
6  0x00007fffdf1f711c in processMonitorEOFEvent
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0) at qemu/qemu_driver.c:4545
7  0x00007fffdf1f7313 in qemuProcessEventHandler
   (data=0x555555832710, opaque=0x7fffd00f3a60) at qemu/qemu_driver.c:4589
8  0x00007ffff72a84c4 in virThreadPoolWorker
   (opaque=0x555555805da0) at util/virthreadpool.c:167

Thread 1 (Thread 0x7ffff7fb1880 (LWP 494472)):
1  0x00007ffff72a7898 in virCondWait
   (c=0x7fffd01c21f8, m=0x7fffd01c21a0) at util/virthread.c:154
2  0x00007ffff72a8a22 in virThreadPoolFree
   (pool=0x7fffd01c2160) at util/virthreadpool.c:290
3  0x00007fffdf1edd44 in qemuStateCleanup ()
   at qemu/qemu_driver.c:1102
4  0x00007ffff736570a in virStateCleanup ()
   at libvirt.c:807
5  0x000055555556f991 in main (argc=1, argv=0x7fffffffe458) at libvirtd.c:1660

8 years agodaemon: Fix crash during daemon cleanup
Nikolay Shirokovskiy [Tue, 4 Oct 2016 14:27:44 +0000 (17:27 +0300)]
daemon: Fix crash during daemon cleanup

Do not dereference the 'dmn' until after the virStateCleanup is completed.

During initialization, virStateInitialize requires/uses the "dmn" as the
argument to/for the daemonInhibitCallback functions. Thus, cleanup cannot
dereference 'dmn' until after calling the virStateCleanup which calls the
the daemonInhibitCallback using 'dmn'; otherwise, the following crash occurs:

backtrace (shortened a bit)

1  0x00007fd3a791b2e6 in virCondWait (c=<optimized out>, m=<optimized out>)
   at util/virthread.c:154
2  0x00007fd3a791bcb0 in virThreadPoolFree (pool=0x7fd38024ee00)
   at util/virthreadpool.c:266
3  0x00007fd38edaa00e in qemuStateCleanup () at qemu/qemu_driver.c:1116
4  0x00007fd3a79abfeb in virStateCleanup () at libvirt.c:808
5  0x00007fd3a85f2c9e in main (argc=<optimized out>, argv=<optimized out>)
    at libvirtd.c:1660

Thread 1 (Thread 0x7fd38722d700 (LWP 32256)):
0  0x00007fd3a7900910 in virClassIsDerivedFrom
   (klass=0xdfd36058d4853, parent=0x7fd3a8f394d0) at util/virobject.c:169
1  0x00007fd3a7900c4e in virObjectIsClass
   (anyobj=anyobj@entry=0x7fd3a8f2f850, klass=<optimized out>)
   at util/virobject.c:365
2  0x00007fd3a7900c74 in virObjectLock (anyobj=0x7fd3a8f2f850)
   at util/virobject.c:317
3  0x00007fd3a7a24d5d in virNetDaemonRemoveShutdownInhibition
   (dmn=0x7fd3a8f2f850) at rpc/virnetdaemon.c:547
4  0x00007fd38ed722cf in qemuProcessStop
   (driver=driver@entry=0x7fd380103810, vm=vm@entry=0x7fd38025b6d0,
    reason=reason@entry=VIR_DOMAIN_SHUTOFF_SHUTDOWN,
    asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, flags=flags@entry=0)
   at qemu/qemu_process.c:5786
5  0x00007fd38edd9428 in processMonitorEOFEvent
   (vm=0x7fd38025b6d0, driver=0x7fd380103810) at qemu/qemu_driver.c:4588
6  qemuProcessEventHandler (data=<optimized out>, opaque=0x7fd380103810)
   at qemu/qemu_driver.c:4632
7  0x00007fd3a791bb55 in virThreadPoolWorker
   (opaque=opaque@entry=0x7fd3a8f1e4c0) at util/virthreadpool.c:145

8 years agovz: remove Bridged network name and rename Routed
Maxim Nestratov [Mon, 5 Sep 2016 16:39:32 +0000 (19:39 +0300)]
vz: remove Bridged network name and rename Routed

It's funny, but Routed network name was incorrect. We should use
host-routed instead.

8 years agovz: support type=bridge network interface type correctly
Maxim Nestratov [Mon, 5 Sep 2016 16:39:31 +0000 (19:39 +0300)]
vz: support type=bridge network interface type correctly

Recently, libprlsdk got a separate flag PNA_BRIDGE corresponding to
type=bridge libvirt network interfaces. Let's use it and get rid of
all workarounds previously added to  support it.

Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
8 years agoqemu: Forbid pinning vCPUs for TCG domain
Chen Hanxiao [Sat, 22 Oct 2016 09:49:38 +0000 (17:49 +0800)]
qemu: Forbid pinning vCPUs for TCG domain

We don't support cpu pinning for TCG domains because QEMU runs them in
one thread only.  But vcpupin command was able to set them, which
resulted in a failed startup, so make sure that doesn't happen.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
8 years agoRecreate the USB address cache at reconnect
Ján Tomko [Fri, 21 Oct 2016 11:09:04 +0000 (13:09 +0200)]
Recreate the USB address cache at reconnect

When starting a new domain, we allocate the USB addresses and keep
an address cache in the domain object's private data.

However this data is lost on libvirtd restart.

Also generate the address cache if all the addresses have been
specified, so that devices hotplugged after libvirtd restart
also get theirs assigned.

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

8 years agoDo not try to release virtio serial addresses
Ján Tomko [Fri, 21 Oct 2016 12:18:54 +0000 (14:18 +0200)]
Do not try to release virtio serial addresses

Return 0 instead of 1, so that qemuDomainAttachChrDevice does not
assume the address neeeds to be released on error.

No functional change, since qemuDomainReleaseDeviceAddress has been a noop
for virtio serial addresses since the address cache was removed
in commit 19a148b.

8 years agoFix crash on usb-serial hotplug
Ján Tomko [Fri, 21 Oct 2016 12:23:54 +0000 (14:23 +0200)]
Fix crash on usb-serial hotplug

For domains with no USB address cache, we should not attempt
to generate a USB address.

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

8 years agoReturn directly from qemuDomainAttachChrDeviceAssignAddr
Ján Tomko [Fri, 21 Oct 2016 12:17:31 +0000 (14:17 +0200)]
Return directly from qemuDomainAttachChrDeviceAssignAddr

This function should never need a cleanup section.

8 years agoIntroduce virDomainVirtioSerialAddrAutoAssign again
Ján Tomko [Fri, 21 Oct 2016 11:09:36 +0000 (13:09 +0200)]
Introduce virDomainVirtioSerialAddrAutoAssign again

This time do not require an address cache as a parameter.

Simplify qemuDomainAttachChrDeviceAssignAddr to not generate
the virtio serial address cache for devices of other types.

Partially reverts commit 925fa4b.

8 years agoAdd 'FromCache' to virDomainVirtioSerialAddrAutoAssign
Ján Tomko [Fri, 21 Oct 2016 10:58:54 +0000 (12:58 +0200)]
Add 'FromCache' to  virDomainVirtioSerialAddrAutoAssign

Commit 19a148b dropped the cache from QEMU's private domain object.
Assume the callers do not have the cache by default and use
a longer name for the internal ones that do.

This makes the shorter 'virDomainVirtioSerialAddrAutoAssign'
name availabe for a function that will not require the cache.

8 years agovirsh: Fix on_shutdown to on_poweroff
Martin Kletzander [Thu, 27 Oct 2016 06:33:45 +0000 (08:33 +0200)]
virsh: Fix on_shutdown to on_poweroff

The 'on_shutdown' was the name in Xen, there was never such option in
libvirt's domain XML.

Reported-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu, lxc: Raise error message when resuming running domain
Sławek Kapłoński [Sat, 22 Oct 2016 10:30:01 +0000 (12:30 +0200)]
qemu, lxc: Raise error message when resuming running domain

When user tries to resume already running domain (Qemu or LXC)
VIR_ERR_OPERATION_INVALID error should be raised with message that
domain is already running.

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

8 years agowireshark: Rename plugindir to ws_plugindir
Andrea Bolognani [Wed, 26 Oct 2016 12:00:16 +0000 (14:00 +0200)]
wireshark: Rename plugindir to ws_plugindir

Since we're using autoconf to substitute the right value in
Makefile.am now, we can use a less generic name without running
into circular dependencies.

8 years agowireshark: Inject $(prefix) at the right time
Andrea Bolognani [Wed, 26 Oct 2016 11:56:52 +0000 (13:56 +0200)]
wireshark: Inject $(prefix) at the right time

Adding $(prefix) in Makefile.am, as we were doing, means that
it would be prepended even when using --with-ws-plugindir,
which is something we don't want to happen.

Instead, we add it beforehand but take care that it doesn't
get expanded until make is called.

8 years agowireshark: Strip prefix correctly
Andrea Bolognani [Wed, 26 Oct 2016 11:52:08 +0000 (13:52 +0200)]
wireshark: Strip prefix correctly

Even when we're building $plugindir ourselves because we can't
retrieve it using pkg-config, we still want to strip the prefix,
except in that case it would be the same prefix we're using for
building libvirt.

The fact that $plugindir is missing also doesn't tell us
anything about $ws_prefix, so we have to handle the two variables
separately.

8 years agowireshark: Hoist $ws_prefix declaration
Andrea Bolognani [Wed, 26 Oct 2016 12:19:12 +0000 (14:19 +0200)]
wireshark: Hoist $ws_prefix declaration

Keep all variable declarations close together.

8 years agowireshark: Introduce $ws_modversion
Andrea Bolognani [Wed, 26 Oct 2016 11:43:16 +0000 (13:43 +0200)]
wireshark: Introduce $ws_modversion

Use a separate variable instead of setting it inline for
slightly cleaner code.

8 years agoqemu: Add support for using AES secret for SCSI hotplug
Gema Gomez [Sun, 9 Oct 2016 15:51:09 +0000 (16:51 +0100)]
qemu: Add support for using AES secret for SCSI hotplug

Support for virtio disks was added in commit id 'fceeeda', but not for
SCSI drives. Add the secret for the server when hotplugging a SCSI drive.
No need to make any adjustments for unplug since that's handled during
the qemuDomainDetachDiskDevice call to qemuDomainRemoveDiskDevice in
the qemuDomainDetachDeviceDiskLive switch.

Added a test to/for the command line processing to show the command line
options when adding a SCSI drive for the guest.

8 years agoqemu: Add secret object hotplug for TCP chardev TLS
John Ferlan [Fri, 17 Jun 2016 13:44:30 +0000 (09:44 -0400)]
qemu: Add secret object hotplug for TCP chardev TLS

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

Complete the implementation of support for TLS encryption on
chardev TCP transports by adding the hotplug ability of a secret
to generate the passwordid for the TLS object for chrdev, RNG,
and redirdev.

Fix up the order of object removal on failure to be the inverse
of the attempted attach (for redirdev, chr, rng) - for each the
tls object was being removed before the chardev backend.

Likewise, add the ability to hot unplug that secret object as well
and be sure the order of unplug matches that inverse order of plug.

Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agoqemu: Add a secret object to/for a char source dev
John Ferlan [Fri, 21 Oct 2016 23:02:35 +0000 (19:02 -0400)]
qemu: Add a secret object to/for a char source dev

Add the secret object so the 'passwordid=' can be added if the command line
if there's a secret defined in/on the host for TCP chardev TLS objects.

Preparation for the secret involves adding the secinfo to the char source
device prior to command line processing. There are multiple possibilities
for TCP chardev source backend usage.

Add test for at least a serial chardev as an example.

8 years agoqemu: Need to remove TLS object in RemoveRNGDevice
John Ferlan [Mon, 24 Oct 2016 19:59:11 +0000 (15:59 -0400)]
qemu: Need to remove TLS object in RemoveRNGDevice

Commit id '6e6b4bfc' added the object, but forgot the other end.

8 years agoqemu: Fix depedency order in qemuRemoveDiskDevice
John Ferlan [Tue, 25 Oct 2016 19:32:27 +0000 (15:32 -0400)]
qemu: Fix depedency order in qemuRemoveDiskDevice

Need to remove the drive first, then the secobj and/or encobj if they exist.
This is because the drive has a dependency on secobj (or the secret for
the networked storage server) and/or the encobj (or the secret for the
LUKS encrypted volume).  Deleting either object first leaves an drive
without it's respective objects.

Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agovirsh: Add _length parameters to virsh output
John Ferlan [Sun, 2 Oct 2016 12:24:31 +0000 (08:24 -0400)]
virsh: Add _length parameters to virsh output

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

Add the duration parameters to the virsh input/output for blkdeviotune
command and describe them in the pod file.

Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agovirsh: Create macros to add IOTUNE values
John Ferlan [Sun, 2 Oct 2016 11:55:32 +0000 (07:55 -0400)]
virsh: Create macros to add IOTUNE values

Rework the repetitive lines to add iotune values into easier to read macros.
One to handle the SCALED values and one to handle the non scaled values.

Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agoqemu: Add the length options to the iotune command line
John Ferlan [Mon, 19 Sep 2016 11:14:21 +0000 (07:14 -0400)]
qemu: Add the length options to the iotune command line

Add in the block I/O throttling length/duration parameter to the command
line if supported. If not supported, fail command creation.

Add the xml2argvtest for testing.

8 years agoconf: Add support for blkiotune "_length" options
John Ferlan [Mon, 19 Sep 2016 10:41:05 +0000 (06:41 -0400)]
conf: Add support for blkiotune "_length" options

Modify _virDomainBlockIoTuneInfo and rng schema to support the _length
options for bps/iops throttling values. Document the new values.

8 years agoqemu: Add length for bps/iops throttling parameters to driver
John Ferlan [Sun, 18 Sep 2016 16:02:50 +0000 (12:02 -0400)]
qemu: Add length for bps/iops throttling parameters to driver

Add support for a duration/length for the bps/iops and friends.

Modify the API in order to add the "blkdeviotune." specific definitions
for the iotune throttling duration/length options

    total_bytes_sec_max_length
    write_bytes_sec_max_length
    read_bytes_sec_max_length
    total_iops_sec_max_length
    write_iops_sec_max_length
    read_iops_sec_max_length

8 years agocaps: Add new capability for the bps/iops throttling length
John Ferlan [Mon, 19 Sep 2016 10:47:19 +0000 (06:47 -0400)]
caps: Add new capability for the bps/iops throttling length

Add the capability to detect if the qemu binary can support the feature
to use bps-max-length and friends.

8 years agoinclude: Add new definitions for duration for bps/iops throttling
John Ferlan [Mon, 19 Sep 2016 11:38:32 +0000 (07:38 -0400)]
include: Add new definitions for duration for bps/iops throttling

Add new options to allow proving a duration/length in seconds to allow the
bps/iops (and friends) to occur:

    total_bytes_sec_max_length
    write_bytes_sec_max_length
    read_bytes_sec_max_length
    total_iops_sec_max_length
    write_iops_sec_max_length
    read_iops_sec_max_length

Add continue for compiler hint to return to for control

8 years agoqemu: Introduce qemuDomainSetBlockIoTuneDefaults
John Ferlan [Thu, 6 Oct 2016 19:08:00 +0000 (15:08 -0400)]
qemu: Introduce qemuDomainSetBlockIoTuneDefaults

Create a helper to set the bytes/iops iotune default values based on
the current qemu setting for both the live and persistent definitions.
NB: This also fixes an unreported bug where the persistent values for
*_max and size_iops_sec would be set back to 0 if unrelated persistent
values were set.

8 years agoqemu: Move setting of conf_disk in qemuDomainSetBlockIoTune
John Ferlan [Thu, 6 Oct 2016 18:21:29 +0000 (14:21 -0400)]
qemu: Move setting of conf_disk in qemuDomainSetBlockIoTune

Since persistent_def is the only place that uses it, let's just keep
it closer to where it's used.

8 years agoqemu: Return real error message for block_set_io_throttle
John Ferlan [Thu, 6 Oct 2016 18:13:27 +0000 (14:13 -0400)]
qemu: Return real error message for block_set_io_throttle

This patch will also adjust the qemuMonitorJSONSetBlockIoThrottle error
procession so that rather than returning/displaying:

    "error: internal error: Unexpected error"

Fetch the actual error message from qemu and display that

8 years agoqemu: Create a macro to handle setting bytes/iops iotune values
John Ferlan [Thu, 6 Oct 2016 17:57:32 +0000 (13:57 -0400)]
qemu: Create a macro to handle setting bytes/iops iotune values

Create a macros to hide all the comparisons for each of the fields.

Add a 'continue;' for a compiler hint that we only need to find one
this should be similar enough to the if - elseif - elseif logic.

8 years agoqemu: Move TLS object remove from DetachChr to RemoveChr
John Ferlan [Mon, 24 Oct 2016 19:47:56 +0000 (15:47 -0400)]
qemu: Move TLS object remove from DetachChr to RemoveChr

Commit id '2c32237' added the TLS object removal to the DetachChrDevice
all when it should have been added to the RemoveChrDevice since that's
the norm for similar processing (e.g. disk)

Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agovirQEMUCapsReset: also clear out hostCPUModel
Ján Tomko [Mon, 24 Oct 2016 15:35:32 +0000 (17:35 +0200)]
virQEMUCapsReset: also clear out hostCPUModel

After succesfully reading an outdated caps cache from disk,
calling virQEMUCapsReset did not properly clear out the calculated
host CPU model. This lead to a memory leak when the host CPU model
pointer was overwritten later in virQEMUCapsNewForBinaryInternal.

Introduced by commit 68c70118.

8 years agolibxl: fix leaking of allocated migration ports
Jim Fehlig [Fri, 14 Oct 2016 17:55:52 +0000 (11:55 -0600)]
libxl: fix leaking of allocated migration ports

Although the migration port is immediately released in the
finish phase of migration, it was never set in the domain
private object when allocated in the prepare phase. So
libxlDomainMigrationFinish() always released a 0-initialized
migrationPort, leaking any allocated port. After enough
migrations to exhaust the migration port pool, migration would
fail with

error: internal error: Unable to find an unused port in range
       'migration' (49152-49216)

Fix it by setting libxlDomainObjPrivate->migrationPort to the
port allocated in the prepare phase. While at it, also fix
leaking an allocated port if the prepare phase fails.

8 years agodoc: update virsh domstats documentation for vcpu statistics
Viktor Mihajlovski [Thu, 13 Oct 2016 11:42:47 +0000 (13:42 +0200)]
doc: update virsh domstats documentation for vcpu statistics

Added description for new vcpu.<num>.halted statistics value.
While there, also added a description for vcpu.<num>.wait and
clarified the units displayed for time and wait.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
8 years agoqemu: add vcpu.n.halted to vcpu domain stats
Viktor Mihajlovski [Thu, 13 Oct 2016 11:42:46 +0000 (13:42 +0200)]
qemu: add vcpu.n.halted to vcpu domain stats

Extended qemuDomainGetStatsVcpu to include the per vcpu halted
indicator if reported by QEMU. The key for new boolean value
has the format "vcpu.<n>.halted".

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
8 years agoqemu: Add domain support for VCPU halted state
Viktor Mihajlovski [Thu, 13 Oct 2016 11:42:45 +0000 (13:42 +0200)]
qemu: Add domain support for VCPU halted state

Adding a field to the domain's private vcpu object to hold the halted
state information.
Adding two functions in support of the halted state:
- qemuDomainGetVcpuHalted: retrieve the halted state from a
  private vcpu object
- qemuDomainRefreshVcpuHalted: obtain the per-vcpu halted states
  via qemu monitor and store the results in the private vcpu objects

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Hao QingFeng <haoqf@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
8 years agoqemu: Add monitor support for CPU halted state
Viktor Mihajlovski [Thu, 13 Oct 2016 11:42:44 +0000 (13:42 +0200)]
qemu: Add monitor support for CPU halted state

Extended the qemuMonitorCPUInfo with a halted flag. Extract the halted
flag for both text and JSON monitor.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
8 years agoqemu: replace calls to virDomainPCIAddressReserveNext*() with static function
Laine Stump [Fri, 2 Sep 2016 20:39:18 +0000 (16:39 -0400)]
qemu: replace calls to virDomainPCIAddressReserveNext*() with static function

An upcoming commit will remove the "flag" argument from all the calls
to reserve the next available address|slot, but I don't want to change
the arguments in the hypervisor-agnostic
virDomainPCIAddressReserveNext*() functions, so this patch places a
simple qemu-specific wrapper around those functions - the new
functions don't take a flags arg, but grab it from the device's
info->pciConnectFlags.

8 years agoconf: make virDomainPCIAddressGetNextSlot() a local static function
Laine Stump [Thu, 1 Sep 2016 15:38:02 +0000 (11:38 -0400)]
conf: make virDomainPCIAddressGetNextSlot() a local static function

This function is no longer needed outside of domain_addr.c.