Re: [PATCH] qemu: clear residual QMP caps processes during QEMU driver initialization

2020-07-22 Thread Bihong Yu
ping On 2020/7/20 10:09, Bihong Yu wrote: > > > On 2020/7/18 5:14, Daniel Henrique Barboza wrote: >> >> >> On 7/17/20 8:10 AM, Bihong Yu wrote: From c328ff62b11d58553fd2032a85fd3295e009b3d3 Mon Sep 17 00:00:00 2001 >>> From: Bihong Yu >>> Date: Fri, 17 Jul 2020 16:55:12 +0800 >>> Subject:

[PATCH] docs: Mention unsupported hypervisors of transient element

2020-07-22 Thread Han Han
Signed-off-by: Han Han --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index f3a639b972..c180b59226 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4092,7 +4092,8

Re: [libvirt PATCH 4/4] tools: be more paranoid about possibly NULL description

2020-07-22 Thread Laine Stump
On 7/22/20 1:21 PM, Daniel P. Berrangé wrote: GCC 10 complains about "desc" possibly being a NULL dereference. Even though it is a false positive, we can easily avoid it. Signed-off-by: Daniel P. Berrangé Reviewed-by: Laine Stump So those were the only complaints of gcc 10? We got off

Re: [libvirt PATCH 3/4] tests: don't mock the time() function on mingw

2020-07-22 Thread Laine Stump
On 7/22/20 1:21 PM, Daniel P. Berrangé wrote: The mingw header define time() as a static inline function and this causes a duplicate definition build failure. Since we're not using the LD_PRELOAD at all on Mingw, we ideally wouldn't compile any of the mock libraries. Rather than change the build

[libvirt PATCH 0/1] Move graphics validation checks out of *ParseXML function.

2020-07-22 Thread Nicolas Brignone
- Based on https://gitlab.com/libvirt/libvirt/-/issues/7 specific recommendation about moving validation checks into *PostParse. - syntax-check and tests passing verified. - I Considered creating a new "Validate" function, but according to the issue I used the PostParse Function. Nicolas

[libvirt PATCH 1/1] conf: move graphics validation checks out of *ParseXML function.

2020-07-22 Thread Nicolas Brignone
Existing virDomainDefPostParseGraphics function seems to be the right place to put this validations. After moving this validation, one less argument is needed in virDomainGraphicsListenDefParseXML, so removing the "graphics" argument from the function signature. Signed-off-by: Nicolas Brignone

Re: [libvirt PATCH 1/4] util: refactor code to workaround gcc 10.1.0 bug

2020-07-22 Thread Laine Stump
On 7/22/20 1:21 PM, Daniel P. Berrangé wrote: gcc 10.1.0 on Debian sid has a bug where the bounds checking gets confused beteen two branches: In file included from /usr/include/string.h:495, from ../../src/internal.h:28, from ../../src/util/virsocket.h:21,

Re: [libvirt PATCH 2/4] m4: enable -fstack-protector-strong on mingw

2020-07-22 Thread Laine Stump
On 7/22/20 1:21 PM, Daniel P. Berrangé wrote: Historically we avoided -fstack-protector* since it resulted in a broken build on Mingw. In GCC 10 in Fedora though, we have the opposite problem, getting a broken build if we don't enable one of the -fstack-protector* options. This also works in GCC

Re: [libvirt PATCH 335/351] meson: docs/manpages: install man pages

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 07:22:34PM +0200, Peter Krempa wrote: > On Wed, Jul 22, 2020 at 19:14:01 +0200, Pavel Hrdina wrote: > > On Wed, Jul 22, 2020 at 06:51:58PM +0200, Peter Krempa wrote: > > > On Thu, Jul 16, 2020 at 11:59:31 +0200, Pavel Hrdina wrote: > > > > Signed-off-by: Pavel Hrdina > > >

Re: [libvirt PATCH 335/351] meson: docs/manpages: install man pages

2020-07-22 Thread Peter Krempa
On Wed, Jul 22, 2020 at 19:14:01 +0200, Pavel Hrdina wrote: > On Wed, Jul 22, 2020 at 06:51:58PM +0200, Peter Krempa wrote: > > On Thu, Jul 16, 2020 at 11:59:31 +0200, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > > --- > > > > [...] > > > > > +foreach name : keyname_list > > > +

[libvirt PATCH 3/4] tests: don't mock the time() function on mingw

2020-07-22 Thread Daniel P . Berrangé
The mingw header define time() as a static inline function and this causes a duplicate definition build failure. Since we're not using the LD_PRELOAD at all on Mingw, we ideally wouldn't compile any of the mock libraries. Rather than change the build system now though, this just stubs out the

[libvirt PATCH 4/4] tools: be more paranoid about possibly NULL description

2020-07-22 Thread Daniel P . Berrangé
GCC 10 complains about "desc" possibly being a NULL dereference. Even though it is a false positive, we can easily avoid it. Signed-off-by: Daniel P. Berrangé --- tools/vsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index

[libvirt PATCH 2/4] m4: enable -fstack-protector-strong on mingw

2020-07-22 Thread Daniel P . Berrangé
Historically we avoided -fstack-protector* since it resulted in a broken build on Mingw. In GCC 10 in Fedora though, we have the opposite problem, getting a broken build if we don't enable one of the -fstack-protector* options. This also works in GCC 9, so we don't need to worry about the old

[libvirt PATCH 0/4] misc fixes for GCC 10

2020-07-22 Thread Daniel P . Berrangé
This fixes problem that exhibit themselves with GCC 10, either the Debian Sid cross-compilers on 32-bit, or with Fedora rawhide mingw. Daniel P. Berrangé (4): util: refactor code to workaround gcc 10.1.0 bug m4: enable -fstack-protector-strong on mingw tests: don't mock the time() function

[libvirt PATCH 1/4] util: refactor code to workaround gcc 10.1.0 bug

2020-07-22 Thread Daniel P . Berrangé
gcc 10.1.0 on Debian sid has a bug where the bounds checking gets confused beteen two branches: In file included from /usr/include/string.h:495, from ../../src/internal.h:28, from ../../src/util/virsocket.h:21, from

Re: [libvirt PATCH 335/351] meson: docs/manpages: install man pages

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 06:51:58PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:59:31 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > [...] > > > +foreach name : keyname_list > > + rst_file = custom_target( > > +'virkeyname-@0@.rst'.format(name), > > +

Re: [libvirt PATCH 335/351] meson: docs/manpages: install man pages

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:59:31 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- [...] > +foreach name : keyname_list > + rst_file = custom_target( > +'virkeyname-@0@.rst'.format(name), > +input: keymap_src_file, > +output: 'virkeyname-@0@.rst'.format(name), > +

Re: [libvirt PATCH 127/351] meson: introduce src directory

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 04:55:27PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:56:03 +0200, Pavel Hrdina wrote: > > WARN_FLAGS are not relevant for meson as all warning flags are set to > > the whole project using add_project_arguments(). > > > > Signed-off-by: Pavel Hrdina > > --- >

Re: [libvirt PATCH 021/351] meson: add compiler warnings

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 05:49:59PM +0200, Pavel Hrdina wrote: > > > + # -Wformat=2 implies -Wformat-nonliteral so we need to manually > > > exclude it > > > + '-Wno-format-nonliteral', > > > + > > > + # -Wformat enables this by default, and we should keep it, > > > + # but need to rewrite

Re: [libvirt PATCH 021/351] meson: add compiler warnings

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 10:13:50AM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:54:17 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > config.h| 7 + > > configure.ac| 3 - > > m4/virt-compile-warnings.m4 | 255

Re: [libvirt PATCH 123/351] meson: add pm_utils build option

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:55:59 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > configure.ac| 10 -- > m4/virt-pm-utils.m4 | 45 - > meson.build | 12 > meson_options.txt | 1 + > 4 files

[PATCH] util: refactor code to workaround gcc 10.1.0 bug

2020-07-22 Thread Daniel P . Berrangé
gcc 10.1.0 on Debian sid has a bug where the bounds checking gets confused beteen two branches: In file included from /usr/include/string.h:495, from ../../src/internal.h:28, from ../../src/util/virsocket.h:21, from

Re: [libvirt PATCH 114/351] meson: add default_editor build option

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 04:44:32PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:55:50 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 3 --- > > m4/virt-default-editor.m4 | 32 > > meson.build

Re: [libvirt PATCH 058/351] meson: add libssh build dependency

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 10:56:45AM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:54:54 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 4 > > m4/virt-libssh.m4 | 51 --- > > meson.build |

Re: [libvirt PATCH 123/351] meson: add pm_utils build option

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 04:50:01PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:55:59 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac| 10 -- > > m4/virt-pm-utils.m4 | 45 - > > meson.build

Re: [libvirt PATCH 079/351] meson: add yajl build dependency

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 12:29:12PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:55:15 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 3 --- > > m4/virt-yajl.m4 | 42 -- > > meson.build | 25

Re: [libvirt PATCH 114/351] meson: add default_editor build option

2020-07-22 Thread Peter Krempa
On Wed, Jul 22, 2020 at 16:04:36 +0100, Daniel Berrange wrote: > On Wed, Jul 22, 2020 at 04:44:32PM +0200, Peter Krempa wrote: > > On Thu, Jul 16, 2020 at 11:55:50 +0200, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > > --- > > > configure.ac | 3 --- > > >

Re: [libvirt PATCH 114/351] meson: add default_editor build option

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 04:44:32PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:55:50 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 3 --- > > m4/virt-default-editor.m4 | 32 > > meson.build

Re: [PATCH v1 01/34] virDevMapperGetTargetsImpl: Close /dev/mapper/control in the end

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 02:14:38PM +0200, Michal Privoznik wrote: > On 7/22/20 12:46 PM, Daniel P. Berrangé wrote: > > On Wed, Jul 22, 2020 at 11:39:55AM +0200, Michal Privoznik wrote: > > > When building domain's private /dev in a namespace, libdevmapper > > > is consulted for getting full

Re: [libvirt PATCH 114/351] meson: add default_editor build option

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:55:50 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > configure.ac | 3 --- > m4/virt-default-editor.m4 | 32 > meson.build | 3 +++ > meson_options.txt | 1 + > 4 files changed, 4

Re: [libvirt PATCH 113/351] meson: add debug_logs build option

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 03:25:09PM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:55:49 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 3 --- > > m4/virt-debug.m4 | 33 - > > meson.build | 5 + > >

Re: [libvirt PATCH 127/351] meson: introduce src directory

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:56:03 +0200, Pavel Hrdina wrote: > WARN_FLAGS are not relevant for meson as all warning flags are set to > the whole project using add_project_arguments(). > > Signed-off-by: Pavel Hrdina > --- > diff --git a/src/meson.build b/src/meson.build > new file mode 100644

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

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 08:55:02AM +0200, Gerd Hoffmann wrote: > Hi, > > > IIUC, QEMU can expose multiple sound devices to the guest too. > > > > I think this means that we can have a M:N relationship between > > a sound device, and an audio backend, not just 1:1. > > It's 1:N. Sound devices

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

2020-07-22 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > 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

Re: Format/style of UI message

2020-07-22 Thread Ján Tomko
On a Friday in 2020, Daniel P. Berrangé wrote: On Fri, Jul 17, 2020 at 05:01:47PM +0200, Pino Toscano wrote: Hi, I recently took a look at the UI/user visible messages from libvirt, which are translated using gettext. They are extracted in a single libvirt.pot catalog, which includes messages

[libvirt PATCH] qemu: Fix affinity typo

2020-07-22 Thread Ján Tomko
Fixes: 4c0398b5284d14c55eca51095673b6fadbbd85fb Signed-off-by: Ján Tomko --- Pushed as trivial. src/qemu/qemu_process.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1006f41614..ec6ca14bbd 100644 ---

Re: The issue about adding multipath device's targets into qemu-pr-helper's namespace

2020-07-22 Thread Lin Ma
On 2020-07-22 09:44, Michal Privoznik wrote: On 7/20/20 4:36 PM, Lin Ma wrote: On 2020-07-17 07:05, Michal Prívozník wrote: errno=9 is EBADF so maybe this is a dm issue after all? Emm...So far I lean towards to an issue in libvirt code, rather than in dm. You might be right after all.

Re: [libvirt PATCH 113/351] meson: add debug_logs build option

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:55:49 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > configure.ac | 3 --- > m4/virt-debug.m4 | 33 - > meson.build | 5 + > meson_options.txt | 1 + > 4 files changed, 6 insertions(+), 36

Re: [PATCH v1 01/34] virDevMapperGetTargetsImpl: Close /dev/mapper/control in the end

2020-07-22 Thread Michal Privoznik
On 7/22/20 12:46 PM, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 11:39:55AM +0200, Michal Privoznik wrote: When building domain's private /dev in a namespace, libdevmapper is consulted for getting full dependency tree of domain's disks. The reason is that for a multipath devices all

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

2020-07-22 Thread Nikolay Shirokovskiy
On 21.07.2020 19:09, Daniel P. Berrangé wrote: > 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

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

2020-07-22 Thread Peter Krempa
On Wed, Jul 22, 2020 at 18:18:23 +0800, Jianan Gao wrote: > It is just the beginning of the practice to contribute to upstream, can be That's great! Keep up. > ignored : ) In this case we don't document stuff that is not visible to users in any way. There's a lot of times we refactor stuff

[PATCH] qemu: Do not silently allow non-available timers on non-x86 systems

2020-07-22 Thread Thomas Huth
libvirt currently silently allows and some other timer tags in the guest XML definition for timers that do not exist on non-x86 systems. We should not silently ignore these tags since the users might not get what they expected otherwise. Buglink:

Re: [libvirt PATCH 079/351] meson: add yajl build dependency

2020-07-22 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:55:15 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > configure.ac | 3 --- > m4/virt-yajl.m4 | 42 -- > meson.build | 25 + > meson_options.txt | 1 + > 4 files changed, 26

Re: [PATCH v1 01/34] virDevMapperGetTargetsImpl: Close /dev/mapper/control in the end

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 11:39:55AM +0200, Michal Privoznik wrote: > When building domain's private /dev in a namespace, libdevmapper > is consulted for getting full dependency tree of domain's disks. > The reason is that for a multipath devices all dependent devices > must be created in the

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

2020-07-22 Thread Jianan Gao
It is just the beginning of the practice to contribute to upstream, can be ignored : ) On Wed, Jul 22, 2020 at 3:30 PM Andrea Bolognani wrote: > On Wed, 2020-07-22 at 07:16 +0200, Peter Krempa wrote: > > On Wed, Jul 22, 2020 at 10:13:16 +0800, Jianan Gao wrote: > > > + * qemu: remove one of

Re: [libvirt PATCH 001/351] meson: ci: increase git clone depth to 1000

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 10:35:43AM +0200, Peter Krempa wrote: > On Wed, Jul 22, 2020 at 10:21:43 +0200, Ján Tomko wrote: > > On a Thursday in 2020, Pavel Hrdina wrote: > > > Having limit set to 100 is in most cases perfect but sometimes there can > > > be a larger series that will have more than

Re: The issue about adding multipath device's targets into qemu-pr-helper's namespace

2020-07-22 Thread Michal Privoznik
On 7/20/20 4:36 PM, Lin Ma wrote: On 2020-07-17 07:05, Michal Prívozník wrote: errno=9 is EBADF so maybe this is a dm issue after all? Emm...So far I lean towards to an issue in libvirt code, rather than in dm. You might be right after all. Turns out that the mass FD closing we do before

[PATCH v1 26/34] qemuDomainBuildNamespace: Populate SEV from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain SEV into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 17 ++--- 1 file

[PATCH v1 29/34] qemuDomainNamespaceUnlinkPaths: Turn @paths into string list

2020-07-22 Thread Michal Privoznik
So far, the only caller qemuDomainNamespaceUnlinkPath() will always pass a single path to unlink, but similarly to qemuDomainNamespaceMknodPaths() - there are a few callers that would like to pass two or more files to unlink at once (held in a string list). Make the @paths argument a string list

[PATCH v1 23/34] qemuDomainBuildNamespace: Populate inputs from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain inputs into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 22 +++--- 1

[PATCH v1 08/34] qemuDomainAttachDeviceMknodHelper: Don't leak data->target

2020-07-22 Thread Michal Privoznik
It's not really a problem since this is a helper process that dies as soon as the helper function returns, but the cleanup code will be replaced with a function soon and this change prepares the code for that. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 3 ++- 1 file

[PATCH v1 12/34] qemuDomainNamespaceMknodPaths: Create more files in one go

2020-07-22 Thread Michal Privoznik
While the previous commit prepared the helper function run in a forked off helper (with corresponding struct), this commit modifies the caller, which now create all files requested in a single process and does not fork off for every single path. Signed-off-by: Michal Privoznik ---

[PATCH v1 27/34] qemu_domain_namespace: Drop unused functions

2020-07-22 Thread Michal Privoznik
After previous cleanup, creating /dev nodes from pre-exec hook is no longer needed and thus can be removed. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 248 --- 1 file changed, 248 deletions(-) diff --git a/src/qemu/qemu_domain_namespace.c

[PATCH v1 34/34] qemuDomainNamespaceTeardownInput: Deduplicate code

2020-07-22 Thread Michal Privoznik
We can use qemuDomainSetupInput() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git

[PATCH v1 18/34] qemuDomainBuildNamespace: Populate hostdevs from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain hostdevs into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 43

[PATCH v1 11/34] qemuDomainAttachDeviceMknodHelper: Create more files in a single go

2020-07-22 Thread Michal Privoznik
So far, when attaching a device needs two or more /dev nodes created into a domain, we fork off and run the helper for every node separately. For majority of devices this is okay, because they need no or one node created anyway. But the idea is to use this attach code to build the namespace when

Re: [libvirt PATCH 008/351] meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg

2020-07-22 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: On Wed, Jul 22, 2020 at 10:33:58 +0200, Ján Tomko wrote: On a Wednesday in 2020, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:54:04 +0200, Pavel Hrdina wrote: > > With meson we no longer have .libs directory with the actual binary so > > we have

[PATCH v1 17/34] qemuDomainBuildNamespace: Populate disks from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain disks into daemon's namespace. Fixes: a30078cb832646177defd256e77c632905f1e6d0 Resolves:

Re: [libvirt PATCH 016/351] meson: add test_suite build option

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 11:25:07AM +0200, Ján Tomko wrote: > On a Wednesday in 2020, Peter Krempa wrote: > > On Thu, Jul 16, 2020 at 11:54:12 +0200, Pavel Hrdina wrote: > > > With autoconf this option controlled if the test suite is compiled by > > > default or not with the fact that it will be

Re: [libvirt PATCH 008/351] meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg

2020-07-22 Thread Pavel Hrdina
On Wed, Jul 22, 2020 at 11:43:09AM +0200, Peter Krempa wrote: > On Wed, Jul 22, 2020 at 11:32:07 +0200, Ján Tomko wrote: > > On a Wednesday in 2020, Peter Krempa wrote: > > > On Wed, Jul 22, 2020 at 10:33:58 +0200, Ján Tomko wrote: > > > > On a Wednesday in 2020, Peter Krempa wrote: > > > > > On

Re: [libvirt PATCH 001/351] meson: ci: increase git clone depth to 1000

2020-07-22 Thread Ján Tomko
On a Wednesday in 2020, Pavel Hrdina wrote: On Wed, Jul 22, 2020 at 10:35:43AM +0200, Peter Krempa wrote: On Wed, Jul 22, 2020 at 10:21:43 +0200, Ján Tomko wrote: > On a Thursday in 2020, Pavel Hrdina wrote: > > Having limit set to 100 is in most cases perfect but sometimes there can > > be a

Re: [ovirt-devel] [ARM64] Possiblity to support oVirt on ARM64

2020-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2020 at 04:29:15PM +0800, Zhenyu Zheng wrote: > Hi, > > Any other comments for this topic? libguestfs, nbdkit and virt-v2v have also worked (upstream) for years out of the box on aarch64, so there should be no problem there. If you're interested in RHV (ie. oVirt downstream on

Re: [PATCH 1/1] formatdomain.html.in: mention pSeries NVDIMM 'align down' mechanic

2020-07-22 Thread Daniel Henrique Barboza
Hi, On 7/22/20 5:05 AM, Andrea Bolognani wrote: On Mon, 2020-07-20 at 13:51 -0300, Daniel Henrique Barboza wrote: + the remaining size (total-size - label-size), also called guest +area, will be aligned to 4KiB as default. For pSeries guests, the +

Re: [libvirt PATCH 001/351] meson: ci: increase git clone depth to 1000

2020-07-22 Thread Daniel P . Berrangé
On Thu, Jul 16, 2020 at 11:53:57AM +0200, Pavel Hrdina wrote: > Having limit set to 100 is in most cases perfect but sometimes there can > be a larger series that will have more than 100 patches and it will make > the check-dco job fail. > > Signed-off-by: Pavel Hrdina > --- > .gitlab-ci.yml

[PATCH v1 33/34] qemuDomainNamespaceTeardownRNG: Deduplicate code

2020-07-22 Thread Michal Privoznik
We can use qemuDomainSetupRNG() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_domain_namespace.c

[PATCH v1 31/34] qemuDomainNamespaceTeardownMemory: Deduplicate code

2020-07-22 Thread Michal Privoznik
We can use qemuDomainSetupMemory() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain_namespace.c

[PATCH v1 03/34] qemu: Separate out namespace handling code

2020-07-22 Thread Michal Privoznik
The qemu_domain.c file is big as is and we should split it into separate semantic blocks. Start with code that handles domain namespaces. Signed-off-by: Michal Privoznik --- po/POTFILES.in |1 + src/qemu/Makefile.inc.am |2 + src/qemu/qemu_conf.c |

[PATCH v1 32/34] qemuDomainNamespaceTeardownChardev: Deduplicate code

2020-07-22 Thread Michal Privoznik
We can use qemuDomainSetupChardev() to obtain the path that we need to unlink() from within domain's namespace. Note, while previously we unlinked only VIR_DOMAIN_CHR_TYPE_DEV chardevs, with this change we unlink some other types too - exactly those types we created when plugging the device in.

Re: [libvirt PATCH 082/351] meson: add BHyVe build option

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- configure.ac| 3 --- m4/virt-driver-bhyve.m4 | 56 - meson.build | 16 meson_options.txt | 1 + 4 files changed, 17 insertions(+), 59

Re: [libvirt PATCH 008/351] meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg

2020-07-22 Thread Peter Krempa
On Wed, Jul 22, 2020 at 11:32:07 +0200, Ján Tomko wrote: > On a Wednesday in 2020, Peter Krempa wrote: > > On Wed, Jul 22, 2020 at 10:33:58 +0200, Ján Tomko wrote: > > > On a Wednesday in 2020, Peter Krempa wrote: > > > > On Thu, Jul 16, 2020 at 11:54:04 +0200, Pavel Hrdina wrote: > > > > > With

[PATCH v1 15/34] qemu_domain_namespace: Repurpose qemuDomainBuildNamespace()

2020-07-22 Thread Michal Privoznik
Okay, here is the deal. Currently, the way we build namespace is very fragile. It is done from pre-exec hook when starting a domain, after we mass closed all FDs and before we drop privileges and exec() QEMU. This fact poses some limitations onto the namespace build code, e.g. it has to make sure

[PATCH v1 28/34] qemuDomainDetachDeviceUnlink: Unlink paths in one go

2020-07-22 Thread Michal Privoznik
Simirarly to qemuDomainAttachDeviceMknodHelper() which was modified just a couple of commits ago, modify the unlink helper which is called on device detach so that it can unlink multiple files in one go instead of forking off for every single one of them. Signed-off-by: Michal Privoznik ---

[PATCH v1 22/34] qemuDomainBuildNamespace: Populate graphics from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain graphics (render node) into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 14

Re: [libvirt PATCH 019/351] meson: add static analysis detection

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- configure.ac | 15 --- meson.build | 13 + 2 files changed, 13 insertions(+), 15 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH v1 24/34] qemuDomainBuildNamespace: Populate RNGs from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain RNGs into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 40

[PATCH v1 30/34] qemuDomainNamespaceTeardownHostdev: Unlink paths in one go

2020-07-22 Thread Michal Privoznik
In my attempt to deduplicate the code, we can use qemuDomainSetupHostdev() to obtain the list of paths to unlink and then pass it to qemuDomainNamespaceUnlinkPaths() to unlink them in a single fork. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 14 ++ 1 file

[PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in previous commit, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with basic /dev nodes (e.g. /dev/null, /dev/kvm, etc.) into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c |

[PATCH v1 06/34] qemu_domain_namespace: Check for namespace enablement earlier

2020-07-22 Thread Michal Privoznik
Functions that create a device node after domain startup (used from hotplug) will get a list of paths they want to create and eventually call qemuDomainNamespaceMknodPaths() which then checks whether domain mount namespace is enabled in the first place. Alternatively, on device hotunplug, we might

[PATCH v1 20/34] qemuDomainBuildNamespace: Populate chardevs from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain chardevs into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 27

[PATCH v1 01/34] virDevMapperGetTargetsImpl: Close /dev/mapper/control in the end

2020-07-22 Thread Michal Privoznik
When building domain's private /dev in a namespace, libdevmapper is consulted for getting full dependency tree of domain's disks. The reason is that for a multipath devices all dependent devices must be created in the namespace and allowed in CGroups. However, this approach is very fragile as

[PATCH v1 21/34] qemuDomainBuildNamespace: Populate TPM from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain TPM into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 15 +++ 1 file

[PATCH v1 00/34] Rework building of domain's namespaces

2020-07-22 Thread Michal Privoznik
There are couple of things happening in this series. The first patch fixes a bug. We are leaking /dev/mapper/control in QEMU. See the patch for detailed info. The second patch then cleans up code a bit. The third patch moves namespace handling code into a separate file. Patches 4 - 15 then

[PATCH v1 09/34] qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData

2020-07-22 Thread Michal Privoznik
This structure is going to be used from not only device attach code, but also when building the namespace. Moreover, the code lives in a separate file so the chances of clashing with another name are minimal. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 6 +++--- 1

[PATCH v1 19/34] qemuDomainBuildNamespace: Populate memory from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain memory (nvdimms) into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 22

[PATCH v1 14/34] qemuDomainSetupDisk: Accept @src

2020-07-22 Thread Michal Privoznik
The aim to make it look as close to qemuDomainNamespaceSetupDisk() as possible. The latter will call the former and this change makes that diff easier to read. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH v1 13/34] qemuDomainNamespaceMknodPaths: Turn @paths into string list

2020-07-22 Thread Michal Privoznik
Every caller does the same - counts the number of items in a string list they have, only to pass the number to qemuDomainNamespaceMknodPaths(). This is needless - the function can accept the string list and count the items itself. Signed-off-by: Michal Privoznik ---

[PATCH v1 25/34] qemuDomainBuildNamespace: Populate loader from daemon's namespace

2020-07-22 Thread Michal Privoznik
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain loader into daemon's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 14 +++--- 1 file

[PATCH v1 02/34] virDevMapperGetTargets: Don't ignore EBADF

2020-07-22 Thread Michal Privoznik
One of the symptoms of the bug [1] is that on the second start of a domain we get EBADF when talking to libdevmapper. The reason is that libdevmapper opens /dev/mapper/control to talk to kernel and saves the FD into a global variable. This works well when starting a domain for the first time: the

[PATCH v1 05/34] qemu_domain_namespace: Drop unused @cfg argument

2020-07-22 Thread Michal Privoznik
There is a lot of functions called from qemuDomainBuildNamespace() that accept @cfg (virQEMUDriverConfigPtr) as an argument and don't use it. Historically, it was done so that all qemuDomainSetupAll*() functions look the same. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c

[PATCH v1 10/34] qemuDomainAttachDeviceMknodRecursive: Isolate bind mounted devices condition

2020-07-22 Thread Michal Privoznik
When attaching a device into a domain, the corresponding /dev node might need to be created in the domain's namespace. For some types of files we call mknod(), for symlinks we call symlink(), but for others - which exist in the host namespace - we need to so called 'bind mount' them (which is a

[PATCH v1 04/34] qemu_domain_namespace: Rename qemuDomainCreateNamespace()

2020-07-22 Thread Michal Privoznik
The name of this function is not very helpful, because it doesn't create anything, it just flips a bit in a bitmask when domain is starting up. Move the function internals into qemu_process.c and forget the function ever existed. Signed-off-by: Michal Privoznik ---

[PATCH v1 07/34] qemuDomainNamespaceSetupHostdev: Create paths in one go

2020-07-22 Thread Michal Privoznik
While qemuDomainNamespaceMknodPaths() doesn't actually creates files in the namespace in one go (it forks for each path), it a few commits time it will. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

Re: [libvirt PATCH 018/351] meson: add test_coverage build option

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- configure.ac | 21 - meson.build | 16 meson_options.txt | 1 + 3 files changed, 17 insertions(+), 21 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [libvirt PATCH 014/351] meson: generate configmake.h

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: We don't use all of the defines so copy only the ones actually used. Signed-off-by: Pavel Hrdina --- Makefile.am | 41 - configmake.h.in | 16 meson.build | 23 +++ 3

Re: [libvirt PATCH 017/351] meson: add expensive_tests build option

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- configure.ac | 21 - meson.build | 6 ++ meson_options.txt | 1 + 3 files changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt PATCH 016/351] meson: add test_suite build option

2020-07-22 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: On Thu, Jul 16, 2020 at 11:54:12 +0200, Pavel Hrdina wrote: With autoconf this option controlled if the test suite is compiled by default or not with the fact that it will be compiled later when running `make check`. With meson it is not possible to

Re: [libvirt PATCH 015/351] meson: add packager build options

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- configure.ac | 13 - meson.build | 14 ++ meson_options.txt | 2 ++ 3 files changed, 16 insertions(+), 13 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt PATCH 001/351] meson: ci: increase git clone depth to 1000

2020-07-22 Thread Andrea Bolognani
On Wed, 2020-07-22 at 10:21 +0200, Ján Tomko wrote: > > +++ b/ci/cirrus/build.yml > > @@ -14,7 +14,7 @@ build_task: > > install_script: > > - @INSTALL_COMMAND@ @PKGS@ > > clone_script: > > -- git clone --depth 100 "$CI_REPOSITORY_URL" . > > +- git clone --depth 1000

Re: [libvirt PATCH 010/351] meson: introduce meson build files

2020-07-22 Thread Ján Tomko
On a Thursday in 2020, Pavel Hrdina wrote: The PACKAGE* variables are defined by AC_INIT so we have to define explicitly with meson. Interesting, it also defines PACKAGE_BUGREPORT, but instead we hardcode libvir-list@redhat.com in a few error messages. Signed-off-by: Pavel Hrdina ---

Re: [ovirt-devel] [ARM64] Possiblity to support oVirt on ARM64

2020-07-22 Thread Daniel P . Berrangé
On Sun, Jul 19, 2020 at 09:06:42PM +0300, Nir Soffer wrote: > On Sun, Jul 19, 2020 at 5:04 PM Zhenyu Zheng > wrote: > > > > Hi oVirt, > > > > We are currently trying to make oVirt work on ARM64 platform, since I'm > > quite new to oVirt community, I'm wondering what is the current status > >

  1   2   >