Re: [libvirt][RFC PATCH] add a new 'default' option for attribute mode in numatune

2020-08-06 Thread Zhong, Luyao
On 8/3/2020 7:00 PM, Martin Kletzander wrote: On Mon, Aug 03, 2020 at 05:31:56PM +0800, Luyao Zhong wrote: Hi Libvirt experts, I would like enhence the numatune snippet configuration. Given a example snippet:  ...               ... Currently, attribute mode is either 'interleave',

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-06 Thread Mark Mielke
On Wed, Aug 5, 2020 at 4:31 AM Mark Mielke wrote: > On Wed, Aug 5, 2020 at 4:19 AM Andrea Bolognani > wrote: > >> That said, if upgrading QEMU results in losing features, even though >> you can recover them through additional steps I would argue that's a >> bug in the packaging that should be

[libvirt PATCH] Adds e1000e/vmxnet3 Vnet_hdr suuport

2020-08-06 Thread Patrick Magauran
Libvirt bases its decision about whether to apply the vnet_hdr flag to the tap interface on whether or not the selected model is VirtIO. Originally, VirtIO was the only model to support the vnet_hdr in QEMU; however, the e1000e & vmxnet3 adapters also support it(seemingly from introduction

Re: [PATCH 1/3] qemu: implementation of transient option for qcow2 file

2020-08-06 Thread Masayoshi Mizuma
On Thu, Aug 06, 2020 at 12:09:20PM +0200, Peter Krempa wrote: > On Sun, Jul 19, 2020 at 22:56:50 -0400, Masayoshi Mizuma wrote: > > On Sat, Jul 18, 2020 at 08:06:00AM +0200, Peter Krempa wrote: > > > On Thu, Jul 16, 2020 at 20:55:29 -0400, Masayoshi Mizuma wrote: > > > > Thank you for your review.

Re: Is the default discard mode to ignore?

2020-08-06 Thread Martin Kletzander
On Thu, Aug 06, 2020 at 01:35:45PM -0600, Chris Murphy wrote: virt-manager 'Discard Mode" defaults to "Hypervisor default" but I'm not sure if there's ever a case where this could translate into on/unmap? What problems could result if the guest OS file system mount option were to default to

Is the default discard mode to ignore?

2020-08-06 Thread Chris Murphy
virt-manager 'Discard Mode" defaults to "Hypervisor default" but I'm not sure if there's ever a case where this could translate into on/unmap? What problems could result if the guest OS file system mount option were to default to 'discard'? Is it reasonable to expect discards will be inhibited by

[PATCH 1/2] testutilsqemuschema: Add template checker for schema entries

2020-08-06 Thread Peter Krempa
We'll need to match that a certain part of the qemu schema hasn't grown new properties unexpectedly. Add a helper which matches an 'object' QMP schema entry against a template and reports errors if expected types don't match or new entries are added. Signed-off-by: Peter Krempa ---

[PATCH 2/2] qemumonitorjsontest: Add a last-resort warning if object-add/device_add are QAPIfied

2020-08-06 Thread Peter Krempa
When netdev-add was qapified it took us by surprise and we had to scramble to fix the internals to format conformant monitor arguments. Add a last-resort early warning system if this happens to object-add or device_add. Hopefully qemu developers notify us sooner than this. Signed-off-by: Peter

[PATCH 0/2] qemu: Add a last-resort warning if object-add/device_add are QAPIfied

2020-08-06 Thread Peter Krempa
See patch 2/2. Peter Krempa (2): testutilsqemuschema: Add template checker for schema entries qemumonitorjsontest: Add a last-resort warning if object-add/device_add are QAPIfied tests/qemumonitorjsontest.c | 53 + tests/testutilsqemuschema.c | 115

Re: [PATCH 3/4] virdevmapper: Don't use libdevmapper to obtain dependencies

2020-08-06 Thread Andrea Bolognani
On Thu, 2020-08-06 at 15:45 +0200, Marc Hartmayer wrote: > On Tue, Aug 04, 2020 at 11:39 PM +0200, Andrea Bolognani > wrote: > > This patch broke libvirt in Debian for certain setups. > > > > With AppArmor enabled (the default), the error is > > > > $ virsh start cirros > > error: Failed

Re: [PATCH v2 00/13] resolve hangs/crashes on libvirtd shutdown

2020-08-06 Thread Nikolay Shirokovskiy
polite ping On 23.07.2020 13:14, Nikolay Shirokovskiy wrote: > I keep qemu VM event loop exiting synchronously but add code to avoid deadlock > that can be caused by this approach. I guess it is worth having synchronous > exiting of threads in this case to avoid crashes. > > Patches that are

Re: [PATCH 3/4] virdevmapper: Don't use libdevmapper to obtain dependencies

2020-08-06 Thread Marc Hartmayer
On Tue, Aug 04, 2020 at 11:39 PM +0200, Andrea Bolognani wrote: > On Mon, 2020-07-27 at 10:31 +0200, Michal Privoznik wrote: >> CVE-2020-14339 >> >> When building domain's private /dev in a namespace, libdevmapper >> is consulted for getting full dependency tree of domain's disks. >> The reason

Re: [PATCH] kbase: Add knowledge base for libvirt systemtap

2020-08-06 Thread Daniel Henrique Barboza
On 8/6/20 3:34 AM, Han Han wrote: Signed-off-by: Han Han --- docs/kbase.rst | 3 ++ docs/kbase/meson.build | 1 + docs/kbase/systemtap.rst | 113 +++ 3 files changed, 117 insertions(+) create mode 100644 docs/kbase/systemtap.rst diff

[PATCH 1/4] docs: get rid of 'make check' references

2020-08-06 Thread Daniel Henrique Barboza
Update the remaining 'make check' references after the switch to meson/ninja. The reference in testsuites.html.in was kept with a note that it is the process for Libvirt 6.6.0 and older. Signed-off-by: Daniel Henrique Barboza --- docs/advanced-tests.rst| 2 +- docs/api_extension.html.in |

[PATCH 0/4] remove 'make check' references from code

2020-08-06 Thread Daniel Henrique Barboza
Simple series that removes the references of the now former 'make check', replacing it to 'ninja test'. Daniel Henrique Barboza (4): docs: get rid of 'make check' references ci/Makefile: get rid of 'make check' references tests: get rid of 'make check' references vbox_XPCOMCGlue.c: get

[PATCH 2/4] ci/Makefile: get rid of 'make check' references

2020-08-06 Thread Daniel Henrique Barboza
Update the remaining 'make check' references after the switch to meson/ninja. Signed-off-by: Daniel Henrique Barboza --- ci/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/Makefile b/ci/Makefile index 65d8fcca07..c7c8eb9a45 100644 --- a/ci/Makefile +++

[PATCH 3/4] tests: get rid of 'make check' references

2020-08-06 Thread Daniel Henrique Barboza
Update the remaining 'make check' references after the switch to meson/ninja. Signed-off-by: Daniel Henrique Barboza --- tests/domaincapstest.c | 2 +- tests/qemucapabilitiestest.c | 2 +- tests/test-lib.sh| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 4/4] vbox_XPCOMCGlue.c: get rid of 'make check' reference

2020-08-06 Thread Daniel Henrique Barboza
Change the 'make check' reference after the switch to meson/ninja. Signed-off-by: Daniel Henrique Barboza --- src/vbox/vbox_XPCOMCGlue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c index fa5a56ede6..3cbb679110

Re: [PATCH v3 4/5] doc: rng schemas and html doc for rbd namespace attribute

2020-08-06 Thread Peter Krempa
On Thu, Aug 06, 2020 at 19:41:45 +0800, Han Han wrote: > Signed-off-by: Han Han > --- > docs/formatdomain.rst | 5 - > docs/schemas/domaincommon.rng | 3 +++ > 2 files changed, 7 insertions(+), 1 deletion(-) I suggest you combine this with patch 2.

Re: [PATCH v3 3/5] qemu: Implement rbd namespace attribute

2020-08-06 Thread Peter Krempa
On Thu, Aug 06, 2020 at 19:41:44 +0800, Han Han wrote: > Ceph Nautilus supports separate image namespaces within a pool for > tenant isolation and QEMU added it as a rbd blockdev options from 5.0.0. > This optional attribute is used to access a image with namespace. > > Add unit tests for this

Re: [PATCH v3 2/5] conf: Support to parse rbd namespace attribute

2020-08-06 Thread Peter Krempa
On Thu, Aug 06, 2020 at 19:41:43 +0800, Han Han wrote: > Signed-off-by: Han Han > --- > src/conf/domain_conf.c| 4 > src/util/virstoragefile.h | 1 + > 2 files changed, 5 insertions(+) [...] > diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h > index

Re: [PATCH v3 1/5] qemu_capabilities: Add QEMU_CAPS_RBD_NAMESPACE

2020-08-06 Thread Peter Krempa
On Thu, Aug 06, 2020 at 19:41:42 +0800, Han Han wrote: > Add rbd namespace in aarch64 capability replies. > > The capability flag will be used for rbd namespace option. The rbd namespace > is introduced since ceph Nautilus and qemu v5.0.0. > > Signed-off-by: Han Han > --- [...] > diff --git

[PATCH v3 2/5] conf: Support to parse rbd namespace attribute

2020-08-06 Thread Han Han
Signed-off-by: Han Han --- src/conf/domain_conf.c| 4 src/util/virstoragefile.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ef67efa1da..163c934428 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9601,6

[PATCH v3 1/5] qemu_capabilities: Add QEMU_CAPS_RBD_NAMESPACE

2020-08-06 Thread Han Han
Add rbd namespace in aarch64 capability replies. The capability flag will be used for rbd namespace option. The rbd namespace is introduced since ceph Nautilus and qemu v5.0.0. Signed-off-by: Han Han --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h

[PATCH v3 5/5] news: qemu: Support rbd namespace

2020-08-06 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 63ca689b43..57d8a40731 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,12 @@ v6.7.0 (unreleased) * **New features** + * qemu: Support rbd namespace attribute + +The

[PATCH v3 3/5] qemu: Implement rbd namespace attribute

2020-08-06 Thread Han Han
Ceph Nautilus supports separate image namespaces within a pool for tenant isolation and QEMU added it as a rbd blockdev options from 5.0.0. This optional attribute is used to access a image with namespace. Add unit tests for this attribute. https://bugzilla.redhat.com/show_bug.cgi?id=1816909

[PATCH v3 4/5] doc: rng schemas and html doc for rbd namespace attribute

2020-08-06 Thread Han Han
Signed-off-by: Han Han --- docs/formatdomain.rst | 5 - docs/schemas/domaincommon.rng | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 218f0c1718..431abc6f56 100644 --- a/docs/formatdomain.rst +++

[PATCH v3 0/5] qemu: Support rbd namespace attribute

2020-08-06 Thread Han Han
Diff from v2: - rebase to master - update some qemu capabilities tests Test results of this patch series on qemu-5.0.0 and librbd1-14.2.8: disk xml: Live attach and detach the disk: ➜ ~ virsh attach-device new

[libvirt PATCH v3 03/10] remote: split off enums into separate source file

2020-08-06 Thread Daniel P . Berrangé
The remoteDriverTransport and remoteDriverMode enums are going to be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/meson.build | 1 + src/remote/remote_driver.c | 41 +- src/remote/remote_sockets.c |

[libvirt PATCH v3 09/10] rpc: switch order of args in virNetClientNewSSH

2020-08-06 Thread Daniel P . Berrangé
Switch keyfile and netcat parameters, since the netcat path and socket path are a logical pair that belong together. This patches the other constructors. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 2 +- src/rpc/virnetclient.c | 2 +- src/rpc/virnetclient.h | 4

[libvirt PATCH v3 05/10] remote: parse the remote transport string earlier

2020-08-06 Thread Daniel P . Berrangé
We delay converting the remote transport string to enum form until fairly late. As a result we're doing string comparisons when we could be just doing enum comparisons. Signed-off-by: Daniel P. Berrangé --- po/POTFILES.in | 1 + src/remote/remote_driver.c | 51

[libvirt PATCH v3 00/10] remote: introduce a custom netcat impl for ssh tunnelling

2020-08-06 Thread Daniel P . Berrangé
We have long had a problem with use of netcat for ssh tunnelling because there's no guarantee the UNIX socket path the client builds will match the UNIX socket path the remote host uses. We don't even allow session mode SSH tunnelling for this reason. We also can't easily auto-spawn libvirtd in

[libvirt PATCH v3 08/10] remote: introduce virt-ssh-helper binary

2020-08-06 Thread Daniel P . Berrangé
When accessing libvirtd over a SSH tunnel, the remote driver needs a way to proxy the SSH input/output stream to a suitable libvirt daemon. Tihs is currently done by spawning netcat, pointing it to the libvirtd socket path. This is problematic for a number of reasons: - The socket path varies

[libvirt PATCH v3 10/10] rpc: use new virt-ssh-helper binary for remote tunnelling

2020-08-06 Thread Daniel P . Berrangé
This wires up support for using the new virt-ssh-helper binary with the ssh, libssh and libssh2 protocols. The new binary will be used preferentially if it is available in $PATH, otherwise we fall back to traditional netcat. The "proxy" URI parameter can be used to force use of netcat e.g.

[libvirt PATCH v3 07/10] remote: extract logic for determining daemon to connect to

2020-08-06 Thread Daniel P . Berrangé
We'll shortly want to reuse code for determining whether to connect to the system or session daemon from places outside the remote driver client. Pulling it out into a self contained function facilitates reuse. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 51

[libvirt PATCH v3 02/10] remote: push logic for default netcat binary into common helper

2020-08-06 Thread Daniel P . Berrangé
We don't want to repeat the choice of default netcat binary setting in three different places. This will also make it possible to do better error reporting in the helper. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 2 +- src/rpc/virnetclient.c | 5 +++-- 2 files

[libvirt PATCH v3 01/10] rpc: merge logic for generating remote SSH shell script

2020-08-06 Thread Daniel P . Berrangé
Three parts of the code all build up the same SSH shell script snippet for remote tunneling the RPC protocol, but in slightly different ways. Combine them all into one helper method in the virNetClient code, since this logic doesn't really belong in the virNetSocket code. Note that the this

[libvirt PATCH v3 06/10] remote: split out function for constructing socket path

2020-08-06 Thread Daniel P . Berrangé
The remoteGetUNIXSocketHelper method will be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 129 +- src/remote/remote_sockets.c | 134

[libvirt PATCH v3 04/10] remote: split out function for parsing URI scheme

2020-08-06 Thread Daniel P . Berrangé
The remoteSplitURISCheme method will be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 25 - src/remote/remote_sockets.c | 28 src/remote/remote_sockets.h | 6

Re: [PATCH 1/3] qemu: implementation of transient option for qcow2 file

2020-08-06 Thread Peter Krempa
On Sun, Jul 19, 2020 at 22:56:50 -0400, Masayoshi Mizuma wrote: > On Sat, Jul 18, 2020 at 08:06:00AM +0200, Peter Krempa wrote: > > On Thu, Jul 16, 2020 at 20:55:29 -0400, Masayoshi Mizuma wrote: > > > Thank you for your review. > > > > > > On Tue, Jul 07, 2020 at 06:36:23AM -0500, Eric Blake

Re: [PATCH 5/5] qemu: Extract snapshot related code to a separate file

2020-08-06 Thread Peter Krempa
On Thu, Aug 06, 2020 at 11:55:16 +0200, Peter Krempa wrote: > We've dumped all the snapshot helpers and related code into > qemu_driver.c. It accounted for ~10% of overal size of qemu_driver.c. > > Separate the code to qemu_snapshot.c/h. > > Signed-off-by: Peter Krempa > --- This patch is best

[PATCH 2/5] qemuOpenFile: Move to qemu_domain.c

2020-08-06 Thread Peter Krempa
Move the code to qemu_domain.c so that it can be reused in other parts of the qemu driver. 'qemu_domain' was chosen as the permissions are based on the domain configuration. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 42 +++ src/qemu/qemu_domain.h |

[PATCH 1/5] qemuOpenFileAs: Move into util/virqemu.c

2020-08-06 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 138 ++- src/util/virqemu.c | 130 src/util/virqemu.h | 7 ++ 4 files changed, 144 insertions(+), 132 deletions(-)

[PATCH 0/5] qemu: split off snapshot code for cleanup and reuse

2020-08-06 Thread Peter Krempa
Peter Krempa (5): qemuOpenFileAs: Move into util/virqemu.c qemuOpenFile: Move to qemu_domain.c qemuFileWrapperFDClose: move to qemu_domain.c qemu: Split of code related to handling of the save image file qemu: Extract snapshot related code to a separate file po/POTFILES.in|

[PATCH 3/5] qemuFileWrapperFDClose: move to qemu_domain.c

2020-08-06 Thread Peter Krempa
Move the code to qemu_domain.c so that it can be reused in other parts of the qemu driver. 'qemu_domain' was chosen as we check the domain state after closing the wrapper. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 28 src/qemu/qemu_domain.h | 4

[PATCH 4/5] qemu: Split of code related to handling of the save image file

2020-08-06 Thread Peter Krempa
There's a lot of helper code related to the save image handling. Extract it to qemu_saveimage.c/h. Signed-off-by: Peter Krempa --- po/POTFILES.in| 1 + src/qemu/meson.build | 1 + src/qemu/qemu_driver.c| 843 +++---

[PATCH] kbase: Add knowledge base for libvirt systemtap

2020-08-06 Thread Han Han
Signed-off-by: Han Han --- docs/kbase.rst | 3 ++ docs/kbase/meson.build | 1 + docs/kbase/systemtap.rst | 113 +++ 3 files changed, 117 insertions(+) create mode 100644 docs/kbase/systemtap.rst diff --git a/docs/kbase.rst b/docs/kbase.rst