[libvirt] [PATCH 1/2] libxl: add acpi slic table support

2019-09-06 Thread Marek Marczykowski-Górecki
From: Ivan Kardykov Libxl driver did not support setup additional acpi firmware to xen guest. It is necessary to activate OEM Windows installs. This patch allow to define in OS section acpi table param (which supported domain common schema). Signed-off-by: Ivan Kardykov [added info to

[libvirt] [PATCH 2/2] tests: libxl: ACPI slic table test

2019-09-06 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- .../fullvirt-acpi-slic.json | 54 +++ .../fullvirt-acpi-slic.xml| 32 +++ tests/libxlxml2domconfigtest.c| 2 + 3 files changed, 88 insertions(+) create mode 100644

Re: [libvirt] [PATCH 8/9] qemu: explicitly delete standard tap devices only on platforms that require it

2019-09-06 Thread Laine Stump
On 9/6/19 11:46 AM, Daniel P. Berrangé wrote: On Fri, Sep 06, 2019 at 11:37:12AM -0400, Laine Stump wrote: On 9/6/19 5:16 AM, Daniel P. Berrangé wrote: On Tue, Aug 27, 2019 at 09:46:38PM -0400, Laine Stump wrote: libvirt creates its tap devices without the IFF_PERSIST flag, so they will be

Re: [libvirt] [PATCH 4/4] qemu_capabilities: Temporarily disable dbus-vmstate capability

2019-09-06 Thread Ján Tomko
[cc-ing Marc-André] On Fri, Sep 06, 2019 at 04:25:19PM +0200, Michal Privoznik wrote: The qemu side is not merged in yet, so there is a chance that the interface will change. Don't detect the capability just yet then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - 1

Re: [libvirt] [PATCH 8/9] qemu: explicitly delete standard tap devices only on platforms that require it

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 11:37:12AM -0400, Laine Stump wrote: > On 9/6/19 5:16 AM, Daniel P. Berrangé wrote: > > On Tue, Aug 27, 2019 at 09:46:38PM -0400, Laine Stump wrote: > > > libvirt creates its tap devices without the IFF_PERSIST flag, so they > > > will be automatically deleted when qemu is

Re: [libvirt] [PATCH 2/4] lib: Grab write lock when modifying list of domains

2019-09-06 Thread Ján Tomko
On Fri, Sep 06, 2019 at 04:25:17PM +0200, Michal Privoznik wrote: In some places where virDomainObjListForEach() is called the passed callback calls virDomainObjListRemoveLocked(). Well, this is unsafe, because the former only grabs a read lock but the latter modifies the list. I've identified

Re: [libvirt] [PATCH 8/9] qemu: explicitly delete standard tap devices only on platforms that require it

2019-09-06 Thread Laine Stump
On 9/6/19 5:16 AM, Daniel P. Berrangé wrote: On Tue, Aug 27, 2019 at 09:46:38PM -0400, Laine Stump wrote: libvirt creates its tap devices without the IFF_PERSIST flag, so they will be automatically deleted when qemu is finished with them. In the case of tap devices created outside of libvirt,

[libvirt] [PATCH] Revert "dbus: correctly build reply message"

2019-09-06 Thread Michal Privoznik
This reverts commit 39dded7bb61444bb608fadd3f82f6fe93d08fd0e. This commit broke virpolkittest on Ubuntu 18 which has an old dbus (v1.12.2). Any other distro with the recent one works (v1.12.16) which hints its a bug in dbus somewhere. Revert the commit to stop tickling it. Signed-off-by: Michal

Re: [libvirt] [PATCH 0/3] Fix memlock limit during hotplug of mdev devices

2019-09-06 Thread Eric Farman
On 9/6/19 10:29 AM, Daniel Henrique Barboza wrote: > Hi, > > > I've thought about the issue you're fixing. Have you considered/tried > to handle the MemLockLimit upper in the call hierarchy with your new > qemuDomainAdjustMaxMemLockHostdev() function? Both > qemuDomainAttachMediatedDevice()

Re: [libvirt] [PATCH 3/4] qemu_slirp: Drop unused variable in qemuSlirpStart()

2019-09-06 Thread Ján Tomko
On Fri, Sep 06, 2019 at 04:25:18PM +0200, Michal Privoznik wrote: The @cmdstr variable is not used really. Signed-off-by: Michal Privoznik --- src/qemu/qemu_slirp.c | 1 - 1 file changed, 1 deletion(-) This is a trivial build breaker fix and can be pushed right away regardless of the rest of

Re: [libvirt] [PATCH 1/4] virdomainobjlist: Documnet virDomainObjListForEach()

2019-09-06 Thread Ján Tomko
On Fri, Sep 06, 2019 at 04:25:16PM +0200, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- s/Documnet/Document/ in the commit summary src/conf/virdomainobjlist.c | 13 + 1 file changed, 13 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt] [PATCH 0/3] Fix memlock limit during hotplug of mdev devices

2019-09-06 Thread Daniel Henrique Barboza
Hi, I've thought about the issue you're fixing. Have you considered/tried to handle the MemLockLimit upper in the call hierarchy with your new qemuDomainAdjustMaxMemLockHostdev() function? Both qemuDomainAttachMediatedDevice() and qemuDomainAttachHostPCIDevice() are called from

Re: [libvirt] [PATCH v2] util: Set backing file name for LOOP_GET_STATUS64 queries.

2019-09-06 Thread Daniel P . Berrangé
On Mon, Sep 02, 2019 at 02:00:27PM -0300, jcfara...@gmail.com wrote: > From: Julio Faracco > > This is an issue for LXC loop devices when you are trying to get loop > devices info using `ioctl`. Modern apps uses `/sys/dev/block` to grab > information about devices, but if you use the method

[libvirt] [PATCH 2/4] lib: Grab write lock when modifying list of domains

2019-09-06 Thread Michal Privoznik
In some places where virDomainObjListForEach() is called the passed callback calls virDomainObjListRemoveLocked(). Well, this is unsafe, because the former only grabs a read lock but the latter modifies the list. I've identified the following unsafe calls: - qemuProcessReconnectAll() -

[libvirt] [PATCH 4/4] qemu_capabilities: Temporarily disable dbus-vmstate capability

2019-09-06 Thread Michal Privoznik
The qemu side is not merged in yet, so there is a chance that the interface will change. Don't detect the capability just yet then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 3/4] qemu_slirp: Drop unused variable in qemuSlirpStart()

2019-09-06 Thread Michal Privoznik
The @cmdstr variable is not used really. Signed-off-by: Michal Privoznik --- src/qemu/qemu_slirp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 24df1e1a20..716b73759d 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@

[libvirt] [PATCH 1/4] virdomainobjlist: Documnet virDomainObjListForEach()

2019-09-06 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/conf/virdomainobjlist.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index d640da6205..11fd68745b 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@

[libvirt] [PATCH 0/4] Couple of qemu fixups

2019-09-06 Thread Michal Privoznik
The first issue (patch 2/4) is an issue I've found by code investigation. The second (patch 3/4) fixes a build problem and the last patch disables detection of a feature that is not merged in QEMU just yet. Michal Prívozník (4): virdomainobjlist: Documnet virDomainObjListForEach() lib: Grab

Re: [libvirt] [PATCH] libxl: Fix libxlDomainPMSuspendForDuration domain active check

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 04:12:55PM +0200, Marek Marczykowski-Górecki wrote: > virDomainObjCheckActive() returns -1 if domain is not active, not 0. > > Fixes cb50436c6f "libxl: implement virDomainPM* functions" > Signed-off-by: Marek Marczykowski-Górecki > --- > src/libxl/libxl_driver.c | 2 +- >

[libvirt] [PATCH] libxl: Fix libxlDomainPMSuspendForDuration domain active check

2019-09-06 Thread Marek Marczykowski-Górecki
virDomainObjCheckActive() returns -1 if domain is not active, not 0. Fixes cb50436c6f "libxl: implement virDomainPM* functions" Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c

Re: [libvirt] [PATCH 3/3] qemu: Adjust max memlock on mdev hotplug

2019-09-06 Thread Daniel Henrique Barboza
On 9/3/19 5:09 PM, Eric Farman wrote: When starting a domain, we use the presence of a vfio-pci or mdev hostdev to determine if the memlock maximum needs to be increased. But if we hotplug either of these devices, only the vfio-pci path gets that love. This means that attaching a, say,

Re: [libvirt] [PATCH 2/3] qemu: Reset the maximum locked memory on hotplug fail

2019-09-06 Thread Daniel Henrique Barboza
On 9/3/19 5:09 PM, Eric Farman wrote: If attaching a PCI hostdev fails, there are several things that need to be un-done as part of the cleanup. One thing that is not done is re-calculating/re-setting the maximum amount of locked memory for the domain, since we may have changed that. Let's

Re: [libvirt] [PATCH 1/3] qemu: Refactor the max memlock routine

2019-09-06 Thread Daniel Henrique Barboza
On 9/3/19 5:09 PM, Eric Farman wrote: Let's pull this hunk out into a function, so it can be reused in another codepath that needs to do the same thing. Signed-off-by: Eric Farman --- Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_domain.c | 30 ++

Re: [libvirt] [PATCH] qemu: update threading info about domain object refs

2019-09-06 Thread Daniel Henrique Barboza
On 9/4/19 2:23 PM, Jonathon Jongsma wrote: Since commit fd9ef3b31e, virDomainFindByUUIDRef() no longer exists and all virDomainObjListFindBy*() functions now increment the reference count. Signed-off-by: Jonathon Jongsma --- src/qemu/THREADS.txt | 16 +++- 1 file changed, 3

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

2019-09-06 Thread John Ferlan
On 8/8/19 10:55 AM, marcandre.lur...@redhat.com wrote: > 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

Re: [libvirt] [PATCH v2] util: Set backing file name for LOOP_GET_STATUS64 queries.

2019-09-06 Thread Julio Faracco
For further reference: https://github.com/lxc/lxc/commit/a70c9e85a6d8ac1b75d6705d2373fd9c7b567240 Em seg, 2 de set de 2019 às 14:00, escreveu: > > From: Julio Faracco > > This is an issue for LXC loop devices when you are trying to get loop > devices info using `ioctl`. Modern apps uses

[libvirt] [dockerfiles PATCH] refresh: Update Dockerfiles due to new "locales" dependency

2019-09-06 Thread Fabiano Fidêncio
Let's refresh the archived Dockerfiles as "locales" dependency has to be added to all Debian, Ubuntu, and Fedora files. Signed-off-by: Fabiano Fidêncio --- This commit is available in the following branch: https://gitlab.com/fidencio/libvirt-dockerfiles/tree/wip/locales Here's the

Re: [libvirt] [jenkins-ci PATCH] guests: Include "locales" by default

2019-09-06 Thread Fabiano Fidêncio
> + locales: > +CentOS: glibc-common Sorry, CentOS should be CentOS7. Sent a v2 with this one fixed. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [jenkins-ci PATCH v2] guests: Include "locales" by default

2019-09-06 Thread Fabiano Fidêncio
osinfo-db tests require "en_US.UTF-8" locale to be set. Unfortunately, our containers do not contain the needed locale file. After a discussion on libosinfo mailing list[0], it's been agreed on having the locale as part of our libvirt-jenkins-ci's base packages. [0]:

[libvirt] [jenkins-ci PATCH] guests: Include "locales" by default

2019-09-06 Thread Fabiano Fidêncio
osinfo-db tests require "en_US.UTF-8" locale to be set. Unfortunately, our containers do not contain the needed locale file. After a discussion on libosinfo mailing list[0], it's been agreed on having the locale as part of our libvirt-jenkins-ci's base packages. [0]:

Re: [libvirt] [PATCH v2 00/23] Use a slirp helper process

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, SLIRP networking can be running in a separate process. This allows for stricter security policies for QEMU & SLIRP, as SLIRP is notoriously not very safe (discussed on ML, various CVEs, and even the code says so

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_migration.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Michal Privoznik Michal -- libvir-list mailing list libvir-list@redhat.com

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_migration.c | 12 1 file changed, 12 insertions(+) Reviewed-by: Michal Privoznik Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v2 09/23] qemu: add dbus-vmstate

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Add dbusVMStates to keep a list of dbus-vmstate objects needed for migration. They are populated on the command line during start or qemuDBusVMStateAdd/Remove() will hotplug them as needed. Signed-off-by: Marc-André

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: 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é

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: > 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

Re: [libvirt] [PATCH v2 13/23] qemu-conf: add slirp state dir

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_conf.c | 4 src/qemu/qemu_conf.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: 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,

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: 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

Re: [libvirt] [PATCH v2 02/23] tests: fix xml2xml tpm-emulator.xml test

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau It is failing, because it ends up being parsed with version='default' and expects '1.2' instead. Signed-off-by: Marc-André Lureau --- tests/qemuxml2argvdata/tpm-emulator.xml | 2 +- 1 file changed, 1

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: 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:

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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:

Re: [libvirt] [PATCH v2 14/23] qemu: add slirp helper unit

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The unit provides the functions associated with a slirp-helper: - probing / checking capabilities - opening the socketpair - starting / stoping the helper - registering for dbus-vmstate migration Signed-off-by:

Re: [libvirt] [PATCH v2 06/23] qemu: add dbus-vmstate capability

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau This object is being proposed to qemu upstream "Add dbus-vmstate object". It handles data migration of external processes. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: 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

Re: [libvirt] [PATCH v2 01/23] Add .editorconfig

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:54 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Consistent code style across editors. Signed-off-by: Marc-André Lureau --- .editorconfig | 21 + 1 file changed, 21 insertions(+) create mode 100644 .editorconfig Reviewed-by: Michal

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

Re: [libvirt] [PATCH v2 15/23] qemu-domain: save and restore slirp state

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Save & restore the slirp helper PID associated with a network interface & the probed features. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 137 +

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

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

2019-09-06 Thread Michal Privoznik
On 8/8/19 4:55 PM, marcandre.lur...@redhat.com wrote: 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

Re: [libvirt] [PATCH 1/2] test_driver: implement virDomainPMSuspendForDuration

2019-09-06 Thread Ilias Stamatis
On Tue, Sep 3, 2019 at 8:17 PM Daniel Henrique Barboza wrote: > > > > On 9/3/19 2:00 PM, Daniel Henrique Barboza wrote: > > > > > > On 8/13/19 1:19 PM, Ilias Stamatis wrote: > >> Signed-off-by: Ilias Stamatis > >> --- > >> src/test/test_driver.c | 79 ++

Re: [libvirt] [PATCH] qemu: qapi: Limit traversal depth for QAPI schema queries

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 10:33:15AM +0200, Peter Krempa wrote: > Implicitly the query depth is limited by the length of the QAPI schema > query, but 'alternate' and 'array' QAPI meta-types don't consume a part > of the query string thus a loop on such types would get our traversal > code stuck in

Re: [libvirt] [PATCH] qemu: qapi: Limit traversal depth for QAPI schema queries

2019-09-06 Thread Peter Krempa
On Fri, Sep 06, 2019 at 09:50:41 +0100, Daniel Berrange wrote: > On Fri, Sep 06, 2019 at 10:33:15AM +0200, Peter Krempa wrote: > > Implicitly the query depth is limited by the length of the QAPI schema > > query, but 'alternate' and 'array' QAPI meta-types don't consume a part > > of the query

Re: [libvirt] [PATCH 8/9] qemu: explicitly delete standard tap devices only on platforms that require it

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:38PM -0400, Laine Stump wrote: > libvirt creates its tap devices without the IFF_PERSIST flag, so they > will be automatically deleted when qemu is finished with them. In the > case of tap devices created outside of libvirt, if the creating entity > wants the devices

Re: [libvirt] [PATCH 7/9] qemu: support unmanaged macvtap devices with

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:37PM -0400, Laine Stump wrote: > Traditionally, macvtap devices are supported using type='direct'>, but that type requires specifying a source device name > and macvtap mode which can't be altered after the initial device > creation (and may not even be available to

Re: [libvirt] [PATCH 6/9] qemu: support unmanaged target tap dev for

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:36PM -0400, Laine Stump wrote: > If managed='no', then the tap device must already exist, and setting > of MAC address and online status (IFF_UP) is skipped. > > NB: we still set IFF_VNET_HDR and IFF_MULTI_QUEUE as appropriate, > because those bits must be properly

Re: [libvirt] [PATCH 5/9] conf: new "managed" attribute for target dev of

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:35PM -0400, Laine Stump wrote: > Although has always been able to use an > existing tap device, this is just a coincidence due to the fact that > the same ioctl is used to create a new tap device or get a handle to > an existing device. > > Even then, once we have

Re: [libvirt] [PATCH 4/9] conf: use virXMLFormatElement for interface

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:34PM -0400, Laine Stump wrote: > This will simplify addition of another attribute to the element > > Signed-off-by: Laine Stump > --- > src/conf/domain_conf.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé Regards,

Re: [libvirt] [PATCH 3/9] qemu: reorganize qemuInterfaceEthernetConnect()

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:33PM -0400, Laine Stump wrote: > This just moves around a few things in qemuInterfaceConnect() with no > functional difference (except that a few failures that would have > previously resulted in a "success" audit log will now properly produce > a "fail" audit). The

Re: [libvirt] [PATCH 2/9] util: make a couple virNetDevMacVlan*() functions public

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:32PM -0400, Laine Stump wrote: > In virNetDevMacVLanOpen(), The "retries" arg has been removed and the > value hardcoded as 10, since previously the function was only called > from one place, so it was always 10. > > Signed-off-by: Laine Stump > --- >

Re: [libvirt] [PATCH 1/9] util: new function virNetDevMacVLanIsMacvtap()

2019-09-06 Thread Daniel P . Berrangé
On Tue, Aug 27, 2019 at 09:46:31PM -0400, Laine Stump wrote: > This function returns T if the given name is a macvtap device. This is > determined by 1) getting the ifindex of the device with that name (if > there is one), and 2) checking for existence of /dev/tapXX, where "XX" > is the ifindex

Re: [libvirt] [PATCH] qemu: qapi: Limit traversal depth for QAPI schema queries

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 10:33:15AM +0200, Peter Krempa wrote: > Implicitly the query depth is limited by the length of the QAPI schema > query, but 'alternate' and 'array' QAPI meta-types don't consume a part > of the query string thus a loop on such types would get our traversal > code stuck in

Re: [libvirt] [PATCH] qemu: maintain user alias for video type 'none'

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 09:58:32AM +0200, Erik Skultety wrote: > On Thu, Sep 05, 2019 at 11:17:38AM -0500, Jonathon Jongsma wrote: > > After parsing a video device with a model type of > > VIR_DOMAIN_VIDEO_TYPE_NONE, all device info is cleared (see > > virDomainDefPostParseVideo()) in order to

[libvirt] [PATCH] qemu: qapi: Limit traversal depth for QAPI schema queries

2019-09-06 Thread Peter Krempa
Implicitly the query depth is limited by the length of the QAPI schema query, but 'alternate' and 'array' QAPI meta-types don't consume a part of the query string thus a loop on such types would get our traversal code stuck in an infinite loop. Prevent this from happening by limiting the nesting

Re: [libvirt] [PATCH] qemu: maintain user alias for video type 'none'

2019-09-06 Thread Erik Skultety
On Thu, Sep 05, 2019 at 11:17:38AM -0500, Jonathon Jongsma wrote: > After parsing a video device with a model type of > VIR_DOMAIN_VIDEO_TYPE_NONE, all device info is cleared (see > virDomainDefPostParseVideo()) in order to avoid formatting any > auto-generated values for the XML. Subsequently,

Re: [libvirt] [PATCH] vircgroupv2: fix setting cpu.max period

2019-09-06 Thread Erik Skultety
On Thu, Sep 05, 2019 at 11:44:47AM +0200, Pavel Hrdina wrote: > When we set cpu.max period we need to parse the cpu.max file first as > it contains both quota and period values separated by space. When only > a single number is written to that file it will set quota, in order to "... quota.