Re: [PATCH V2] qemu: pre-create the dbus directory in qemuStateInitialize

2020-07-21 Thread Pino Toscano
On Wednesday, 22 July 2020 04:09:24 CEST Bihong Yu wrote: > +if (virDirCreate(cfg->dbusStateDir, 0770, cfg->user, cfg->group, > + VIR_DIR_CREATE_ALLOW_EXIST) < 0) { > +virReportSystemError(errno, _("Failed to create dbus state dir %s"), > +

Re: [PATCH] news: Remove one of last two instances of -drive if=none usage

2020-07-21 Thread Peter Krempa
On Wed, Jul 22, 2020 at 10:13:16 +0800, Jianan Gao wrote: > There is a series of patched for describing remove one of last two instances > of -drive if=none usage to help QEMU in deprecation of -drive if=none without > the need to refactor all old boards. > > Signed-off-by: Jianan Gao > --- >

[PATCH] news: Remove one of last two instances of -drive if=none usage

2020-07-21 Thread Jianan Gao
There is a series of patched for describing remove one of last two instances of -drive if=none usage to help QEMU in deprecation of -drive if=none without the need to refactor all old boards. Signed-off-by: Jianan Gao --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH V2] qemu: pre-create the dbus directory in qemuStateInitialize

2020-07-21 Thread Bihong Yu
>From 165abdd77c7db83ebf98232b80d6b988471185c0 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Tue, 14 Jul 2020 15:44:05 +0800 Subject: [PATCH] qemu: pre-create the dbus directory in qemuStateInitialize There are races condiction to make '/run/libvirt/qemu/dbus' directory in virDirCreateNoFork()

Re: [libvirt PATCH] docs: virConnectGetCapabilities do not provide pool types

2020-07-21 Thread John Ferlan
On 7/21/20 10:14 AM, Daniel P. Berrangé wrote: > On Tue, Jul 21, 2020 at 08:46:55AM -0400, John Ferlan wrote: >> >> Upon further reflection and some memory jiggling... >> >> virsh -c storage:///system capabilities >> >> >> >> >> dir >> fs >> netfs >> logical >>

Re: [PATCH 2/4] conf: allow to map sound device to host device

2020-07-21 Thread Daniel P . Berrangé
On Sat, Jul 18, 2020 at 04:31:16PM +0400, Roman Bogorodskiy wrote: > Extend device element to accept "soundDevice" > sub-element which allows to map guest sound device to host > sound device. > > Example > > > > IIUC, FreeBSD's audio subsystem is the classic OSS API ? > > The

Re: [PATCH 08/10] qemu: implement driver's shutdown/shutdown wait methods

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:59PM +0300, Nikolay Shirokovskiy wrote: > On shutdown we just stop accepting new jobs for worker thread so that on > shutdown wait we can exit worker thread faster. Yes we basically stop > processing of events for VMs but we are going to do so anyway in case of >

Re: [PATCH 10/10] util: remove unused virThreadPoolNew macro

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:33:01PM +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/util/virthreadpool.h | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-

Re: [PATCH 09/10] rpc: cleanup virNetDaemonClose method

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:33:00PM +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/libvirt_remote.syms | 1 - > src/rpc/virnetdaemon.c | 13 - > src/rpc/virnetdaemon.h | 2 -- > 3 files changed, 16 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [PATCH 07/10] qemu: exit thread synchronously in qemuDomainObjStopWorker

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:58PM +0300, Nikolay Shirokovskiy wrote: > The change won't hurt much current callers performance I guess and now we can > use the function when we need to be sure of synchronous thread exit as well. I can't remember the exact scenario, but I'm reasonably sure i tried

Re: [PATCH 06/10] vireventthread: add virEventThreadClose

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:57PM +0300, Nikolay Shirokovskiy wrote: > virEventThreadClose is used when event loop thread should > be exited synchronously (which is not the case when event loop > is just unreferenced). > > Signed-off-by: Nikolay Shirokovskiy > --- > src/libvirt_private.syms |

Re: [PATCH 05/10] rpc: finish all threads before exiting main loop

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:56PM +0300, Nikolay Shirokovskiy wrote: > Currently we have issues like [1] on libvirtd shutdown as we cleanup while RPC > and other threads are still running. Let's finish all threads other then main > before cleanup. > > The approach to finish threads is suggested

Re: [PATCH 04/10] rpc: don't unref service ref on socket behalf twice

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:55PM +0300, Nikolay Shirokovskiy wrote: > Second unref was added in [1]. We don't need it actually as > we pass free callback to virNetSocketAddIOCallback thus > when we call virNetSocketRemoveIOCallback the extra ref for > callback will be dropped without extra

Re: [PATCH 03/10] util: add stop/drain functions to thread pool

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:54PM +0300, Nikolay Shirokovskiy wrote: > Stop just send signal for threads to exit when they finish with > current task. Drain waits when all threads will finish. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/libvirt_private.syms | 2 ++ >

Re: [PATCH 01/10] libvirt: add stateShutdown/stateShutdownWait to drivers

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:52PM +0300, Nikolay Shirokovskiy wrote: > stateShutdown is supposed to inform driver that it will be closed soon so that > the driver can prepare and finish all background threads quickly on > stateShutdownWait call. > > Signed-off-by: Nikolay Shirokovskiy > --- >

Re: [PATCH 02/10] util: always initialize priority condition

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 14, 2020 at 12:32:53PM +0300, Nikolay Shirokovskiy wrote: > Even if we have no priority threads on pool creation we can add them thru > virThreadPoolSetParameters later. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/util/virthreadpool.c | 22 +++--- > 1 file

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-21 Thread Peter Xu
On Tue, Jul 21, 2020 at 02:20:01PM +0800, Jason Wang wrote: > > On 2020/7/20 下午9:03, Peter Xu wrote: > > On Mon, Jul 20, 2020 at 12:02:06PM +0800, Jason Wang wrote: > > > Right, so there's no need to deal with unmap in vtd's replay > > > implementation > > > (as what generic one did). > > We

Re: [libvirt PATCH] docs: virConnectGetCapabilities do not provide pool types

2020-07-21 Thread Daniel P . Berrangé
On Tue, Jul 21, 2020 at 08:46:55AM -0400, John Ferlan wrote: > > Upon further reflection and some memory jiggling... > > virsh -c storage:///system capabilities > > > > > dir > fs > netfs > logical > iscsi > iscsi-direct > scsi > mpath >

Re: [libvirt PATCH v2 06/15] network: eliminate unnecessary labels

2020-07-21 Thread Laine Stump
On 7/21/20 8:04 AM, John Ferlan wrote: On 7/7/20 5:08 PM, Laine Stump wrote: All these cleanup/error labels were reduced to having just "return ret" by a previous patch, so get rid of them and return directly. Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 264

Re: [PATCH] NEWS: mention readonly attribute is not yet supported by virtiofsd

2020-07-21 Thread Ján Tomko
On a Tuesday in 2020, Jianan Gao wrote: There was a clear statement on not supported by virtiofsd with readonly attribute. Signed-off-by: Jianan Gao --- NEWS.rst | 4 1 file changed, 4 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH] security: Remove the superfluous break

2020-07-21 Thread Ján Tomko
On a Friday in 2020, Yi Wang wrote: From: Liao Pingfang Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- src/security/security_apparmor.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Ján Tomko and pushed Jano

Re: [libvirt PATCH] qemu: Drop ret variable from qemuConnectCPUModelComparison

2020-07-21 Thread Ján Tomko
On a Tuesday in 2020, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH] network: refactor networkSetIPv6Sysctls() for proper g_autofree usage

2020-07-21 Thread Ján Tomko
On a Friday in 2020, Laine Stump wrote: This function used the same char* three times for different purposes, freeing it after each use. Since we don't want to ever manually free an autofree'd pointer, modify it to use three separate char*, and make them all g_autofree. Signed-off-by: Laine

Re: [PATCH] qemu: Remove superfluous breaks

2020-07-21 Thread Ján Tomko
On a Friday in 2020, Yi Wang wrote: From: Liao Pingfang Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- src/qemu/qemu_firmware.c | 1 - src/qemu/qemu_hostdev.c | 1 - 2 files changed, 2 deletions(-) Reviewed-by: Ján

[libvirt PATCH] qemu: Drop ret variable from qemuConnectCPUModelComparison

2020-07-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b8ba2e3fb9..8e81c30a93 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13150,7

RE: [PATCH v2 2/2] qemu: allow configuring mem-path for ivshmem-plain device

2020-07-21 Thread Wangxin (Alexander)
> On Fri, Jul 17, 2020 at 09:04:51PM +0800, Wang Xin wrote: > >The shared memory path is generated by shmem name as default, > >however, we may need to change it to avoid filename conflict > >when VM migrate to other host. > > > > At which point there is no need for the name at all. I agree that

Re: [PATCH] conf: Remove superfluous breaks

2020-07-21 Thread Ján Tomko
On a Friday in 2020, Yi Wang wrote: From: Liao Pingfang Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- src/conf/domain_conf.c | 6 -- src/conf/network_conf.c| 12 src/conf/nwfilter_params.c | 4

Re: [PATCH] qemu: pre-create the dbus directory in qemuStateInitialize

2020-07-21 Thread Ján Tomko
On a Monday in 2020, Bihong Yu wrote: From 187323ce736dcd9b1a177d552630b0c6859a4798 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Tue, 14 Jul 2020 15:44:05 +0800 Subject: [PATCH] qemu: pre-create the dbus directory in qemuStateInitialize There are races condiction to make

[PATCH] NEWS: mention readonly attribute is not yet supported by virtiofsd

2020-07-21 Thread Jianan Gao
There was a clear statement on not supported by virtiofsd with readonly attribute. Signed-off-by: Jianan Gao --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2c6c628c61..ff977968c7 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -170,6 +170,10 @@ v6.4.0

Re: [PATCH 4/5] qemu_driver.c: modernize qemuConnectCPUModelComparison()

2020-07-21 Thread Jiri Denemark
On Fri, Jul 17, 2020 at 18:15:55 -0300, Daniel Henrique Barboza wrote: > Use g_auto* on pointers to avoid using the 'cleanup' label. > > In theory the 'ret' variable can also be discarded if the flow > of the logic is reworked. Perhaps another time. Doing so would actually be pretty easy, mostly

Re: [PATCH 0/5] trivial qemuProcessQMPPtr related cleanups

2020-07-21 Thread Jiri Denemark
On Fri, Jul 17, 2020 at 18:15:51 -0300, Daniel Henrique Barboza wrote: > Hi, > > These are some simple cleanups related to the qemuProcessQMPPtr > pointer I ended up making while trying to understand how and when > qemuProcessQMPFree() is called. > > Daniel Henrique Barboza (5): >

Re: [libvirt PATCH v2 06/15] network: eliminate unnecessary labels

2020-07-21 Thread Ján Tomko
On a Tuesday in 2020, John Ferlan wrote: On 7/7/20 5:08 PM, Laine Stump wrote: All these cleanup/error labels were reduced to having just "return ret" by a previous patch, so get rid of them and return directly. Signed-off-by: Laine Stump --- src/network/bridge_driver.c | 264

Re: [libvirt PATCH] docs: virConnectGetCapabilities do not provide pool types

2020-07-21 Thread John Ferlan
Upon further reflection and some memory jiggling... virsh -c storage:///system capabilities dir fs netfs logical iscsi iscsi-direct scsi mpath disk rbd sheepdog gluster zfs But yeah, without the

Plans for the next release

2020-07-21 Thread Jiri Denemark
Hi all, We are getting close to the next release of libvirt. Because I am on vacation next week, I think we will have a little bit longer freeze period (although mainly extended by a weekend). So to aim for the release at the beginning of August I suggest entering the freeze just before the

Re: [libvirt PATCH v2 06/15] network: eliminate unnecessary labels

2020-07-21 Thread John Ferlan
On 7/7/20 5:08 PM, Laine Stump wrote: > All these cleanup/error labels were reduced to having just "return > ret" by a previous patch, so get rid of them and return directly. > > Signed-off-by: Laine Stump > --- > src/network/bridge_driver.c | 264 -- >

RE: [PATCH v2 1/2] qemu: add support for shmem-{plain, doorbell} role

2020-07-21 Thread Wangxin (Alexander)
> On Fri, Jul 17, 2020 at 09:04:50PM +0800, Wang Xin wrote: > >Role(master or peer) controls how the domain behaves on migration. > >For more details about migration with ivshmem, see > >https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/system/ivshmem.rst;hb=HEAD > > > >It's a optional

[PATCH 2/2] tests: commandtest: Make 'test4' checking daemonization more reliable

2020-07-21 Thread Peter Krempa
The 'commandhelper' checks effectively whether the parent process is still around to report whether it was daemonized or not. This creates a unlikely race condition in cases when we do actually daemonize the process as the intermediate process used for the daemonization might not have terminated

[PATCH 1/2] vircommand: REPRODUCER: Add artificial timeout before exitting daemonization helper

2020-07-21 Thread Peter Krempa
Let the intermediate process linger for a moment to reproduce the sporradic failure in 'commandtest'. --- src/util/vircommand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 5ce69ef241..f6da8b5cf1 100644 --- a/src/util/vircommand.c +++

[PATCH 0/2] commandtest: Make 'test4' more reliable

2020-07-21 Thread Peter Krempa
See 2/2 for the explanation. Peter Krempa (2): vircommand: REPRODUCER: Add artificial timeout before exitting daemonization helper tests: commandtest: Make 'test4' checking daemonization more reliable src/util/vircommand.c | 1 + tests/commanddata/test4.log | 1 +

Re: [PATCH v2 2/2] qemu: allow configuring mem-path for ivshmem-plain device

2020-07-21 Thread Martin Kletzander
On Fri, Jul 17, 2020 at 09:04:51PM +0800, Wang Xin wrote: The shared memory path is generated by shmem name as default, however, we may need to change it to avoid filename conflict when VM migrate to other host. At which point there is no need for the name at all. I agree that having the

Re: [PATCH v2 1/2] qemu: add support for shmem-{plain, doorbell} role

2020-07-21 Thread Martin Kletzander
On Fri, Jul 17, 2020 at 09:04:50PM +0800, Wang Xin wrote: Role(master or peer) controls how the domain behaves on migration. For more details about migration with ivshmem, see https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/system/ivshmem.rst;hb=HEAD It's a optional attribute in libvirt,

[PATCH] mdev: fix daemon crash on reattach mdevs

2020-07-21 Thread Binfeng Wu
Causing a crash when virMediatedDeviceListFindIndex because of some pointers in mgr->activeMediatedHostdevs become dangling pointers if goto cleanup label in virMediatedDeviceListMarkDevices. Reproduction scenario: 1. start vm1 with mdev1 2. start vm2 with mdev2, mdev1 (the order cannot be

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-21 Thread Andrea Bolognani
On Mon, 2020-07-20 at 19:36 +0100, Daniel P. Berrangé wrote: > On Mon, Jul 20, 2020 at 08:20:12PM +0200, Andrea Bolognani wrote: > > We could special-case binaries called 'virt-nc' and use our internal > > syntax for those. Having two separate URI parameters to control the > > same knob sounds

Re: [PATCH 3/5] docs: add missing balloon stats docs in domstats

2020-07-21 Thread Nikolay Shirokovskiy
On 21.07.2020 11:07, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > docs/manpages/virsh.rst | 4 > 1 file changed, 4 insertions(+) > > diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst > index 6a1ae40..d9caef1 100644 > --- a/docs/manpages/virsh.rst >

[PATCH 5/5] src: add missing balloon stats docs

2020-07-21 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 28 1 file changed, 28 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fe4dab7..36fa8a2 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11455,6 +11455,34 @@

[PATCH 3/5] docs: add missing balloon stats docs in domstats

2020-07-21 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- docs/manpages/virsh.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 6a1ae40..d9caef1 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2265,6 +2265,10 @@ When

[PATCH 1/5] docs: fix typo in virsh.rst for balloon.major_fault

2020-07-21 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- docs/manpages/virsh.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 1a2cf09..6a1ae40 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2250,7 +2250,7 @@

[PATCH 4/5] docs: add missing iothread stats docs in domstats

2020-07-21 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- docs/manpages/virsh.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index d9caef1..ed7cefc 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2374,6 +2374,11 @@ too high

[PATCH 2/5] include: clarify docs for hugetlb in virDomainMemoryStatTags

2020-07-21 Thread Nikolay Shirokovskiy
The term number is used for other stats and even for hugetlb stats in virsh man page. The term number is also more clear. Signed-off-by: Nikolay Shirokovskiy --- include/libvirt/libvirt-domain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 0/5] docs: misc docs enhancements for statistic API

2020-07-21 Thread Nikolay Shirokovskiy
Nikolay Shirokovskiy (5): docs: fix typo in virsh.rst for balloon.major_fault include: clarify docs for hugetlb in virDomainMemoryStatTags docs: add missing balloon stats docs in domstats docs: add missing iothread stats docs in domstats src: add missing balloon stats docs

Re: [PATCH 09/10] qemuDomainGetStorageSourceByDevstr: Look also in 'mirror' chain

2020-07-21 Thread Peter Krempa
On Mon, Jul 20, 2020 at 16:07:25 -0500, Eric Blake wrote: > On 7/15/20 8:10 AM, Peter Krempa wrote: > > A disk can have a mirror, look also in it's backing chain. > > its > > (it's is only valid when you can replace with 'it is') > > > > > Signed-off-by: Peter Krempa > > --- > >

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-21 Thread Jason Wang
On 2020/7/20 下午9:03, Peter Xu wrote: On Mon, Jul 20, 2020 at 12:02:06PM +0800, Jason Wang wrote: Right, so there's no need to deal with unmap in vtd's replay implementation (as what generic one did). We don't even for now; see vtd_page_walk_info.notify_unmap. Thanks, Right, but I meant