Re: [PATCH] apparmor: fix qemu_bridge_helper for named profile

2020-01-30 Thread Christian Ehrhardt
On Thu, Jan 30, 2020 at 8:29 AM Michal Privoznik wrote: > On 1/30/20 8:21 AM, Christian Ehrhardt wrote: > > Since a3ab6d42 "apparmor: convert libvirtd profile to a named profile" > > the detection of the subelement for qemu_bridge_helper is wrong. > > > > In combination with the older 123cc3e1

Re: [PATCH 05/10] qemuMigrationCookieNBD: Extract embedded struct

2020-01-30 Thread Peter Krempa
On Thu, Jan 30, 2020 at 16:51:22 +0100, Michal Privoznik wrote: > On 1/30/20 3:53 PM, Peter Krempa wrote: > > Extract the struct so that it's type has a name. > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_migration_cookie.h | 10 ++ > > 1 file changed, 6 insertions(+),

Re: [libvirt PATCHv3 00/12] add virtiofs support (virtio-fs epopee)

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 06:06:16PM +0100, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1694166 > v1: https://www.redhat.com/archives/libvir-list/2019-November/msg5.html > v2: https://www.redhat.com/archives/libvir-list/2020-January/msg00980.html A couple of general questions

[libvirt PATCH] docs: Update godoc URLs for Go packages

2020-01-30 Thread Andrea Bolognani
Since commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 Author: Daniel P. Berrangé Date: Mon Dec 16 10:06:50 2019 + docs: add pages to support Go module package resolution it's possible to use import "libvirt.org/libvirt-go" import "libvirt.org/libvirt-go-xml" in Go

[libvirt PATCH] docs: Update download location for Go packages

2020-01-30 Thread Andrea Bolognani
We haven't ever made releases of the Go components, which makes sense because that's just not how that specific ecosystem works. For people who are looking to use libvirt from Go, the brief introductory pages located at the same URLs used to import the packages are a much better entry point than

[libvirt PATCHv3 10/12] qemu: add code for handling virtiofsd

2020-01-30 Thread Ján Tomko
Start virtiofsd for each device using it. Pre-create the socket for communication with QEMU and pass it to virtiofsd. Note that virtiofsd needs to run as root. https://bugzilla.redhat.com/show_bug.cgi?id=1694166 Introduced by QEMU commit a43efa34c7d7b628cbf1ec0fe60043e5c91043ea

[libvirt PATCHv3 07/12] qemu: add virtiofsd_debug to qemu.conf

2020-01-30 Thread Ján Tomko
Add a 'virtiofsd_debug' option for tuning whether to run virtiofsd in debug mode. Signed-off-by: Ján Tomko --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf | 7 +++ src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 1 +

[libvirt PATCHv3 09/12] qemu: forbid migration with vhost-user-fs device

2020-01-30 Thread Ján Tomko
This is not yet supported. Signed-off-by: Ján Tomko --- src/qemu/qemu_migration.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 9320985648..e7390fdf5b 100644 --- a/src/qemu/qemu_migration.c +++

[libvirt PATCHv3 06/12] conf: add virtiofs-related elements and attributes

2020-01-30 Thread Ján Tomko
Add more elements for tuning the virtiofsd daemon and the vhost-user-fs device: /usr/libexec/virtiofsd Signed-off-by: Ján Tomko --- docs/formatdomain.html.in | 25 +++- docs/schemas/domaincommon.rng | 48 src/conf/domain_conf.c

[libvirt PATCHv3 02/12] schema: wrap fsDriver in a choice group

2020-01-30 Thread Ján Tomko
Allow adding new groups without changing indentation. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa Acked-by: Stefan Hajnoczi --- docs/schemas/domaincommon.rng | 50 +++ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git

[libvirt PATCHv3 11/12] qemu: use the vhost-user schemas to find binary

2020-01-30 Thread Ján Tomko
Look into /usr/share/qemu/vhost-user to see whether we can find a suitable virtiofsd binary, in case the user did not provide one in the domain XML. Signed-off-by: Ján Tomko --- src/qemu/qemu_extdevice.c | 9 + src/qemu/qemu_vhost_user.c | 40 ++

[libvirt PATCHv3 03/12] qemu: add QEMU_CAPS_VHOST_USER_FS

2020-01-30 Thread Ján Tomko
Introduced by QEMU commit 98fc1ada4cf70af0f1df1a2d7183cf786fc7da05 virtio: add vhost-user-fs base device Released in QEMU v4.2.0. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa Acked-by: Stefan Hajnoczi --- src/qemu/qemu_capabilities.c | 2 ++

[libvirt PATCHv3 04/12] docs: add virtiofs kbase

2020-01-30 Thread Ján Tomko
Add a document describing the usage of virtiofs. --- docs/kbase.html.in | 3 + docs/kbase/virtiofs.rst | 152 2 files changed, 155 insertions(+) create mode 100644 docs/kbase/virtiofs.rst diff --git a/docs/kbase.html.in b/docs/kbase.html.in index

[libvirt PATCHv3 05/12] conf: qemu: add virtiofs fsdriver type

2020-01-30 Thread Ján Tomko
Introduce a new 'virtiofs' driver type for filesystem. Signed-off-by: Ján Tomko --- docs/formatdomain.html.in | 12 ++- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c| 1 + src/conf/domain_conf.h

[libvirt PATCHv3 08/12] qemu: validate virtiofs filesystems

2020-01-30 Thread Ján Tomko
Reject unsupported configurations. Signed-off-by: Ján Tomko --- src/qemu/qemu_domain.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6367f5394e..b5d5812ff8 100644 ---

[libvirt PATCHv3 00/12] add virtiofs support (virtio-fs epopee)

2020-01-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1694166 v1: https://www.redhat.com/archives/libvir-list/2019-November/msg5.html v2: https://www.redhat.com/archives/libvir-list/2020-January/msg00980.html new in v3: * renamed qemu.conf option * removed cache-size since it was not yet merged in

[libvirt PATCHv3 12/12] qemu: build vhost-user-fs device command line

2020-01-30 Thread Ján Tomko
Format the 'vhost-user-fs' device on the QEMU command line. This device provides shared file system access using the FUSE protocol carried over virtio. The actual file server is implemented in an external vhost-user-fs device backend process. https://bugzilla.redhat.com/show_bug.cgi?id=1694166

[libvirt PATCHv3 01/12] qemuExtDevicesStart: pass logManager

2020-01-30 Thread Ján Tomko
--- src/qemu/qemu_extdevice.c | 1 + src/qemu/qemu_extdevice.h | 1 + src/qemu/qemu_process.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 9c0c0fd573..7f3bb104d9 100644 --- a/src/qemu/qemu_extdevice.c +++

Re: [PATCH v2 00/21] PCI Multifunction hotplug/hotunplug support

2020-01-30 Thread Daniel Henrique Barboza
I forgot to add in the cover: - you can find the feature in this github branch, applied on top of master at commit 49882b3337: https://github.com/danielhb/libvirt/tree/multif_v2 - scenarios tested with the feature, all of them using a BCM5719 multifunction network card on a Power8 host: *

Re: [PATCH] docs: update Rust releases and resources links

2020-01-30 Thread Andrea Bolognani
On Thu, 2020-01-30 at 15:19 +0100, Sahid Orentino Ferdjaoui wrote: > This is updating the releases and resources links so they point now to > crates.io for the releases and docs.rs for the api ref. > > Signed-off-by: Sahid Orentino Ferdjaoui > --- > docs/downloads.html.in | 6 -- > 1 file

[PATCH v2 18/21] qemu: hotplug: Implement multifunction device unplug

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The same design ideas used in multifunction hotplug were used here as well. qemuDomainDetachDeviceConfig() was changed to accept a list of devices instead of a single device definition. qemuDomainDetachDeviceLiveAndConfig() was changed to handle device lists as well.

[PATCH v2 20/21] qemu_hotplug: do not hotplug/hotunplug 'unassigned' hostdevs

2020-01-30 Thread Daniel Henrique Barboza
The new address type 'unassigned' allows for a hostdev to be managed by Libvirt, but not be assigned for guest usage. This can allow us to execute PCI multifunction hotplug, with managed mode, leaving non-zero functions unassigned. For hotplug and unplug , we'll skip unassigned devices when

[PATCH v2 21/21] qemu_hotplug.c: use enhanced multifunction unplug if available

2020-01-30 Thread Daniel Henrique Barboza
QEMU 4.2.0 introduced an enhanced version of the PCI multifunction hotunplug for the PSeries guest [1] where a single device_del of the function 0 will detach all the functions of the slot. The idea is to make this option similar to the behavior we already have on x86. This means that the unplug

[PATCH v2 14/21] qemu: hotplug: Queue and wait for multiple devices

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat With multifunction devices, multiple delete requests are sent to qemu and all the requests should be queued up. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.h | 3 ++- src/qemu/qemu_hotplug.c | 41

[PATCH v2 12/21] qemu: refactor qemuDomain[Attach|Detach]DeviceConfig

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat This helps calling the routines with a list of devices. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 45 +- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git

[PATCH v2 11/21] Introduce qemuDomainDeviceParseXMLMany

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 70 ++ src/qemu/qemu_domain.h | 7 + 2 files changed, 77 insertions(+) diff --git a/src/qemu/qemu_domain.c

[PATCH v2 15/21] domain: addr: Introduce virDomainPCIAddressEnsureMultifunctionAddress

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/conf/device_conf.h | 6 +++ src/conf/domain_addr.c | 84 +++- src/conf/domain_addr.h | 5 +++ src/libvirt_private.syms | 1 +

[PATCH v2 19/21] qemu_hotplug.c: tune unplugTimeout for multifunction detach

2020-01-30 Thread Daniel Henrique Barboza
In a multifunction hot-unplug, QEMU will unplug all the functions in a single detach operation, sequentially, triggered by the detach of function zero for Pseries guests or any function for x86 guests. This impacts the amount of timeout we're supposed to wait - an unplug operation with 4 hostdevs

[PATCH v2 17/21] qemu: hotplug: Prevent updates to multifunction device

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat PCI hostdevs once part of the domain can't be changed. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c

[PATCH v2 16/21] qemu: hotplug: Implement multifunction device hotplug

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The support to allow multifunction device hotplug consists of using virDomainDeviceDefListPtr lists instead of single virDomainDeviceDefPtr device definitions in both qemuDomainAttachDeviceConfig() and qemuDomainAttachDeviceLive(). In AttachDeviceConfig() the same

[PATCH v2 02/21] utils: PCI multifunction detection helpers

2020-01-30 Thread Daniel Henrique Barboza
This patch introduces two helpers that will be used in the next patches. One is virpci.c:virPCIDeviceIsMultifunction(), and the other is virhostdev.c:virHostdevIsPCIMultifunctionDevice(). Signed-off-by: Daniel Henrique Barboza --- src/libvirt_private.syms | 2 ++ src/util/virhostdev.c| 25

[PATCH v2 03/21] virhostdev: Introduce virHostdevPCIDevicesBelongToSameSlot

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/libvirt_private.syms | 1 + src/util/virhostdev.c| 29 + src/util/virhostdev.h| 2 ++ 3 files changed, 32 insertions(+) diff --git

[PATCH v2 07/21] qemu: hostdev: Move the hostdev preparation to a separate function

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat No functional change. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 80 ++--- src/qemu/qemu_hotplug.h | 5 +++ 2 files changed, 56 insertions(+), 29 deletions(-) diff --git

[PATCH v2 13/21] qemu: refactor qemuDomain[Attach|Detach]DeviceLive

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Helps calling multiple time per device. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c

[PATCH v2 05/21] conf: qemu: validate multifunction hostdevice domain configs

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat It is invalid to have secondary functions without the primary functions part of the domain. Prevents new domain define, but existing ones would not vanish. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c

[PATCH v2 10/21] Introduce virDomainDeviceDefParseXMLMany

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat virDomainDeviceDefParseXMLMany will be used to parse '' XML elements that will be used to supply multiple hostdevs for hotplug/unplug. The idea is to parse each dev individually, by calling the same code that already handles it today. The result is returned in a new

[PATCH v2 04/21] qemu: address: Enable auto addressing multifunction cards

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat For existing domains using the primary function alone of a multifunction card, the card is still treated as a multifunction card. This is done to prevent hotplug of other functions when the primary function is already hotplugged. If the secondary functions are part of

[PATCH v2 08/21] qemu: hotplug: Move the detach of PCI device to the beginning of live hotplug

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The hostdevices are the only devices which have dependencies outside of themselves such that, other functions of the PCI card should also have been detached from host driver before attempting the hotplug. This patch moves the detach to the beginning of the hotplug so

[PATCH v2 09/21] qemu: hotplug: move assignment outside qemuDomainAttachHostPCIDevice

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat No functional change. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[PATCH v2 00/21] PCI Multifunction hotplug/hotunplug support

2020-01-30 Thread Daniel Henrique Barboza
This series adds PCI multifunction hotplug/unplug capabilities for Libvirt. Some of these patches were sent last year in a shorter prep series in [1]. The patches then got a bit of rework to keep up with Libvirt changes in master. This work follows the considerations made for the unplug design in

[PATCH v2 06/21] conf: Add helper to get active functions of a slot of domain

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat In some cases it may be better to have a bitmap representing the state of individual functions rather than iterating the definition. The new helper creates a bitmap representing the state from the domain definition. Signed-off-by: Shivaprasad G Bhat Signed-off-by:

[PATCH v2 01/21] qemu: address: Separate the slots into multiple aggregates

2020-01-30 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Today's aggregate flag with the slot being true for pcie-root-ports is not enough as there will more number of aggregates depending on the number of Multifunction PCI cards assigned to the domain. The aggregate is changed to unsigned int. Zero means Not Applicable, 1 is

Re: [PATCH 05/10] qemuMigrationCookieNBD: Extract embedded struct

2020-01-30 Thread Michal Privoznik
On 1/30/20 3:53 PM, Peter Krempa wrote: Extract the struct so that it's type has a name. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.h

Re: [PATCH 00/10] qemu: Fix pre-creation of non-shared storage on migration

2020-01-30 Thread Michal Privoznik
On 1/30/20 3:53 PM, Peter Krempa wrote: The last patch fixes a bug where we'd fail to detect capacity of disks on migration source due to changes in disk topology related to blockdev. The rest of the series makes the function at least somewhat sane. Peter Krempa (10): util: hash: Use g_new0

Re: [PATCH 06/10] qemuMigrationCookieAddNBD: Use glib memory allocators

2020-01-30 Thread Michal Privoznik
On 1/30/20 3:53 PM, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 73ae815818..1c3de13983 100644 ---

Re: [PATCH 1/6] apparmor: Fix parthelper, iohelper and virt-aa-helper paths in profiles

2020-01-30 Thread Michal Privoznik
On 1/30/20 4:27 PM, Jim Fehlig wrote: On 1/29/20 11:48 PM, Michal Privoznik wrote: Ah, so I guess SUSE has a patch that moves virt-aa-helper from its default location then? No. The configure script is invoked with '--libexecdir=%{_libdir}/%{name}'. I'd have to dig deep into history to know

Re: [PATCH 1/6] apparmor: Fix parthelper, iohelper and virt-aa-helper paths in profiles

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 03:27:56PM +, Jim Fehlig wrote: > On 1/29/20 11:48 PM, Michal Privoznik wrote: > > Ah, so I guess SUSE has a patch that moves virt-aa-helper from its default > > location then? > > No. The configure script is invoked with '--libexecdir=%{_libdir}/%{name}'. > I'd >

Re: [PATCH 1/6] apparmor: Fix parthelper, iohelper and virt-aa-helper paths in profiles

2020-01-30 Thread Jim Fehlig
On 1/29/20 11:48 PM, Michal Privoznik wrote: > Ah, so I guess SUSE has a patch that moves virt-aa-helper from its default > location then? No. The configure script is invoked with '--libexecdir=%{_libdir}/%{name}'. I'd have to dig deep into history to know why that's the case. Regards, Jim

Re: [libvirt PATCH v2 36/56] tests: remove event loop from command test

2020-01-30 Thread Pavel Hrdina
On Tue, Jan 28, 2020 at 01:11:17PM +, Daniel P. Berrangé wrote: > This effectively reverts > > commit 39c77fe586baccd0a4a9862e8cf7c78ac7af3494 > Author: Michal Prívozník > Date: Wed Jan 16 11:58:00 2013 +0100 > > Introduce event loop to commandtest > > because nothing in the

Re: [libvirt PATCH 2/2] nwfilter: Use immediate paket delivery mode rather than buffering

2020-01-30 Thread Eric Blake
On 1/30/20 8:43 AM, Erik Skultety wrote: Our nwfilter code doesn't set any timeout on the pcap paket buffer which packet means that when DHCP snooping is enabled on a guest interface and libvirt is trying to learn the IP address from guest's DHCP traffic, it takes up to 4x longer to ping a

Re: [libvirt PATCH v2 35/56] tests: convert eventtest to use public event APIs

2020-01-30 Thread Pavel Hrdina
On Tue, Jan 28, 2020 at 01:11:16PM +, Daniel P. Berrangé wrote: > The event test directly calls the internal poll event impl > APIs. It does not rely on any specific details of the poll > impl, so it is better to use the public APIs. > > Signed-off-by: Daniel P. Berrangé > --- >

[PATCH 03/10] Remove checking of return value of virHashNew

2020-01-30 Thread Peter Krempa
There are two calls to virHashNew which check the return value. It's not necessary any more as virHashNew always returns a valid pointer. Signed-off-by: Peter Krempa --- src/conf/backup_conf.c | 6 +- src/qemu/qemu_monitor_json.c | 3 +-- 2 files changed, 2 insertions(+), 7

[PATCH 08/10] qemuMigrationCookieAddNBD: Use virHashNew and automatic freeing of virHashTablePtr

2020-01-30 Thread Peter Krempa
Swithc to the helper which doesn't require checking of the return value. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index

[PATCH 07/10] qemuMigrationCookieAddNBD: Move monitor call out of the loop

2020-01-30 Thread Peter Krempa
The data is gathered only once so we can move the whole block which fetches the data out of the loop and get rid of the logic which prevents multiple calls. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 23 +-- 1 file changed, 9 insertions(+), 14

Re: [libvirt PATCH 1/2] libpcap: Bump the minimum required version to >= 1.5.0

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 03:43:05PM +0100, Erik Skultety wrote: > libpcap-1.5.0 introduced a function to enforce immediate mode (on all > platforms) which the follow-up patches will rely on. Per https://repology.org/project/libpcap/versions RHEL-7 has 1.5.3, Debian 9 has 1.8.1 Ubuntu 1604 has

[PATCH 10/10] qemuMigrationCookieAddNBD: Fix filling of 'capacity' when blockdev is used

2020-01-30 Thread Peter Krempa
With -blockdev we must look up via the nodename rather than the 'drive' alias which is not present any more. This fixes the pre-creation of storage volumes on migration with non-shared storage. https://bugzilla.redhat.com/show_bug.cgi?id=1793263 Signed-off-by: Peter Krempa ---

[PATCH 01/10] util: hash: Use g_new0 for allocating hash internals

2020-01-30 Thread Peter Krempa
Use the glib helpers and remove the mention of returning NULL on failure of virHashNew, virHashCreate and virHashCreateFull. Signed-off-by: Peter Krempa --- src/util/virhash.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/util/virhash.c

[PATCH 04/10] qemuMigrationCookieAddNBD: Exit early if there are no disks

2020-01-30 Thread Peter Krempa
Refactor the logic to skip the body of the function if there's nothing to do. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c

[PATCH 05/10] qemuMigrationCookieNBD: Extract embedded struct

2020-01-30 Thread Peter Krempa
Extract the struct so that it's type has a name. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_cookie.h index 20e1ed60ca..1e88684589

[PATCH 06/10] qemuMigrationCookieAddNBD: Use glib memory allocators

2020-01-30 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 73ae815818..1c3de13983 100644 --- a/src/qemu/qemu_migration_cookie.c +++

[PATCH 09/10] qemuMigrationCookieAddNBD: Remove 'ret' variable and 'cleanup' label

2020-01-30 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 968a9b589c..734d95f4f1 100644 --- a/src/qemu/qemu_migration_cookie.c +++

Re: [libvirt PATCH 2/2] nwfilter: Use immediate paket delivery mode rather than buffering

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 03:43:06PM +0100, Erik Skultety wrote: > Our nwfilter code doesn't set any timeout on the pcap paket buffer which > means that when DHCP snooping is enabled on a guest interface and > libvirt is trying to learn the IP address from guest's DHCP traffic, it > takes up to 4x

[PATCH 00/10] qemu: Fix pre-creation of non-shared storage on migration

2020-01-30 Thread Peter Krempa
The last patch fixes a bug where we'd fail to detect capacity of disks on migration source due to changes in disk topology related to blockdev. The rest of the series makes the function at least somewhat sane. Peter Krempa (10): util: hash: Use g_new0 for allocating hash internals conf:

[PATCH 02/10] conf: domain: Remove checking of return value of virHashCreateFull

2020-01-30 Thread Peter Krempa
This module has last two direct checks whether the value returned by virHashCreateFull is NULL. Remove them so that static analyzers don't get the false idea that checking the value is necessary. Signed-off-by: Peter Krempa --- src/conf/domain_addr.c | 32 +--- 1

Re: [libvirt PATCH v2 34/56] rpc: convert RPC client to use GMainLoop instead of poll

2020-01-30 Thread Pavel Hrdina
On Tue, Jan 28, 2020 at 01:11:15PM +, Daniel P. Berrangé wrote: > To eliminate the dependancy on GNULIB's poll impl, we need > to change the RPC client code to use GMainLoop. We don't > really want to use GIOChannel, but it provides the most > convenient way to do socket event watches with

[libvirt PATCH 1/2] libpcap: Bump the minimum required version to >= 1.5.0

2020-01-30 Thread Erik Skultety
libpcap-1.5.0 introduced a function to enforce immediate mode (on all platforms) which the follow-up patches will rely on. Signed-off-by: Erik Skultety --- libvirt.spec.in| 2 +- m4/virt-libpcap.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in

[libvirt PATCH 2/2] nwfilter: Use immediate paket delivery mode rather than buffering

2020-01-30 Thread Erik Skultety
Our nwfilter code doesn't set any timeout on the pcap paket buffer which means that when DHCP snooping is enabled on a guest interface and libvirt is trying to learn the IP address from guest's DHCP traffic, it takes up to 4x longer to ping a guest successfully compared to a case where nwfilter

Re: [libvirt-rust PATCH v3 0/4] Map more functions in stream module

2020-01-30 Thread Sahid Orentino Ferdjaoui
On Wed, Jan 29, 2020 at 08:24:10PM -0700, Zixing Liu wrote: > This set of patches will add more functions to the Rust bindings. > Newly mapped functions from C library: virStreamNew > virStreamEventUpdateCallback virStreamEventRemoveCallback > virStreamEventAddCallback. > >

[libvirt PATCH 0/2] Use immediate paket delivery mode instead of buffering in the DHCP snoop thread

2020-01-30 Thread Erik Skultety
See patch 2 for the reasoning. Erik Skultety (2): libpcap: Bump the minimum required version to >= 1.5.0 nwfilter: Use immediate paket delivery mode rather than buffering libvirt.spec.in | 2 +- m4/virt-libpcap.m4| 2 +- src/nwfilter/nwfilter_dhcpsnoop.c

[PATCH] docs: update Rust releases and resources links

2020-01-30 Thread Sahid Orentino Ferdjaoui
This is updating the releases and resources links so they point now to crates.io for the releases and docs.rs for the api ref. Signed-off-by: Sahid Orentino Ferdjaoui --- docs/downloads.html.in | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/downloads.html.in

[PATCH v3 1/3] apparmor: Reflect paths from configure in profiles

2020-01-30 Thread Michal Privoznik
The configure script allows users to specify different paths for /etc/, /usr/sbin/, /var/run/ and /usr/libexec/. Instead of assuming user will pass expected value, generate the apparmor profiles using the actual values. Signed-off-by: Michal Privoznik --- src/security/Makefile.inc.am

[PATCH v3 3/3] docs: Fix virt-aa-helper location

2020-01-30 Thread Michal Privoznik
The location of virt-aa-helper shown in the docs is incorrect. The helper binary is installed under libexec dir. Signed-off-by: Michal Privoznik --- docs/drvqemu.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in index

[PATCH v3 2/3] apparmor: Allow libvirt to spawn virt-aa-helper and libvirt_lxc

2020-01-30 Thread Michal Privoznik
Both of these binaries are spawn by libvirt. Add a rule to the default profile to allow that. Signed-off-by: Michal Privoznik --- src/security/apparmor/usr.sbin.libvirtd.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/apparmor/usr.sbin.libvirtd.in

[PATCH v3 0/3] Couple of apparmor fixes

2020-01-30 Thread Michal Privoznik
v3 of: https://www.redhat.com/archives/libvir-list/2020-January/msg01321.html diff to v2: - Instead of hard coding libexec path, generate it according to configure arguments *** BLURB HERE *** Michal Prívozník (3): apparmor: Reflect paths from configure in profiles apparmor: Allow

Re: [libvirt-go PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Andrea Bolognani
On Thu, 2020-01-30 at 13:58 +0100, Peter Krempa wrote: > On Thu, Jan 30, 2020 at 13:47:50 +0100, Andrea Bolognani wrote: > > @@ -32,7 +32,7 @@ changes may apply to future versions: > > > > ## Documentation > > > > -* [api documentation for the > >

Re: [libvirt-go PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Peter Krempa
On Thu, Jan 30, 2020 at 13:47:50 +0100, Andrea Bolognani wrote: > Since > > commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 > Author: Daniel P. Berrangé > Date: Mon Dec 16 10:06:50 2019 + > > docs: add pages to support Go module package resolution > > it's possible to use > >

Re: [libvirt-go-xml PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 01:48:00PM +0100, Andrea Bolognani wrote: > Since > > commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 > Author: Daniel P. Berrangé > Date: Mon Dec 16 10:06:50 2019 + > > docs: add pages to support Go module package resolution > > it's possible to use >

Re: [libvirt-go PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Daniel P . Berrangé
On Thu, Jan 30, 2020 at 01:47:50PM +0100, Andrea Bolognani wrote: > Since > > commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 > Author: Daniel P. Berrangé > Date: Mon Dec 16 10:06:50 2019 + > > docs: add pages to support Go module package resolution > > it's possible to use >

[libvirt-go-xml PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Andrea Bolognani
Since commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 Author: Daniel P. Berrangé Date: Mon Dec 16 10:06:50 2019 + docs: add pages to support Go module package resolution it's possible to use import "libvirt.org/libvirt-go-xml" in Go programs, which will result in the Go

[libvirt-go PATCH] Import from libvirt.org instead of github.com

2020-01-30 Thread Andrea Bolognani
Since commit 201156ec6e65e08cdb04d6fdefe013652fb7fa87 Author: Daniel P. Berrangé Date: Mon Dec 16 10:06:50 2019 + docs: add pages to support Go module package resolution it's possible to use import "libvirt.org/libvirt-go" in Go programs, which will result in the Go