Re: [libvirt] [PATCH] build: Solve mingw build clash with DATADIR

2019-08-08 Thread Andrea Bolognani
On Wed, 2019-08-07 at 21:15 -0500, Eric Blake wrote: > I'm reverting the patch under the build-breaker rules, while trying to > reproduce the cross-compilation locally rather than relying solely on > CI. My local testing that proved that #pragma push_macro works with gcc > was obviously not

[libvirt] [PATCH] ci: Comment tweaks in Makefile.ci

2019-08-08 Thread Eric Blake
Fix some typos and grammar (calling something safer and error-prone is odd, and 'ther eneeds' is an obvious typo), and reflow some long lines. Signed-off-by: Eric Blake --- Makefile.ci | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git

[libvirt] [PATCH v4 10/42] build: use @CONFIG@ instead of ::CONFIG:: in augeas tests

2019-08-08 Thread Daniel P . Berrangé
Using @VARNAME@ is a normal style of automake, so lets match that. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- build-aux/augeas-gentest.pl | 2 +- src/bhyve/test_libvirtd_bhyve.aug.in| 2 +- src/libxl/test_libvirtd_libxl.aug.in| 2 +-

[libvirt] [PATCH v4 40/42] remote: use enum helpers for parsing remote driver transport

2019-08-08 Thread Daniel P . Berrangé
Instead of open-coding a string -> enum conversion, use the enum helpers for the remote driver transport. The old code uses STRCASEEQ, so we must force the URI transport to lowercase for sake of back-compatibility. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH v4 20/42] remote: introduce virtproxyd daemon to handle IP connectivity

2019-08-08 Thread Daniel P . Berrangé
The libvirtd daemon provides the traditional libvirt experience where all the drivers are in a single daemon, and is accessible over both local UNIX sockets and remote IP sockets. In the new world we're having a set of per-driver daemons which will primarily be accessed locally via their own UNIX

[libvirt] [PATCH v4 19/42] remote: in per-driver daemons ensure that state initialize succeeds

2019-08-08 Thread Daniel P . Berrangé
When running in libvirtd, we are happy for any of the drivers to simply skip their initialization in virStateInitialize, as other drivers are still potentially useful. When running in per-driver daemons though, we want the daemon to abort startup if the driver cannot initialize itself, as the

[libvirt] [PATCH v4 41/42] remote: refactor the code for choosing the UNIX socket path

2019-08-08 Thread Daniel P . Berrangé
The ssh, libssh, libssh2 & unix transports all need to use a UNIX socket path, and duplicate some of the same logic for error checking. Pull this out into a separate method to increase code sharing. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c

[libvirt] [PATCH v4 31/42] bhyve: introduce virtbhyved daemon

2019-08-08 Thread Daniel P . Berrangé
The virtbhyved daemon will be responsible for providing the bhyve API driver functionality. The bhyve driver is still loaded by the main libvirtd daemon at this stage, so virtbhyved must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH v4 32/42] vz: introduce virtvzd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtvzd daemon will be responsible for providing the vz API driver functionality. The vz driver is still loaded by the main libvirtd daemon at this stage, so virtvzd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH v4 27/42] libxl: introduce virtxend daemon

2019-08-08 Thread Daniel P . Berrangé
The virtxend daemon will be responsible for providing the libxl API driver functionality. The libxl driver is still loaded by the main libvirtd daemon at this stage, so virtxend must not be running at the same time. This naming is slightly different than other drivers. With the libxl driver, the

[libvirt] [PATCH v4 30/42] vbox: introduce virtvboxd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtvboxd daemon will be responsible for providing the vbox API driver functionality. The vbox driver is still loaded by the main libvirtd daemon at this stage, so virtvboxd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH v4 24/42] storage: introduce virtstoraged daemon

2019-08-08 Thread Daniel P . Berrangé
The virtstoraged daemon will be responsible for providing the storage API driver functionality. The storage driver is still loaded by the main libvirtd daemon at this stage, so virtstoraged must not be running at the same time. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani

[libvirt] [PATCH v4 35/42] remote: change generated methods to not directly access connection

2019-08-08 Thread Daniel P . Berrangé
The driver dispatch methods access the priv->conn variables directly. In future we want to dynamically open the connections for the secondary driver. Thus we want the methods to call a method to get the connection handle instead of assuming the private variable is non-NULL. Reviewed-by: Andrea

[libvirt] [PATCH v4 18/42] remote: refactor how list of systemd unit files is built

2019-08-08 Thread Daniel P . Berrangé
The make logic assumes that the SYSTEMD_UNIT_FILES var can be built from SYSTEMD_UNIT_FILES_IN by simply dropping the directory prefix and the .in suffix. This won't work in future when a single .in unit file can be used to generate multiple different units. Reviewed-by: Andrea Bolognani

[libvirt] [PATCH v4 28/42] qemu: introduce virtqemud daemon

2019-08-08 Thread Daniel P . Berrangé
The virtqemud daemon will be responsible for providing the qemu API driver functionality. The qemu driver is still loaded by the main libvirtd daemon at this stage, so virtqemud must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore

Re: [libvirt] [PATCH v4 20/42] remote: introduce virtproxyd daemon to handle IP connectivity

2019-08-08 Thread Andrea Bolognani
On Thu, 2019-08-08 at 16:10 +0100, Daniel P. Berrangé wrote: > +++ b/src/remote/remote_daemon.c > @@ -906,9 +912,9 @@ daemonUsage(const char *argv0, bool privileged) > { "-h | --help", N_("Display program help") }, > { "-v | --verbose", N_("Verbose messages") }, > { "-d

Re: [libvirt] [PATCH v4 38/42] remote: open secondary drivers via remote driver if needed

2019-08-08 Thread Andrea Bolognani
On Thu, 2019-08-08 at 16:37 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 08, 2019 at 05:33:40PM +0200, Andrea Bolognani wrote: > > On Thu, 2019-08-08 at 16:10 +0100, Daniel P. Berrangé wrote: > > > +++ b/src/remote/remote_daemon_dispatch.c > > > @@ -2077,6 +2105,9 @@

[libvirt] [PATCH 12/12] qemu: driver: allow remote destinations for block copy

2019-08-08 Thread Peter Krempa
Now that we support blockdev for qemuDomainBlockCopy we can allow copying to remote destinations as well. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 47 -- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git

[libvirt] [PATCH 07/12] qemu: domain: Add 'break' after formatting commit job status XML

2019-08-08 Thread Peter Krempa
In commit 3f93884a4d0 where the job handling of commit jobs with blockdev was added I've forgot to add a 'break' in the switch fomatting the status XML. Thankfully this would not be a problem as the cases where this fell through didn't have any code. Signed-off-by: Peter Krempa ---

[libvirt] [PATCH 05/12] util: storage: Allow checking whether virStorageFileCreate is supported

2019-08-08 Thread Peter Krempa
Add virStorageFileSupportsCreate which allows silent check whether virStorageFileCreate is implemented. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 20 src/util/virstoragefile.h | 1 + 3 files changed, 22 insertions(+)

Re: [libvirt] [PATCH] docs: formatdomain: explain host-model/host-passthrough requirements

2019-08-08 Thread Paolo Bonzini
Unlike host-model, host-passthrough does not do any check, it just passes "-cpu host" blindly. Therefore, lack of flags can and will result in crashes---SIGSEGV if it happens in userspace, but worse if for example the destination doesn't have an MSR that should be there according to the kernel.

Re: [libvirt] [PATCH] tests: Fix message for IP parse/format failures

2019-08-08 Thread Andrea Bolognani
On Thu, 2019-08-08 at 13:37 +0300, Roman Bolshakov wrote: > Confusing message is printed when a parse/format sockettest fails. E.g. > there's a test that parses/formats :: and the format fails like that: > 38) Test format :: family AF_UNSPEC ... > Offset 2

[libvirt] [PATCH v2 20/23] qemu-command: use -net socket, fd= with slirp-helper

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau If a slirp-helper is associated with a network interface (after probing & preparing succesfully), pass the socket fd to QEMU and use "-net socket,fd=". Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 35 +--

[libvirt] [PATCH v2 11/23] qemu: add qemuDomainNetworkPrivate

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 39 +++ src/qemu/qemu_domain.h | 12 2 files changed, 51 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH v2 18/23] qemu-migration: prevent migration if slirp cannot be migrated

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_migration.c | 12 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 86b4bfd970..c607e9f909 100644 --- a/src/qemu/qemu_migration.c +++

[libvirt] [PATCH v2 04/23] qemu: replace logCtxt with qemuDomainLogAppendMessage()

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Once QEMU is started, the qemuDomainLogContext is owned by it, and can no longer be used from libvirt. Instead, use qemuDomainLogAppendMessage() which will redirect the log. This is not strictly necessary for swtpm, but the following patches are going to reuse

[libvirt] [PATCH v2 03/23] dbus: correctly build reply message

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau dbus_message_new() does not construct correct replies by itself, it is recommended to use dbus_message_new_method_return() instead. Signed-off-by: Marc-André Lureau --- src/util/virdbus.c | 18 -- src/util/virdbus.h | 6 --

[libvirt] [PATCH v2 05/23] qemu: add socket datagram capability

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Datagram socket is available since qemu 4.0, commit fdec16e3c2a614e2861f3086b05d444b5d8c3406 ("net/socket: learn to talk with a unix dgram socket"). Required for slirp-helper communication. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 16/23] qemu: add a flag to the cookie to prevent slirp-helper setup

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau For VM started and migrated/saved without slirp-helpers, let's prevent the automatic setup (as it would fail to migrate otherwise). Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 30 -- src/qemu/qemu_domain.h | 2 ++

[libvirt] [PATCH v2 07/23] qemu: reset VM id after external devices stop

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau pid filenames (from swtpm and other helpers from this series) are based on VM shortname, which is derived from VM id. If the id is reset to early, the state filenames will not be found. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_process.c | 4 ++-- 1 file

[libvirt] [PATCH v2 12/23] qemu-conf: add configurable slirp-helper location

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau A slirp helper is a process that provides user-mode networking through a unix domain socket. It is expected to follow the following specification: https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/README.rst Signed-off-by: Marc-André Lureau ---

[libvirt] [PATCH v2 19/23] qemu-extdevice: prepare, start and stop slirp-helper

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau If a slirp-helper is associated with a network interface, prepare/start/stop the process via qemu-extdevice. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 47 +-- src/qemu/qemu_extdevice.h | 5 +++--

[libvirt] [PATCH v2 08/23] qemu-security: add qemuSecurityCommandRun()

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Add a generic way to run a command through the security management. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_security.c | 22 ++ src/qemu/qemu_security.h | 6 ++ 2 files changed, 28 insertions(+) diff --git a/src/qemu/qemu_security.c

[libvirt] [PATCH v2 10/23] domain-conf: add network def private data

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 21 - src/conf/domain_conf.h | 6 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0456369d55..fb0904177f 100644

[libvirt] [PATCH v2 17/23] qemu-migration: prevent migration if dbus-vmstate is required

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 7c6be201b9..86b4bfd970 100644 --- a/src/qemu/qemu_migration.c +++

[libvirt] [PATCH v4 13/42] remote: remove useless $(LIBSOCKET) variable

2019-08-08 Thread Daniel P . Berrangé
GNULIB sets $(LIBSOCKET) on mingw to pull in the windows socket APIs. This is trivially not required, since we don't build libvirtd on mingw. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 1 - 1 file changed, 1 deletion(-) diff --git

[libvirt] [PATCH v4 29/42] lxc: introduce virtlxcd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtlxcd daemon will be responsible for providing the lxc API driver functionality. The lxc driver is still loaded by the main libvirtd daemon at this stage, so virtlxcd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH v4 03/42] build: create all augeas test files in same dir as their source

2019-08-08 Thread Daniel P . Berrangé
The current make rules are inconsistent about which directory the augeas test files are created in. Put them all in the same dir as their source. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore | 9 ++--- src/bhyve/Makefile.inc.am | 8

[libvirt] [PATCH v4 37/42] remote: change hand written methods to not directly access connection

2019-08-08 Thread Daniel P . Berrangé
The driver dispatch methods access the priv->conn variables directly. In future we want to dynamically open the connections for the secondary driver. Thus we want the methods to call a method to get the connection handle instead of assuming the private variable is non-NULL. Reviewed-by: Andrea

[libvirt] [PATCH v4 01/42] build: make augeas-gentest.pl write to stdout

2019-08-08 Thread Daniel P . Berrangé
The augeas-gentest.pl program merges a config file into a augeas file, saving the output to a new file. It is going to be useful to further process the output file, and it would be easier if this can be done with a pipeline, so change augeas-gentest.pl to write to stdout instead of a file.

[libvirt] [PATCH v4 34/42] remote: get rid of bogus ATTRIBUTE_UNUSED annotation client param

2019-08-08 Thread Daniel P . Berrangé
The client parameter is always used to get access to the private data struct. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 98 ++--- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git

[libvirt] [PATCH v4 38/42] remote: open secondary drivers via remote driver if needed

2019-08-08 Thread Daniel P . Berrangé
When the client has a connection to one of the hypervisor specific daemons (eg virtqemud), the app may still expect to use the secondary driver APIs (storage, network, etc). None of these will be registered in the hypervisor daemon, so we must explicitly open a connection to each of the daemons

[libvirt] [PATCH v4 04/42] build: use a common rule for checking augeas test data files

2019-08-08 Thread Daniel P . Berrangé
Instead of each subdir containing its own custom rule for checking the augeas tests, use common rule for all. The new rule searches both src + build dirs for include files, since some augeas files will be auto-generated very shortly. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P.

[libvirt] [PATCH v4 06/42] remote: stop trying to print help as giant blocks of text

2019-08-08 Thread Daniel P . Berrangé
The remote daemon tries to print out its help text in a couple of giant blocks of text. This has already lead to duplication of the text for the privileged vs unprivileged execution mode. With the introduction of more daemons, this text is going to be duplicated many more times with small

[libvirt] [PATCH v4 39/42] remote: handle autoprobing of driver within virtproxyd

2019-08-08 Thread Daniel P . Berrangé
The virtproxyd daemon is merely responsible for forwarding RPC calls to one of the other per-driver daemons. As such, it does not have any drivers loaded and so regular auto-probing logic will not work. We need it to be able to handle NULL URIs though, so must implement some kind of alternative

[libvirt] [PATCH v4 36/42] remote: fix lock ordering mistake in event registration

2019-08-08 Thread Daniel P . Berrangé
If the event (un)registration methods are invoked while no connection is open, they jump to a cleanup block which unlocks a mutex which is not currently locked. Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 64

[libvirt] [PATCH v4 17/42] remote: conditionalize systemd socket unit files

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd socket unit files with other daemons by making various parts of their config conditionally defined by the make rules. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 4

[libvirt] [PATCH v4 42/42] remote: enable connecting to the per-driver daemons

2019-08-08 Thread Daniel P . Berrangé
Historically URIs handled by the remote driver will always connect to the libvirtd UNIX socket. There will now be one daemon per driver, and each of these has its own UNIX sockets to connect to. It will still be possible to run the traditional monolithic libvirtd though, which will have the

[libvirt] [PATCH v4 15/42] build: don't hardcode /etc in the config related files

2019-08-08 Thread Daniel P . Berrangé
Substitute in the @sysconfigdir@ value instead of /etc. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/locking/Makefile.inc.am | 1 + src/locking/virtlockd.service.in| 2 +- src/logging/Makefile.inc.am | 1 +

[libvirt] [PATCH v4 16/42] remote: reduce duplication in systemd unit file make rules into one

2019-08-08 Thread Daniel P . Berrangé
The make rules for the systemd socket unit files are all essentially identical and can be collapsed into a single generic rule. The service unit file rule can be simplified too. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH v4 07/42] remote: conditionalize daemon name in libvirtd daemon

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the daemon name conditionally defined by the make rules. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am| 1 +

[libvirt] [PATCH v4 02/42] build: collapse rules adding augeas tests to CLEANFILES

2019-08-08 Thread Daniel P . Berrangé
We already have a variable that lists all augeas test files, so we can add everything to CLEANFILES at once. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 1 + src/libxl/Makefile.inc.am | 1 - src/locking/Makefile.inc.am | 4 +---

[libvirt] [PATCH v4 22/42] network: introduce virtnetworkd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtnetworkd daemon will be responsible for providing the network API driver functionality. The network driver is still loaded by the main libvirtd daemon at this stage, so virtnetworkd must not be running at the same time. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani

[libvirt] [PATCH v4 33/42] admin: add ability to connect to the per-driver daemon sockets

2019-08-08 Thread Daniel P . Berrangé
The admin client now supports addressing the per-driver daemons using the obvious URI schemes for each daemon. eg virtqemud:///system virtqemud:///session, etc. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/libvirt-admin.c | 33 - 1

[libvirt] [PATCH v4 14/42] remote: refactor & rename variables for building libvirtd

2019-08-08 Thread Daniel P . Berrangé
The same make variables will be useful for building both libvirtd and the split daemons, so refactor & rename variables to facilitate reuse. Automake gets annoyed if you define a variable ending LDFLAGS: src/remote/Makefile.inc.am:53: warning: variable 'REMOTE_DAEMON_LDFLAGS' is defined but no

[libvirt] [PATCH v4 25/42] nodedev: introduce virtnodedevd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtnodedevd daemon will be responsible for providing the nodedev API driver functionality. The nodedev driver is still loaded by the main libvirtd daemon at this stage, so virtnodedevd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH v4 26/42] nwfilter: introduce virtnwfilterd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtnwfilterd daemon will be responsible for providing the nwfilter API driver functionality. The nwfilter driver is still loaded by the main libvirtd daemon at this stage, so virtnwfilterd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé

[libvirt] [PATCH v4 23/42] interface: introduce virtinterfaced daemon

2019-08-08 Thread Daniel P . Berrangé
The virtinterfaced daemon will be responsible for providing the interface API driver functionality. The interface driver is still loaded by the main libvirtd daemon at this stage, so virtinterfaced must not be running at the same time. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea

Re: [libvirt] [dockerfiles PATCH v3 0/3] Add libosinfo Dockerfiles

2019-08-08 Thread Andrea Bolognani
On Wed, 2019-08-07 at 16:50 +0200, Fabiano Fidêncio wrote: > This patch series aims to add libosinfo Dockerfiles to this project, so > those containers can be used by libosinfo projects' gitlab CI. > > Please, take a look at each patch for more context of what has been done. > > Changes since

[libvirt] [PATCH 02/10] qemu: Pass qemuCaps to qemuDomainDefFormatBufInternal

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 10/10] qemu: Pass correct qemuCaps to virDomainDeviceDefPostParse

2019-08-08 Thread Jiri Denemark
Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens

[libvirt] [PATCH 09/10] qemu: Pass correct qemuCaps to virDomainDefParseNode

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 05/10] qemu: Pass correct qemuCaps to virDomainDefParseString

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH v2] qemu: check if numa cell's cpu range match with cpu topology count

2019-08-08 Thread Maxiwell S. Garcia
QEMU shows a warning message if partial NUMA mapping is set. This patch adds a warning message in libvirt when editing the XML. It must be an error in future, when QEMU remove this ability. Signed-off-by: Maxiwell S. Garcia --- src/qemu/qemu_domain.c | 19 ++- 1 file changed, 14

[libvirt] [PATCH 07/10] qemu: Pass correct qemuCaps to virDomainDefCopy

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 06/10] qemu: Pass qemuCaps to qemuMigrationCookieXMLParse

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 01/10] qemu: Pass qemuCaps to qemuDomainDefCopy

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 04/10] qemu: Pass qemuCaps to qemuMigrationAnyPrepareDef

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 03/10] qemu: Pass qemuCaps to qemuDomainSaveImageOpen

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH v2 22/23] qemu-hotplug: handle hotplugging of slirp-helper

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_hotplug.c | 33 ++--- src/qemu/qemu_monitor.c | 13 ++--- src/qemu/qemu_monitor.h | 3 ++- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[libvirt] [PATCH v2 21/23] qemu-process: prepare slirp-helper

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau When the network interface is of "user" type, and QEMU has the "-net socket,fd=" datagram support, call qemuInterfacePrepareSlirp() to probe and associate a slirp-helper with the interface. The usage of automated slirp-helper can be prevented with disableSlirp (in

[libvirt] [PATCH v2 23/23] tests: add slirp-helper qemuxml2argv test

2019-08-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../net-user.x86_64-4.0.0.args| 34 +++ tests/qemuxml2argvtest.c | 16 + tests/testutilsqemu.h | 1 + 3 files changed, 51 insertions(+) create

[libvirt] [PATCH 10/12] qemu: Introduce code for blockdev-create

2019-08-08 Thread Peter Krempa
QEMU finally exposes an interface which allows us to instruct it to format or create arbitrary images. This is required for blockdev integration of block copy and snapshots as we need to pre-format images prior to use with blockdev-add. This path introduces job handling and also helpers for

[libvirt] [PATCH 09/12] qemu: blockjob: Copy non-detected chain fully in qemuBlockJobRewriteConfigDiskSource

2019-08-08 Thread Peter Krempa
Rather than copying just the top level image, let's copy the full user provided backing chain. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index

Re: [libvirt] [PATCH v2 00/15] Split and enhancement of virsh completer

2019-08-08 Thread Jonathon Jongsma
On Wed, 2019-08-07 at 10:30 +0200, Michal Privoznik wrote: > v2 of: > > https://www.redhat.com/archives/libvir-list/2019-July/msg01225.html > > diff to v1: > - Rebase and adapt to new checkpoint completer > > Michal Prívozník (15): > tools: s/Nodedev/NodeDevice/ > tools: Expose

Re: [libvirt] [PATCH v4 38/42] remote: open secondary drivers via remote driver if needed

2019-08-08 Thread Andrea Bolognani
On Thu, 2019-08-08 at 16:10 +0100, Daniel P. Berrangé wrote: > +++ b/src/remote/remote_daemon_dispatch.c > @@ -2077,6 +2105,9 @@ remoteDispatchConnectOpen(virNetServerPtr server > ATTRIBUTE_UNUSED, > unsigned int flags; > struct daemonClientPrivate *priv = >

[libvirt] [PATCH 11/12] qemu: Add blockdev support for the block copy job

2019-08-08 Thread Peter Krempa
Implement job handling for the block copy job (drive/blockdev-mirror) when using -blockdev. In contrast to the previously implemented blockjobs the block copy job introduces new images to the running qemu instance, thus requires a bit more handling. When copying to new images the code now makes

[libvirt] [PATCH 06/12] qemu: blockjob: Remove qemuBlockJobDiskRegisterMirror

2019-08-08 Thread Peter Krempa
The utility of the function is extremely limited as for block copy we need to register the mirror chain earlier than when it's set with the disk. This means that it would be open-coded in that case. Avoid any weird usage and just open-code the only current usage, remove the function, and reword

[libvirt] [PATCH 04/12] util: storage: Refactor logic for using virStorageFileGetBackendForSupportCheck

2019-08-08 Thread Peter Krempa
Modify the return value so that callers don't have to repeat logic. Signed-off-by: Peter Krempa --- src/util/virstoragefile.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index

[libvirt] [PATCH 03/12] qemu: fix broken handling of shallow flag in qemuDomainBlockCopyCommon

2019-08-08 Thread Peter Krempa
Commit 16ca234b56fac82 refactored how the 'shallow' and 'reuse' flags are accessed but neglected to fix the clearing of 'shallow' in case when the disk has no backing chain. This means that we'd request a shallow copy even without backing chain and also a few checks would work wrong. Fix it by

[libvirt] [PATCH 00/12] qemu: Add blockdev support for block copy (blockdev-add saga)

2019-08-08 Thread Peter Krempa
Add support for running a block-copy with -blockdev. This requires us to format our own images, so this series also adds support for blockdev-create which allows to do such a thing with qemu directly. blockdev-create will also be used with snapshots. Peter Krempa (12): qemu: domain: Allow

[libvirt] [PATCH 08/10] qemu: Pass correct qemuCaps to virDomainDefPostParse

2019-08-08 Thread Jiri Denemark
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while

[libvirt] [PATCH 00/10] Pass correct qemuCaps to qemuDomainDefPostParse

2019-08-08 Thread Jiri Denemark
Since qemuDomain{Device,}DefPostParse callbacks require qemuCaps, we need to make sure they get the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case the cached capabilities are not valid anymore.

[libvirt] [PATCH v4 08/42] remote: conditionalize driver loading in libvirtd daemon

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the driver(s) to load conditionally defined by the make rules. If nothing is set, all drivers will be loaded, ignoring any missing ones as historically done. If MODULE_NAME is set only one driver will be loaded and that one

[libvirt] [PATCH v4 12/42] remote: conditionalize IP socket config in augeas definitions

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd augeas defintions with other daemons by making the config parameters for IP sockets conditionally defined by the make rules. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitignore | 1 +

[libvirt] [PATCH v4 11/42] remote: conditionalize IP socket config in libvirtd.conf

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd config to create other daemons by making the config parameters for IP sockets conditionally defined by the make rules. The main libvirtd daemon will retain IP listen ability, but all the driver specific daemons will be local UNIX sockets only. Apps needing IP

[libvirt] [PATCH v4 21/42] secret: introduce virtsecretd daemon

2019-08-08 Thread Daniel P . Berrangé
The virtsecretd daemon will be responsible for providing the secret API driver functionality. The secret driver is still loaded by the main libvirtd daemon at this stage, so virtsecretd must not be running at the same time. Reviewed-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani

[libvirt] [PATCH v4 00/42] Split the libvirtd daemon into per-driver daemons

2019-08-08 Thread Daniel P . Berrangé
This is what all the driver refactoring I've done has been about enabling. We gain new daemons for each driver, for the primary virt drivers: virtlibxld virtlxcd virtqemud virtvboxd virtvzd And again for the secondary drivers virtinterfaced virtnetworkd virtnodedevd

[libvirt] [PATCH v4 05/42] build: centralize rule for handling generated config files

2019-08-08 Thread Daniel P . Berrangé
Instead of adding generated config files to CLEANFILES and BUILT_SOURCES in each makefile, add them all at once. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 3 +++ src/locking/Makefile.inc.am | 8 2 files changed, 3 insertions(+),

[libvirt] [PATCH v4 09/42] remote: conditionalize IP socket usage in libvirtd daemon

2019-08-08 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the use of IP sockets conditionally defined by the make rules. The main libvirtd daemon will retain IP listen ability, but all the driver specific daemons will be local UNIX sockets only. Apps needing IP connectivity will

Re: [libvirt] [PATCH v4 38/42] remote: open secondary drivers via remote driver if needed

2019-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2019 at 05:33:40PM +0200, Andrea Bolognani wrote: > On Thu, 2019-08-08 at 16:10 +0100, Daniel P. Berrangé wrote: > > +++ b/src/remote/remote_daemon_dispatch.c > > @@ -2077,6 +2105,9 @@ remoteDispatchConnectOpen(virNetServerPtr server > > ATTRIBUTE_UNUSED, > > unsigned int

[libvirt] [PATCH 02/12] qemu: Fix logic in qemuDomainBlockCopyCommonValidateUserMirrorBackingStore

2019-08-08 Thread Peter Krempa
Allow reusing original backing chain when doing a shallow copy without reuse of external image. The existing logic didn't allow it but it will be possible. Also add a note to explain that logic. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 29 + 1 file

[libvirt] [PATCH 08/12] conf: domain: Parse backingStore with VIR_DOMAIN_DEF_PARSE_DISK_SOURCE

2019-08-08 Thread Peter Krempa
The only code path which calls the parser with the VIR_DOMAIN_DEF_PARSE_DISK_SOURCE is from qemuDomainBlockCopy. Since that code path can properly handle backing chains for the disk and it's desired to pass the parsed chains to the block copy code remove the condition which prevents parsing the

[libvirt] [PATCH 01/12] qemu: domain: Allow formatting top source only in qemuDomainObjPrivateXMLFormatBlockjobFormatChain

2019-08-08 Thread Peter Krempa
Rename qemuDomainObjPrivateXMLFormatBlockjobFormatChain to qemuDomainObjPrivateXMLFormatBlockjobFormatSource and add a 'chain' parameter which allows controlling whether the backing chain is formatted. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 32 ++--

Re: [libvirt] [PATCH] tools: console: Relax stream EOF handling

2019-08-08 Thread Daniel Henrique Barboza
(CCing Nikolay Shirokovskiy, author of  29f2b5248c ) On 8/7/19 8:34 AM, Roman Bolshakov wrote: An attempt to poweroff a VM from inside triggers the error for existing session of virsh console and it returns with non-zero exit code: error: internal error: console stream EOF The message and

Re: [libvirt] [PATCH] docs: formatdomain: explain host-model/host-passthrough requirements

2019-08-08 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Unlike host-model, host-passthrough does not do any check, it just passes > "-cpu host" blindly. Therefore, lack of flags can and will result in > crashes---SIGSEGV if it happens in userspace, but worse if for example the > destination doesn't have an

[libvirt] [PATCH 3/4] test_driver: implement virDomainSetVcpu

2019-08-08 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 76 ++ 1 file changed, 76 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 99cba7db42..d6f1adf6e9 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 2/4] test_driver: implement virDomainGetGuestVcpus

2019-08-08 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 70 ++ 1 file changed, 70 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a6f239b9f1..99cba7db42 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 4/4] test_driver: implement virDomainSetGuestVcpus

2019-08-08 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 12 1 file changed, 12 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d6f1adf6e9..6698fb7cf6 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3070,6 +3070,17 @@

[libvirt] [PATCH 0/4] test_driver: implement the remaining VCPUs-related APIs

2019-08-08 Thread Ilias Stamatis
Ilias Stamatis (4): test_driver: make testDomainGetVcpus report all vcpus test_driver: implement virDomainGetGuestVcpus test_driver: implement virDomainSetVcpu test_driver: implement virDomainSetGuestVcpus src/test/test_driver.c | 167 +++-- 1 file

  1   2   >