Re: [PATCH] News: Several apparmor improvements at v6.7.0

2020-11-13 Thread Jianan Gao
Hi Andrea, Thanks for your advice, i'll try again with your suggestions! Jianan Gao On Thu, Nov 12, 2020 at 9:45 PM Andrea Bolognani wrote: > Please don't CC individual developers when posting patches: we're all > subscribed to the mailing list. > > On Mon, 2020-11-09 at 15:33 +0800, jgao

Re: [PATCH] util: remove ATTRIBUTE_NONNULL from virDirClose declaration

2020-11-13 Thread Laine Stump
After short discussion on IRC, I pushed this as "trivial". On 11/13/20 12:42 PM, Laine Stump wrote: Before commit 24d8968c, virDirClose took a DIR**, and that was never NULL, so its declaration included ATTRIBUTE_NONNULL(1). Since that commit, virDirClose takes a DIR*, and it may be NULL (e.g.

Re: [PATCH 1/1] qemu_driver.c: do not redefine 'event' in qemuDomainDefineXMLFlags()

2020-11-13 Thread John Ferlan
On 11/13/20 12:57 PM, Daniel Henrique Barboza wrote: > A bad merge while rebasing 74b2834333a caused the @event variable > to be defined twice, inside the 'cleanup' label, causing coverity > errors. > > This code was originally moved outside of the label by commit > 773c7c43611a. Delete the

Re: [PATCH v1 02/10] qemu_domain.c: align memory modules before calculating 'initialmem'

2020-11-13 Thread Daniel Henrique Barboza
(Peter, I cc'ed you because I cited one of your commits and you might want to weight in) On 11/13/20 10:51 AM, Andrea Bolognani wrote: On Fri, 2020-11-13 at 09:58 -0300, Daniel Henrique Barboza wrote: On 11/13/20 7:30 AM, Andrea Bolognani wrote: On Wed, 2020-11-11 at 19:07 -0300, Daniel

Re: [PATCH 4/4] ci: Run test suite on macOS

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 16:58 +0100, Michal Privoznik wrote: > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > -- if test "$(uname)" = "FreeBSD"; then ninja -C build dist; fi > > -- if test "$(uname)" = "Darwin"; then ninja -C build && ninja -C build > > install; fi > > +- ninja -C

Re: [PATCH 3/4] qemuxml2argvtest: Increase timeout on macOS

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 16:58 +0100, Michal Privoznik wrote: > On 11/8/20 10:24 PM, Roman Bolshakov wrote: > > + if data['name'] == 'qemuxml2argvtest' and host_machine.system() == > > 'darwin' > > +timeout = 180 > > + else > > +# default meson timeout > > +timeout = 30 > > + endif >

[PATCH] virsh: Added attach-disk support for network disk

2020-11-13 Thread Ryan Gahagan
Related issue: https://gitlab.com/libvirt/libvirt/-/issues/16 Added in support for the following parameters in attach-disk: --source-protocol --source-host-name --source-host-socket --source-host-transport Added documentation to virsh.rst specifying usage. Signed-off-by: Ryan Gahagan ---

Re: [PATCH v1 01/10] qemu_driver.c: use g_autoptr() with virDomainDef pointers

2020-11-13 Thread Daniel Henrique Barboza
On 11/13/20 2:39 PM, John Ferlan wrote: Coverity found a bad merge conflict resolution... Thanks John. Just posted a fix. Guess I'll have to find a way to run Coverity before pushing stuff ... DHB On 11/12/20 4:48 PM, Daniel Henrique Barboza wrote: Signed-off-by: Daniel Henrique

[PATCH 1/1] qemu_driver.c: do not redefine 'event' in qemuDomainDefineXMLFlags()

2020-11-13 Thread Daniel Henrique Barboza
A bad merge while rebasing 74b2834333a caused the @event variable to be defined twice, inside the 'cleanup' label, causing coverity errors. This code was originally moved outside of the label by commit 773c7c43611a. Delete the unintended code in the 'cleanup' label. Fixes:

[PATCH] util: remove ATTRIBUTE_NONNULL from virDirClose declaration

2020-11-13 Thread Laine Stump
Before commit 24d8968c, virDirClose took a DIR**, and that was never NULL, so its declaration included ATTRIBUTE_NONNULL(1). Since that commit, virDirClose takes a DIR*, and it may be NULL (e.g. if the DIR* is initialized to NULL and was never closed). Even though virDirClose() is currently only

Re: [PATCH v1 01/10] qemu_driver.c: use g_autoptr() with virDomainDef pointers

2020-11-13 Thread John Ferlan
Coverity found a bad merge conflict resolution... On 11/12/20 4:48 PM, Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_driver.c | 54 ++ > 1 file changed, 18 insertions(+), 36 deletions(-) > > diff --git

[PATCH] virnetdevopenvswitch: Fix ATTRIBUTE_NONNULL() tag for virNetDevOpenvswitchGetVhostuserIfname()

2020-11-13 Thread Michal Privoznik
After e4c29e2904 the function has one argument more and the argument that can't be NULL moved from second to third position. Reported-by: John Ferlan Signed-off-by: Michal Privoznik --- Pushed as trivial. src/util/virnetdevopenvswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [libvirt PATCH] kbase: Shorten "less verbose QEMU logging" example

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 17:09 +0100, Peter Krempa wrote: > On Fri, Nov 13, 2020 at 16:34:25 +0100, Andrea Bolognani wrote: > > Rationale for the changes: > > > > * util.dbus produces very little logging, so it doesn't really > > make sense to filter it out; > > IIRC it did log a lot before

[libvirt PATCH 4/4] rpm: enable wireshark build for RHEL-8 and later

2020-11-13 Thread Daniel P . Berrangé
wireshark plugin was disabled in RHEL because RHEL-7 was too old, but we forgot to enable it in RHEL-8 where it builds fine. Signed-off-by: Daniel P. Berrangé --- libvirt.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index

[libvirt PATCH 3/4] rpm: remove version checks for wireshark

2020-11-13 Thread Daniel P . Berrangé
We only turn on with_wireshark if we already know the distro is guaranteed to have new enough packages. The versioned dep is thus not required. Signed-off-by: Daniel P. Berrangé --- libvirt.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in

[libvirt PATCH 0/4] Misc version updates

2020-11-13 Thread Daniel P . Berrangé
In both yajl and wireshark we can bump our min version per our platform support matrix and thus eliminate some historical cruft. Daniel P. Berrangé (4): meson: assume pkg-config support for yajl meson: bump min wireshark to 2.6.0 rpm: remove version checks for wireshark rpm: enable

[libvirt PATCH 1/4] meson: assume pkg-config support for yajl

2020-11-13 Thread Daniel P . Berrangé
Per the platform support rules, we no longer need to consider SLES 12 as a target, and so can now assume pkg-config support in yajl. Signed-off-by: Daniel P. Berrangé --- meson.build | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/meson.build

[libvirt PATCH 2/4] meson: bump min wireshark to 2.6.0

2020-11-13 Thread Daniel P . Berrangé
If using the declared min version of wireshark, 2.4.0, libvirt plugin fails to build. This min version isn't present in any supported distros and thus not tested by CI. We don't support wireshark on RHEL-7 since it has 1.x.x series. The next oldest version present in supported distros is 2.6.2 on

Re: [PATCH 1/2] virnetdevopenvswitch: Get names for dpdkvhostuserclient too

2020-11-13 Thread John Ferlan
On 11/11/20 3:38 AM, Michal Privoznik wrote: > There are two type of vhostuser ports: > > dpdkvhostuser - OVS creates the socket and QEMU connects to it > dpdkvhostuserclient - QEMU creates the socket and OVS connects to it > > But of course ovs-vsctl syntax for fetching ifname is

[libvirt PATCH] docs: compiling.html: pass -d to xz to decompress

2020-11-13 Thread Daniel P . Berrangé
From: Jonathan Watt tar on macOS recognizes XZ compression automatically, but that is not the case for GNU tar (1.32 at least). On Fedora 33 the current instructions result in the following error: $ xz -c libvirt-6.9.0.tar.xz | tar xvf - tar: Archive is compressed. Use -J option tar:

Re: [libvirt PATCH] kbase: Shorten "less verbose QEMU logging" example

2020-11-13 Thread Peter Krempa
On Fri, Nov 13, 2020 at 16:34:25 +0100, Andrea Bolognani wrote: > Rationale for the changes: > > * util.dbus produces very little logging, so it doesn't really > make sense to filter it out; IIRC it did log a lot before the switch to gdbus, thus I'd prefer to keep this since it's not that

Re: [libvirt PATCH] kbase: Shorten "less verbose QEMU logging" example

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Andrea Bolognani wrote: Rationale for the changes: * util.dbus produces very little logging, so it doesn't really make sense to filter it out; * util.udev doesn't exist; * access can be filtered out entirely, as nothing very interesting is produced by the only

Re: [PATCH 2/6] qemu: conf: Clarify default of "vnc_tls_x509_verify"

2020-11-13 Thread Michal Privoznik
On 11/13/20 4:45 PM, Daniel P. Berrangé wrote: On Fri, Nov 13, 2020 at 04:38:06PM +0100, Michal Privoznik wrote: On 11/13/20 4:01 PM, Peter Krempa wrote: If both "vnc_tls_x509_verify" and "default_tls_x509_verify" are missing from the config file the client certificate validation is disabled.

Re: [PATCH] Added attach-disk parameters for network disk support

2020-11-13 Thread Peter Krempa
On Thu, Nov 12, 2020 at 15:15:27 -0600, Ryan Gahagan wrote: > Hey Peter, Hi Ryan, firstly I'd like to ask you to keep the conversation on-list. (use reply-all all the time). This ensures that the response is public and also other people can jump in and respont. At the very least it can be used

Re: [PATCH 4/4] ci: Run test suite on macOS

2020-11-13 Thread Michal Privoznik
On 11/8/20 10:24 PM, Roman Bolshakov wrote: There's no need to have different CI process between macOS and FreeBSD as test suite has been fixed on macOS. Signed-off-by: Roman Bolshakov --- ci/cirrus/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH 2/4] tests: Fix mock chaining on macOS

2020-11-13 Thread Michal Privoznik
On 11/8/20 10:24 PM, Roman Bolshakov wrote: Some tests in qemuxml2argvtest need opendir() from virpcimock, others need opendir() from virfilewrapper. But as of now, only opendir() from virpcimock has an effect. real_opendir in virpcimock has a pointer to opendir$INODE64 in

Re: [PATCH 3/4] qemuxml2argvtest: Increase timeout on macOS

2020-11-13 Thread Michal Privoznik
On 11/8/20 10:24 PM, Roman Bolshakov wrote: The test takes 100+ seconds if all test suite is run with meson and 45+ seconds if it's run directly. According to the output of sample tool, most of the time (~72 seconds) is spent in poll(): Sort by top of stack, same collapsed (when >= 5):

Re: [PATCH 1/4] tests: Fix opendir mocks on macOS

2020-11-13 Thread Michal Privoznik
On 11/8/20 10:24 PM, Roman Bolshakov wrote: opendir() mocks need to search for decorated function with $INODE64 suffix, like stat mocks. Signed-off-by: Roman Bolshakov --- tests/virfilewrapper.c | 4 tests/virpcimock.c | 4 2 files changed, 8 insertions(+) Reviewed-by:

Re: [PATCH v2 00/10] qemu: support renaming domains with snapshots/checkpoints

2020-11-13 Thread Nikolay Shirokovskiy
On 10.11.2020 10:58, Nikolay Shirokovskiy wrote: > > > On 09.11.2020 16:51, Daniel Henrique Barboza wrote: >> >> >> On 11/3/20 8:59 AM, Nikolay Shirokovskiy wrote: >>> This is basically just rebase of [1] as it was not get any attention at that >>> time. >>> >>> [1] [PATCH 0/8] qemu: support

Re: [PATCH 2/6] qemu: conf: Clarify default of "vnc_tls_x509_verify"

2020-11-13 Thread Daniel P . Berrangé
On Fri, Nov 13, 2020 at 04:38:06PM +0100, Michal Privoznik wrote: > On 11/13/20 4:01 PM, Peter Krempa wrote: > > If both "vnc_tls_x509_verify" and "default_tls_x509_verify" are missing > > from the config file the client certificate validation is disabled. VNC > > provides a layer of

Re: [PATCH libvirt v2 03/11] nodedev: detect AP queues

2020-11-13 Thread Jonathon Jongsma
On Fri, 13 Nov 2020 15:19:11 +0100 Shalini Chellathurai Saroja wrote: > On 11/12/20 6:01 PM, Jonathon Jongsma wrote: > >> diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in > >> index d10a79e3..45281363 100644 > >> --- a/docs/formatnode.html.in > >> +++ b/docs/formatnode.html.in > >>

Re: [PATCH 2/6] qemu: conf: Clarify default of "vnc_tls_x509_verify"

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Michal Privoznik wrote: On 11/13/20 4:01 PM, Peter Krempa wrote: If both "vnc_tls_x509_verify" and "default_tls_x509_verify" are missing from the config file the client certificate validation is disabled. VNC provides a layer of authentication so client certificate

Re: [PATCH] viridentitytest: Run more frequently

2020-11-13 Thread Ján Tomko
On a Monday in 2020, Michal Privoznik wrote: The viridentitytest tests our viridentity module which is compiled on all platforms and OSes. There is no need to have SELinux secdriver as individual test cases are skipped if SELinux is missing. Signed-off-by: Michal Privoznik --- Successfully

Re: [PATCH 1/6] qemu: conf: Allow individual control of default value for *_tls_x509_verify

2020-11-13 Thread Michal Privoznik
On 11/13/20 4:01 PM, Peter Krempa wrote: Store whether "default_tls_x509_verify" was provided and enhance the SET_TLS_VERIFY_DEFAULT macro so that indiviual users can provide their own default if "default_tls_x509_verify" config option was not provided. For now we keep setting it to 'false'.

Re: [PATCH 0/6] qemu: Enable client TLS certificate validation by default for chardev, migration, and backup servers

2020-11-13 Thread Michal Privoznik
On 11/13/20 4:01 PM, Peter Krempa wrote: See patches 6 for a explanation. Peter Krempa (6): qemu: conf: Allow individual control of default value for *_tls_x509_verify qemu: conf: Clarify default of "vnc_tls_x509_verify" qemu: conf: Enable 'chardev_tls_x509_verify' by default

Re: [PATCH 0/9] docs: kbase style change and cleanups

2020-11-13 Thread Michal Privoznik
On 11/4/20 6:01 PM, Peter Krempa wrote: Some patches are taken from an older series where we've discussed that the kbase page should look more like 'docs.html' as more articles appear, this series delivers that: https://www.redhat.com/archives/libvir-list/2020-August/msg00172.html ... and a

[libvirt PATCH] kbase: Shorten "less verbose QEMU logging" example

2020-11-13 Thread Andrea Bolognani
Rationale for the changes: * util.dbus produces very little logging, so it doesn't really make sense to filter it out; * util.udev doesn't exist; * access can be filtered out entirely, as nothing very interesting is produced by the only other component in the same package

Re: [PATCH 2/6] qemu: conf: Clarify default of "vnc_tls_x509_verify"

2020-11-13 Thread Michal Privoznik
On 11/13/20 4:01 PM, Peter Krempa wrote: If both "vnc_tls_x509_verify" and "default_tls_x509_verify" are missing from the config file the client certificate validation is disabled. VNC provides a layer of authentication so client certificate validation is not strictly required. Signed-off-by:

Re: [PATCH libvirt v2 01/11] nodedev: detect AP card device

2020-11-13 Thread Jonathon Jongsma
On Fri, 13 Nov 2020 12:09:26 +0100 Shalini Chellathurai Saroja wrote: > Hi Jonathon, > > Thank you for the quick review:-) > > On 11/12/20 5:27 PM, Jonathon Jongsma wrote: > >> + > >> + > >> + > >> + > >> + > >> + >> name='hexuint'/> > > It seems that you're

Re: [PATCH 0/3] kbase: Port 'debuglogs' from wiki and convert directory to rst

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 15:14 +0100, Ján Tomko wrote: > On a Friday in 2020, Andrea Bolognani wrote: > > Can someone with write access to the wiki please turn it into a short > > stub that points people to the kbase article[2] instead? > > Done. Hope it's short enough for your taste. It definitely

Re: [PATCH v1 00/10] more simple g_autoptr() cleanups

2020-11-13 Thread Daniel Henrique Barboza
On 11/12/20 7:21 PM, Jonathon Jongsma wrote: On Thu, 12 Nov 2020 18:48:30 -0300 Daniel Henrique Barboza wrote: I intended to clean up the virDomainDefFree() calls that I kept seeing in qemu_driver.c, ended up doing a bit more than that. Daniel Henrique Barboza (10): qemu_driver.c: use

Re: [PATCH 0/4] qemu: hotplug: Fix check whether controler is used

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Peter Krempa wrote: Patch 2/4 is the actual fix, other patches are additional cleanups. Peter Krempa (4): qemuDomain(Disk)ControllerIsBusy: Fix function header format qemuDomainDiskControllerIsBusy: Fix logic of matching disk bus to controller type

Re: [PATCH] qemu: backup: Install bitmap for incremental backup to appropriate node only

2020-11-13 Thread Peter Krempa
On Fri, Nov 13, 2020 at 09:07:24 -0600, Eric Blake wrote: > On 11/13/20 8:55 AM, Peter Krempa wrote: > > Libvirt's backup code has two modes: > > > > 1) push - where qemu actively writes the difference since the checkpoint > > into the output file > > > > 2) pull - where we instruct

Re: [PATCH 5/6] qemu: conf: Enable 'backup_tls_x509_verify' by default

2020-11-13 Thread Eric Blake
On 11/13/20 9:01 AM, Peter Krempa wrote: > The NBD server used to export pull-mode backups doesn't have any other > form of client authentication on top of the TLS transport, so the only > way to authenticate clients is to verify their certificate. > > Enable this option by defauilt when both

Re: [PATCH 4/6] qemu: conf: Enable 'migrate_tls_x509_verify' by default

2020-11-13 Thread Eric Blake
On 11/13/20 9:01 AM, Peter Krempa wrote: > The migration stream connection and also the NBD server for non-shared > storage migration don't have any other form of client authentication on > top of the TLS transport, so the only way to authenticate clients is to > verify their certificate. > >

Re: [PATCH] qemu: backup: Install bitmap for incremental backup to appropriate node only

2020-11-13 Thread Eric Blake
On 11/13/20 8:55 AM, Peter Krempa wrote: > Libvirt's backup code has two modes: > > 1) push - where qemu actively writes the difference since the checkpoint > into the output file > > 2) pull - where we instruct qemu to expose a frozen disk state along > with a bitmap of

Re: [PATCH 0/9] docs: kbase style change and cleanups

2020-11-13 Thread Peter Krempa
On Wed, Nov 04, 2020 at 18:01:52 +0100, Peter Krempa wrote: > Some patches are taken from an older series where we've discussed that > the kbase page should look more like 'docs.html' as more articles > appear, this series delivers that: > >

[PATCH 5/6] qemu: conf: Enable 'backup_tls_x509_verify' by default

2020-11-13 Thread Peter Krempa
The NBD server used to export pull-mode backups doesn't have any other form of client authentication on top of the TLS transport, so the only way to authenticate clients is to verify their certificate. Enable this option by defauilt when both 'backup_tls_x509_verify' and 'default_tls_x509_verify'

Re: [PATCH] migration.html: Fix the spelling of the --persistent parameter

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Thomas Huth wrote: "--persist" is missing the "ent" at the end. Signed-off-by: Thomas Huth --- Sorry, I just noticed this after my previous "--undefinesource" patch had been merged - otherwise I had sent both fixes in one patch together... No need to: a) be sorry. I

[PATCH 3/6] qemu: conf: Enable 'chardev_tls_x509_verify' by default

2020-11-13 Thread Peter Krempa
Chardevs don't have any other form of client authentication on top of the TLS transport, so the only way to authenticate clients is to verify their certificate. Enable this option by defauilt when both 'chardev_tls_x509_verify' and 'default_tls_x509_verify' were not configured. Resolves:

[PATCH 2/6] qemu: conf: Clarify default of "vnc_tls_x509_verify"

2020-11-13 Thread Peter Krempa
If both "vnc_tls_x509_verify" and "default_tls_x509_verify" are missing from the config file the client certificate validation is disabled. VNC provides a layer of authentication so client certificate validation is not strictly required. Signed-off-by: Peter Krempa --- src/qemu/qemu.conf | 3

[PATCH 4/6] qemu: conf: Enable 'migrate_tls_x509_verify' by default

2020-11-13 Thread Peter Krempa
The migration stream connection and also the NBD server for non-shared storage migration don't have any other form of client authentication on top of the TLS transport, so the only way to authenticate clients is to verify their certificate. Enable this option by defauilt when both

[PATCH 6/6] NEWS: Mention change of default for TLS certificate verification

2020-11-13 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 3fd3ce4cb9..6fcfd4e26b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -11,6 +11,17 @@ For a more fine-grained view, use the `git log`_. v6.10.0 (unreleased)

[PATCH 1/6] qemu: conf: Allow individual control of default value for *_tls_x509_verify

2020-11-13 Thread Peter Krempa
Store whether "default_tls_x509_verify" was provided and enhance the SET_TLS_VERIFY_DEFAULT macro so that indiviual users can provide their own default if "default_tls_x509_verify" config option was not provided. For now we keep setting it to 'false'. Signed-off-by: Peter Krempa ---

[PATCH 0/6] qemu: Enable client TLS certificate validation by default for chardev, migration, and backup servers

2020-11-13 Thread Peter Krempa
See patches 6 for a explanation. Peter Krempa (6): qemu: conf: Allow individual control of default value for *_tls_x509_verify qemu: conf: Clarify default of "vnc_tls_x509_verify" qemu: conf: Enable 'chardev_tls_x509_verify' by default qemu: conf: Enable 'migrate_tls_x509_verify' by

[PATCH 3/4] qemuDomainDiskControllerIsBusy: Optimize checking for SCSI hostdevs

2020-11-13 Thread Peter Krempa
Iterate through hostdevs only when the controller type is VIR_DOMAIN_CONTROLLER_TYPE_SCSI. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[PATCH 4/4] qemuDomainControllerIsBusy: Fully populate switch statement

2020-11-13 Thread Peter Krempa
Typecast the controller type variable to the appropriate type and add the missing controller types for future extension. Note that we currently allow only unplug of VIR_DOMAIN_CONTROLLER_TYPE_SCSI thus the other controller types which are not implemented return false now. Signed-off-by: Peter

[PATCH 1/4] qemuDomain(Disk)ControllerIsBusy: Fix function header format

2020-11-13 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 81ec44ffcd..00d908912f 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5312,8

[PATCH 2/4] qemuDomainDiskControllerIsBusy: Fix logic of matching disk bus to controller type

2020-11-13 Thread Peter Krempa
The tests which match the disk bus to the controller type were backwards in this function. This meant that any disk bus type (such as VIR_DOMAIN_DISK_BUS_SATA) would not skip the controller index comparison even if the removed controller was of a different type. Switch the internals to a switch

[PATCH 0/4] qemu: hotplug: Fix check whether controler is used

2020-11-13 Thread Peter Krempa
Patch 2/4 is the actual fix, other patches are additional cleanups. Peter Krempa (4): qemuDomain(Disk)ControllerIsBusy: Fix function header format qemuDomainDiskControllerIsBusy: Fix logic of matching disk bus to controller type qemuDomainDiskControllerIsBusy: Optimize checking for SCSI

[PATCH] qemu: backup: Install bitmap for incremental backup to appropriate node only

2020-11-13 Thread Peter Krempa
Libvirt's backup code has two modes: 1) push - where qemu actively writes the difference since the checkpoint into the output file 2) pull - where we instruct qemu to expose a frozen disk state along with a bitmap of blocks which changed since the checkpoint For push mode

[PATCH] migration.html: Fix the spelling of the --persistent parameter

2020-11-13 Thread Thomas Huth
"--persist" is missing the "ent" at the end. Signed-off-by: Thomas Huth --- Sorry, I just noticed this after my previous "--undefinesource" patch had been merged - otherwise I had sent both fixes in one patch together... docs/migration.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH libvirt v2 06/11] nodedev: detect AP matrix device

2020-11-13 Thread Shalini Chellathurai Saroja
On 11/12/20 9:29 PM, Jonathon Jongsma wrote: diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 6bbff571..5f57000e 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1241,6 +1241,25 @@ udevProcessAPQueue(struct

Re: [PATCH 0/6] Introduce OpenSSH authorized key file mgmt APIs

2020-11-13 Thread Michal Privoznik
On 11/13/20 9:23 AM, Vasiliy Tolstov wrote: But how about selinux? I'm run qemu-ga in guest and want to modify the authorized_keys file of some user? Do we need to extend the selinux policy to allow modification of such files in all guests? Yes we do. But since qemu-ga offers this under API it

Re: [PATCH v2] selinux label: restore all labels when some labels fail to set

2020-11-13 Thread Michal Privoznik
On 11/13/20 10:47 AM, Jin Yan wrote: Hi Michal, I found this problem while performing migration, based on     libvirt version: 6.2.0     SELinux mode: permissive Steps: 1. start a vm configured with pipe-type serial port.                   2. migrate vm to

Re: [PATCH libvirt v2 10/11] node_device: mdev matrix support

2020-11-13 Thread Shalini Chellathurai Saroja
On 11/12/20 9:42 PM, Jonathon Jongsma wrote: On Thu, 12 Nov 2020 13:15:18 +0100 Shalini Chellathurai Saroja wrote: Allow mdev devices to be created on the matrix device. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski ---

Re: [PATCH] migration.html: Fix the spelling of the --undefinesource parameter

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Thomas Huth wrote: There is no dash between "undefine" and "source" in this parameter. If you think there should be one, we can add an alias for the command and hide the undashed version. Signed-off-by: Thomas Huth --- docs/migration.html.in | 4 ++-- 1 file changed, 2

Re: [PATCH libvirt v2 03/11] nodedev: detect AP queues

2020-11-13 Thread Shalini Chellathurai Saroja
On 11/12/20 6:01 PM, Jonathon Jongsma wrote: diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index d10a79e3..45281363 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -439,6 +439,17 @@ AP Card identifier. +

[PATCH] migration.html: Fix the spelling of the --undefinesource parameter

2020-11-13 Thread Thomas Huth
There is no dash between "undefine" and "source" in this parameter. Signed-off-by: Thomas Huth --- docs/migration.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migration.html.in b/docs/migration.html.in index dd5eddd6f4..194cf7d209 100644 ---

Re: [PATCH 0/3] kbase: Port 'debuglogs' from wiki and convert directory to rst

2020-11-13 Thread Ján Tomko
On a Friday in 2020, Andrea Bolognani wrote: On Thu, 2020-07-30 at 12:30 +0200, Peter Krempa wrote: Peter Krempa (3): docs: kbase: Convert 'kbase' article registry to RST docs: kbase: Make kbase article directory wider docs: kbase: Port 'debuglogs' document from libvirt's wiki I just

Re: [PATCH v1 02/10] qemu_domain.c: align memory modules before calculating 'initialmem'

2020-11-13 Thread Daniel Henrique Barboza
On 11/13/20 10:51 AM, Andrea Bolognani wrote: On Fri, 2020-11-13 at 09:58 -0300, Daniel Henrique Barboza wrote: On 11/13/20 7:30 AM, Andrea Bolognani wrote: On Wed, 2020-11-11 at 19:07 -0300, Daniel Henrique Barboza wrote: +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args @@

Re: [PATCH 0/3] kbase: Port 'debuglogs' from wiki and convert directory to rst

2020-11-13 Thread Andrea Bolognani
On Thu, 2020-07-30 at 12:30 +0200, Peter Krempa wrote: > Peter Krempa (3): > docs: kbase: Convert 'kbase' article registry to RST > docs: kbase: Make kbase article directory wider > docs: kbase: Port 'debuglogs' document from libvirt's wiki I just realized that, despite this series having

Re: [PATCH v1 02/10] qemu_domain.c: align memory modules before calculating 'initialmem'

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 09:58 -0300, Daniel Henrique Barboza wrote: > On 11/13/20 7:30 AM, Andrea Bolognani wrote: > > On Wed, 2020-11-11 at 19:07 -0300, Daniel Henrique Barboza wrote: > > > +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args > > > @@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ >

Re: regression in meson build, AC_PATH_PROG lost

2020-11-13 Thread Andrea Bolognani
On Fri, 2020-11-13 at 12:37 +0100, Pavel Hrdina wrote: > On Thu, Nov 12, 2020 at 10:40:02PM +0100, Olaf Hering wrote: > > Since meson does not support environment variables it seems the > > only way to address this is to introduce an option in > > meson_options.txt for each runtime executable. > >

[PATCH v2 0/2] virnetdaemon: Wait for "daemon-stop" thread to finish before quitting

2020-11-13 Thread Michal Privoznik
This is a v2 of: https://www.redhat.com/archives/libvir-list/2020-November/msg00639.html but it implements a different approach per Nikolay's suggestion. Michal Prívozník (2): DO NOT MERGE virnetdaemon: Wait for "daemon-stop" thread to finish before quitting src/libvirt_remote.syms|

[PATCH v2 2/2] virnetdaemon: Wait for "daemon-stop" thread to finish before quitting

2020-11-13 Thread Michal Privoznik
When the host is shutting down then we get PrepareForShutdown signal on DBus to which we react by creating a thread which runs virStateStop() and thus qemuStateStop(). But if scheduling the thread is delayed just a but it may happen that we receive SIGTERM (sent by systemd) to which we respond by

[PATCH v2 1/2] DO NOT MERGE

2020-11-13 Thread Michal Privoznik
This is to help reproduce the race. Build and attach gdb and: handle SIGUSR1 nostop pass handle SIGINT nostop pass and then: kill -SIGUSR1 $(pgrep libvirtd); sleep 1; kill -SIGINT $(pgrep libvirtd) --- src/remote/remote_daemon.c | 64 +- 1 file changed, 36

Re: [PATCH v1 02/10] qemu_domain.c: align memory modules before calculating 'initialmem'

2020-11-13 Thread Daniel Henrique Barboza
On 11/13/20 7:30 AM, Andrea Bolognani wrote: On Wed, 2020-11-11 at 19:07 -0300, Daniel Henrique Barboza wrote: +++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args @@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ -name QEMUGuest1 \ -S \ -machine

Re: [PATCH v2 00/10] qemu: add option to process offloaded legacy blockjob event ealier

2020-11-13 Thread Nikolay Shirokovskiy
On 13.11.2020 10:24, Peter Krempa wrote: > On Fri, Nov 13, 2020 at 09:53:28 +0300, Nikolay Shirokovskiy wrote: >> This is successor to [1] but I changed the subject as in the review the patch >> 'qemu: sync backing chain update in virDomainGetBlockJobInfo' was not >> considered good one from

Re: regression in meson build, AC_PATH_PROG lost

2020-11-13 Thread Pavel Hrdina
On Thu, Nov 12, 2020 at 10:40:02PM +0100, Olaf Hering wrote: > autoconf allows to specify the path to a runtime binary that is not required > during build via an environment variable: > AC_PATH_PROG([PARTED], [parted], [], [$LIBVIRT_SBIN_PATH]) > > meson lacks such essential feature. As a result

Re: [PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Daniel P . Berrangé
On Fri, Nov 13, 2020 at 12:04:43PM +0100, Olaf Hering wrote: > Am Fri, 13 Nov 2020 10:53:41 + > schrieb Daniel P. Berrangé : > > > SLE12 is no longer considered a supported platform by libvirt, since it > > has been more than 2 years since the release of SLE15. > > That might be all true. >

Re: [PATCH libvirt v2 01/11] nodedev: detect AP card device

2020-11-13 Thread Shalini Chellathurai Saroja
Hi Jonathon, Thank you for the quick review:-) On 11/12/20 5:27 PM, Jonathon Jongsma wrote: + + + + + + It seems that you're unnecessarily changing double-quotes to single-quotes here, which adds spurious changes to the diff. The rest of the file uses

Re: [PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Olaf Hering
Am Fri, 13 Nov 2020 10:53:41 + schrieb Daniel P. Berrangé : > SLE12 is no longer considered a supported platform by libvirt, since it > has been more than 2 years since the release of SLE15. That might be all true. This patch is for wireshark. Not for SLE12. Olaf pgpJmXJp43WLi.pgp

[PATCH v2 09/10] qemu: fix race on legacy block completion and quering stats

2020-11-13 Thread Nikolay Shirokovskiy
At the time when we query qemu for block stats backing chain in qemu and libvirt can be different and this will result in messy block stats. I guess this can be noticable under load when thread that process events is busy so that it can take some time before block job events are processed. The

[PATCH v2 08/10] qemu: move code that depends on backing chain appropriately

2020-11-13 Thread Nikolay Shirokovskiy
After the previous patch that moves backing chain detection later in code. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_process.c | 47 +-- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_process.c

[PATCH v2 07/10] qemu: refresh backing chain after block job reconnection

2020-11-13 Thread Nikolay Shirokovskiy
After [1] we basically ignore qemu block job event if there is no correspondent block job object in libvirt. Thus we need to refresh backing chain after we reconnect block jobs or we can miss events that change backing chain. There is also another reason for it. I'm not sure of result if both

[PATCH v2 10/10] qemu: sync backing chain update in virDomainGetBlockJobInfo

2020-11-13 Thread Nikolay Shirokovskiy
Some mgmt still use polling for block job completion. After job completion the job failure/success is infered by inspecting domain xml. With legacy block job processing this does not always work. The issue deals with how libvirt processes events. If no other thread is waiting for blockjob event

[PATCH v2 05/10] qemu: add note for outdated legacy block job events

2020-11-13 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 9bbc9dc..8706de3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8214,6 +8214,12 @@

[PATCH v2 06/10] qemu: use autoptr in qemuProcessRefreshLegacyBlockjobs

2020-11-13 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_process.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8706de3..46a39ac 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8193,8

[PATCH v2 03/10] qemu: remove extra block job finalize on reconnect

2020-11-13 Thread Nikolay Shirokovskiy
As we now call qemuBlockJobStartupFinalize in qemuProcessRefreshLegacyBlockjobs for precreated block job of every disk anyway. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c

[PATCH v2 04/10] qemu: remove stale cleanup in qemuProcessRefreshLegacyBlockjob

2020-11-13 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_process.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 49ee8fe..9bbc9dc 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8172,7

[PATCH v2 02/10] qemu: reconnect: precreate legacy blockjobs

2020-11-13 Thread Nikolay Shirokovskiy
Now we basically ignore qemu block job event if there is no correspondent block job object in libvirt. So we need to precreate block job objects before we call qemu's query-block-job because we can receive events right after receiving query-block-job result but before we create block job object in

[PATCH v2 01/10] qemu: add option to process offloaded legacy blockjob event ealier

2020-11-13 Thread Nikolay Shirokovskiy
Currently in qemuProcessHandleBlockJob we either offload blockjob event processing to the worker thread or notify another thread that waits for blockjob event and that thread processes the event. But sometimes after event is offloaded to the worker thread we need to process the event in a

[PATCH v2 00/10] qemu: add option to process offloaded legacy blockjob event ealier

2020-11-13 Thread Nikolay Shirokovskiy
This is successor to [1] but I changed the subject as in the review the patch 'qemu: sync backing chain update in virDomainGetBlockJobInfo' was not considered good one from design POV. However I think the basic patch is helpful to address similar issues. Look at [*] for example, there it allows to

Re: [PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Daniel P . Berrangé
On Fri, Nov 13, 2020 at 11:47:30AM +0100, Olaf Hering wrote: > Am Fri, 13 Nov 2020 10:46:15 + > schrieb Daniel P. Berrangé : > > > What platform still ships this old 2.4.0 version ? > > This version is what meson.build expects. SLE12 has it. SLE12 is no longer considered a supported

Re: [PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Olaf Hering
Am Fri, 13 Nov 2020 10:46:15 + schrieb Daniel P. Berrangé : > What platform still ships this old 2.4.0 version ? This version is what meson.build expects. SLE12 has it. Olaf pgpxs4hCINzfs.pgp Description: Digitale Signatur von OpenPGP

Re: [PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Daniel P . Berrangé
On Fri, Nov 13, 2020 at 11:43:29AM +0100, Olaf Hering wrote: > wireshark/epan/proto.h uses WS_NORETURN, which is defined in > wireshark/config.h, > without including this header first. What platform still ships this old 2.4.0 version ? > > Fixes commit caa9560c150b3df46965582388d0a8a0bafa97ae

[PATCH v1] wireshark: fix build with with 2.4.0

2020-11-13 Thread Olaf Hering
wireshark/epan/proto.h uses WS_NORETURN, which is defined in wireshark/config.h, without including this header first. Fixes commit caa9560c150b3df46965582388d0a8a0bafa97ae Signed-off-by: Olaf Hering --- tools/wireshark/src/packet-libvirt.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 2/2] qemu: Check if driver is still available in qemuStateStop()

2020-11-13 Thread Nikolay Shirokovskiy
On 12.11.2020 21:45, Michal Privoznik wrote: > When the host is shutting down then we get PrepareForShutdown > signal on DBus to which we react by creating a thread which > runs virStateStop() and thus qemuStateStop(). But if scheduling > the thread is delayed just a but it may happen that we

Re: Races / crashes in shutdown of libvirtd daemon

2020-11-13 Thread Nikolay Shirokovskiy
On 12.11.2020 20:12, Michal Privoznik wrote: > On 4/27/20 5:54 PM, Daniel P. Berrangé wrote: >> We got a new BZ filed about a libvirtd crash in shutdown >> >>    https://bugzilla.redhat.com/show_bug.cgi?id=1828207 > > And there is another one: > >

  1   2   >