Re: [RFC PATCH 10/16] tests: qemublock: Add test for checkpoint deletion bitmap merge

2020-01-27 Thread Peter Krempa
On Mon, Jan 27, 2020 at 12:55:02 -0600, Eric Blake wrote: > On 1/9/20 12:21 PM, Peter Krempa wrote: > > Add test infrastructure and a basic test for bitmap deletion. > > > > Signed-off-by: Peter Krempa > > --- > > tests/qemublocktest.c | 59 +++ > >

Re: [RFC PATCH 10/16] tests: qemublock: Add test for checkpoint deletion bitmap merge

2020-01-27 Thread Eric Blake
On 1/9/20 12:21 PM, Peter Krempa wrote: Add test infrastructure and a basic test for bitmap deletion. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 59 +++ .../checkpointdelete/basic-noparent-out.json | 9 +++ 2 files changed, 68

[PATCH v1 0/2] DAC,SELinux: do not remember/recall labels for

2020-01-27 Thread Daniel Henrique Barboza
Libvirt is trying to do multiple open() calls in /dev/vfio files, which results in errors inside the security drivers and QEMU returning error 125 when attempting to hotplug a hostdev which belongs to the same IOMMU group as an existing domain hostdev. See patch 2 commit msg for more details. I

[PATCH v1 2/2] security: do not remember/recall labels for VFIO

2020-01-27 Thread Daniel Henrique Barboza
Files inside /dev/vfio/ can't be opened more than once, meaning that any subsequent open calls will fail. This behavior was introduced in kernel v3.11, commit 6d6768c61b39. When using the VFIO driver, we open a FD to /dev/vfio/N and pass it to QEMU. If any other call attempt for the same

[PATCH v1 1/2] security: Allow 'remember' to be set for HostdevLabelHelper

2020-01-27 Thread Daniel Henrique Barboza
There is a case in which we do not want 'remember' to be set to true in SetOwnership() calls inside the HostdevLabelHelper() functions of both DAC and SELinux drivers. Next patch will explain and handle that scenario. For now, let's make virSecurityDACSetOwnership() and

[PATCH] docs: domaincaps: Mention VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA

2020-01-27 Thread Peter Krempa
The flag for the virDomainUndefine API is supported even if we report that . Mention it in the docs. Signed-off-by: Peter Krempa --- docs/formatdomaincaps.html.in | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/formatdomaincaps.html.in

Re: [libvirt PATCH 06/32] util: use getgrouplist() directly instead of mgetgroups

2020-01-27 Thread Daniel P . Berrangé
On Mon, Jan 27, 2020 at 06:05:06PM +0100, Pavel Hrdina wrote: > On Mon, Jan 27, 2020 at 04:42:41PM +, Daniel P. Berrangé wrote: > > On Mon, Jan 27, 2020 at 12:44:01PM +0100, Pavel Hrdina wrote: > > > On Thu, Jan 23, 2020 at 11:42:59AM +, Daniel P. Berrangé wrote: > > > > The mgetgroups

Re: [libvirt PATCH 06/32] util: use getgrouplist() directly instead of mgetgroups

2020-01-27 Thread Pavel Hrdina
On Mon, Jan 27, 2020 at 04:42:41PM +, Daniel P. Berrangé wrote: > On Mon, Jan 27, 2020 at 12:44:01PM +0100, Pavel Hrdina wrote: > > On Thu, Jan 23, 2020 at 11:42:59AM +, Daniel P. Berrangé wrote: > > > The mgetgroups function is a GNULIB custom wrapper around > > > getgrouplist(). This

[PATCH 2/3] qemu_shim: Fix typos

2020-01-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_shim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_shim.c b/src/qemu/qemu_shim.c index ccdb4f6b5b..6c6029e232 100644 --- a/src/qemu/qemu_shim.c +++ b/src/qemu/qemu_shim.c @@ -263,7 +263,7 @@ int main(int

[PATCH 3/3] qemu_shim: Update temporary directory template

2020-01-27 Thread Andrea Bolognani
The template still references libvirt-qemu-shim, which was at one point the name used to refer to what we now know as virt-qemu-run. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_shim.c

[PATCH 1/3] docs: Fix link to virt-qemu-run(1)

2020-01-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/manpages/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manpages/index.rst b/docs/manpages/index.rst index 2e71f81962..3624ae4e8f 100644 --- a/docs/manpages/index.rst +++ b/docs/manpages/index.rst @@ -19,7 +19,7 @@

[PATCH 0/3] Trivial fixes

2020-01-27 Thread Andrea Bolognani
Pushed as - wait for it - trivial. Andrea Bolognani (3): docs: Fix link to virt-qemu-run(1) qemu_shim: Fix typos qemu_shim: Update temporary directory template docs/manpages/index.rst | 2 +- src/qemu/qemu_shim.c| 6 +++--- 2 files

Re: [libvirt PATCH 06/32] util: use getgrouplist() directly instead of mgetgroups

2020-01-27 Thread Daniel P . Berrangé
On Mon, Jan 27, 2020 at 12:44:01PM +0100, Pavel Hrdina wrote: > On Thu, Jan 23, 2020 at 11:42:59AM +, Daniel P. Berrangé wrote: > > The mgetgroups function is a GNULIB custom wrapper around > > getgrouplist(). This implements a simplified version of > > that code directly. > > > >

Re: [PATCH 4/6] apparmor: Rename virt-aa-helper profile

2020-01-27 Thread Jamie Strandboge
On Sat, 25 Jan 2020, Michal Privoznik wrote: > The profile name should reflect the path under which the binary > it describes is installed. > > Signed-off-by: Michal Privoznik > --- > src/security/Makefile.inc.am | 10 +- > ...bvirt.virt-aa-helper =>

Re: [PATCH 6/6] apparmor: Allow some more BIOS/UEFI paths

2020-01-27 Thread Jamie Strandboge
On Sat, 25 Jan 2020, Michal Privoznik wrote: > There are two more paths that we are missing in the default > domain profile: /usr/share/edk2-ovmf/ and /usr/share/sgabios/. > These exist on my Gentoo box and contain UEFI and BIOS images > respectively. > > Signed-off-by: Michal Privoznik > --- >

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

2020-01-27 Thread Jamie Strandboge
On Sat, 25 Jan 2020, Michal Privoznik wrote: > The location of virt-aa-helper shown in the docs is incorrect. > The helper binary is installed under libexec dir. > > Signed-off-by: Michal Privoznik > --- > docs/drvqemu.html.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 5/6] apparmor: Sort paths in blocks in libvirt-qemu profile

2020-01-27 Thread Jamie Strandboge
On Sat, 25 Jan 2020, Michal Privoznik wrote: > Even though we construct a domain specific profile for each > domain we start (which should cover domain specific paths), there > is also another file that is included from the profile and which > contains domain agnostic paths (e.g. to cover

Re: [libvirt] [PATCH v4 6/6] qemu: introduce a new "virt-qemu-run" program

2020-01-27 Thread Andrea Bolognani
On Fri, 2020-01-10 at 10:34 +, Daniel P. Berrangé wrote: > +++ b/src/qemu/Makefile.inc.am > @@ -243,3 +243,16 @@ EXTRA_DIST += \ > qemu/THREADS.txt \ > libvirt_qemu_probes.d \ > $(NULL) > + > +QEMU_SHIM_SOURCES = qemu/qemu_shim.c > + > +EXTRA_DIST += $(QEMU_SHIM_SOURCES) > +

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

2020-01-27 Thread Jamie Strandboge
On Sat, 25 Jan 2020, Michal Privoznik wrote: > These helper binaries are installed under libexec dir not lib > dir. > > Signed-off-by: Michal Privoznik > --- > src/security/apparmor/usr.lib.libvirt.virt-aa-helper | 2 +- > src/security/apparmor/usr.sbin.libvirtd | 4 ++-- > 2

Re: [libvirt PATCH 05/32] build: generate configmake.h in root directory

2020-01-27 Thread Daniel P . Berrangé
On Thu, Jan 23, 2020 at 11:42:58AM +, Daniel P. Berrangé wrote: > Currently we rely on gnulib creating configmake.h, but we > can easily create it ourselves instead. > > Signed-off-by: Daniel P. Berrangé > --- > Makefile.am | 44 >

[hooks PATCH] Don't allow @localhost email addresses in commit message

2020-01-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- update | 13 + 1 file changed, 13 insertions(+) diff --git a/update b/update index 247b008..966fe22 100755 --- a/update +++ b/update @@ -264,6 +264,19 @@ if [ $check_diff = yes ]; then fi done fi +

Re: [libvirt PATCH 0/4] fix recent commits

2020-01-27 Thread Andrea Bolognani
On Mon, 2020-01-27 at 17:00 +0100, Ján Tomko wrote: > Ján Tomko (4): > docs: fix virt-qemu-run man page > docs: fix since version in driver documentation > qemu_shim: cosmetic fixes > qemu: snapshot: go through cleanup on error > > docs/drvqemu.html.in| 4 ++-- >

Re: [libvirt] [PATCH] gitdm: Add missing entries

2020-01-27 Thread Daniel P . Berrangé
On Mon, Jan 13, 2020 at 05:02:09PM +0100, Andrea Bolognani wrote: > A few new companies and individuals contributed to libvirt since > the last time the gitdm configuration was updated. > > Signed-off-by: Andrea Bolognani > --- > docs/gitdm/aliases | 1 + >

Re: [libvirt PATCH 0/4] fix recent commits

2020-01-27 Thread Daniel P . Berrangé
On Mon, Jan 27, 2020 at 05:00:09PM +0100, Ján Tomko wrote: > Ján Tomko (4): > docs: fix virt-qemu-run man page > docs: fix since version in driver documentation > qemu_shim: cosmetic fixes > qemu: snapshot: go through cleanup on error > > docs/drvqemu.html.in| 4 ++-- >

Re: [libvirt] [PATCH] gitdm: Add missing entries

2020-01-27 Thread Andrea Bolognani
On Mon, 2020-01-13 at 17:02 +0100, Andrea Bolognani wrote: > A few new companies and individuals contributed to libvirt since > the last time the gitdm configuration was updated. > > Signed-off-by: Andrea Bolognani > --- > docs/gitdm/aliases | 1 + > docs/gitdm/companies/others|

[libvirt PATCH 0/4] fix recent commits

2020-01-27 Thread Ján Tomko
Ján Tomko (4): docs: fix virt-qemu-run man page docs: fix since version in driver documentation qemu_shim: cosmetic fixes qemu: snapshot: go through cleanup on error docs/drvqemu.html.in| 4 ++-- docs/drvsecret.html.in | 2 +- docs/manpages/virt-qemu-run.rst | 4 ++--

[libvirt PATCH 1/4] docs: fix virt-qemu-run man page

2020-01-27 Thread Ján Tomko
Fix a documentation generation error: System Message: WARNING/2 (, line 15); backlink Inline literal start-string without end-string. As well as the 'independant' typo. Signed-off-by: Ján Tomko Fixes: d6006672788ec0f0290d35c76ceb9672476d1ea8 --- Did not investigate whether the generator can be

[libvirt PATCH 4/4] qemu: snapshot: go through cleanup on error

2020-01-27 Thread Ján Tomko
A recent commit added an error check for too-nested backing chains followed by a return, even though errors above jump to cleanup. Signed-off-by: Ján Tomko Fixes: b168fa88b85dec181882816ab65a59a6c4500667 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt PATCH 3/4] qemu_shim: cosmetic fixes

2020-01-27 Thread Ján Tomko
Remove bogus G_GNUC_UNUSED attribute and add a missing space. Signed-off-by: Ján Tomko Fixes: d6006672788ec0f0290d35c76ceb9672476d1ea8 --- src/qemu/qemu_shim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_shim.c b/src/qemu/qemu_shim.c index

[libvirt PATCH 2/4] docs: fix since version in driver documentation

2020-01-27 Thread Ján Tomko
Also one stray angle bracket. Signed-off-by: Ján Tomko Fixes: 068efae5b1a9efeea4a9c3bc0ae80747da5024fb Fixes: 3e9076e777aff2f4b08330ed17e559fcfb6b3529 --- docs/drvqemu.html.in | 4 ++-- docs/drvsecret.html.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 4/4] tests: update LXC config dataset to support V3 indexes

2020-01-27 Thread Julio Faracco
LXC version 3 config files are still using network old style definition. So, as LXC supports it now, they can be converted to use this new definition. Signed-off-by: Julio Faracco --- .../lxcconf2xml-ethernet-v3.config | 16 .../lxcconf2xml-fstab-v3.config

[PATCH 1/4] lxc: refactor lxcNetworkParseData pointers to use new structures

2020-01-27 Thread Julio Faracco
Struct lxcNetworkParseData is being used as a single pointer which iterates through LXC config lines. It means that it will be applied as a network each time that a new type appears. After, the same struct is used to populate a new network interface. This commit changes this logic to multiple

[PATCH 2/4] lxc: add LXC version 3 network parser

2020-01-27 Thread Julio Faracco
LXC version 3 or higher introduced indexes for network interfaces. Libvirt should be able to parse entries like `lxc.net.2.KEY`. This commit adds functions to parse this type of field. That's why array structures are so important this time. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c

[PATCH 3/4] lxc: remove domain definition from lxc network struct

2020-01-27 Thread Julio Faracco
Domain definition is useless now inside network structure. This pointer was required because new network definition was being added each time that a new network type appeared. So, this should be processed into old function `lxcNetworkParseDataType()`. Now, as it was moved to an array, it can be

[PATCH 0/4] lxc: Add suport to network indexes for LXC 3.X

2020-01-27 Thread Julio Faracco
This series implement support for network syntax settings for LXC 3.X. Now, indexes are part of the settings to define network interfaces. Each interface has its own index. The old style uses 'type' tag to differentiate each interface and with this, it could use one single structure. Now, network

[PATCH] qemu: fix linking virt-qemu-run on some distros

2020-01-27 Thread Daniel P . Berrangé
Debian/Ubuntu linkers are more strict that other distros requiring glib to be linked explicitly. macOS needs -export-dynamic instead of -Wl,--export-dynamic Signed-off-by: Daniel P. Berrangé --- Pushed as a CI build fix for Debian/Ubuntu/macOS src/qemu/Makefile.inc.am | 7 +-- 1 file

[PATCH] bhyve: add 'root' parameter to driver initializer

2020-01-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- Pushed as a FreeBSD build fix src/bhyve/bhyve_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 5b8fba7467..713301399e 100644 --- a/src/bhyve/bhyve_driver.c +++

Re: [PATCH 00/21] qemu: Validate machine type and clean up test suite

2020-01-27 Thread Michal Privoznik
On 1/23/20 3:03 PM, Peter Krempa wrote: I was experimenting with a qemu-5.0 feature and figured out that qemu-5.0 will drop support for machine types prior to 'pc-1.0'. What was unexpected though is that I've figured it out as some very strange and seemingly unrelated changes happened in the

Re: [PATCH v2 9/9] docs: secret: Unify and sanitize examples on how to set secret value

2020-01-27 Thread Peter Krempa
On Mon, Jan 27, 2020 at 09:59:01 +0100, Peter Krempa wrote: > On Fri, Jan 24, 2020 at 10:41:00 -0600, Eric Blake wrote: > > On 1/24/20 10:08 AM, Peter Krempa wrote: > > > Discourage passing secrets as commandline arguments. > > > > > > Signed-off-by: Peter Krempa > > > --- > > >

Re: [PATCH 14/21] qemu: capabilities: Replace aliased machine type by copy of the canonical machine

2020-01-27 Thread Michal Privoznik
On 1/23/20 3:03 PM, Peter Krempa wrote: The previous approac of just purging the alias combined with the fact that we filled in fake machine types in the test data meant that if a test case used an alias machine type such as 'pc' or 'q35' it would not properly resolve to the actual data returned

Re: [PATCH 18/21] tests: Add caps for upcoming qemu-5.0

2020-01-27 Thread Michal Privoznik
On 1/23/20 3:03 PM, Peter Krempa wrote: Based on upstream commit 3e08b2b9cb64. This version already dropped the pre-historic machine types and supports only machine types starting from 'pc-1.0'. Signed-off-by: Peter Krempa --- .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 181 +

Re: [libvirt PATCH 26/32] src: conditionalize use of O_DIRECT

2020-01-27 Thread Daniel P . Berrangé
On Thu, Jan 23, 2020 at 11:43:19AM +, Daniel P. Berrangé wrote: > The O_DIRECT flag is not available on platforms, so we > must avoid it once we remove GNULIB. > > Signed-off-by: Daniel P. Berrangé > --- > src/util/virfile.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [libvirt PATCH 11/32] src: implement APIs for passing FDs over UNIX sockets

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:43:04AM +, Daniel P. Berrangé wrote: > This is a simplified variant of gnulib's passfd module > without the portability code that we do not require. > > Signed-off-by: Daniel P. Berrangé > --- > src/libvirt_private.syms | 5 ++ > src/qemu/qemu_interface.c | 4

Re: [libvirt PATCH 10/32] storage: remove use of stat-time.h headers

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:43:03AM +, Daniel P. Berrangé wrote: > The gnulib stat-time.h header provides wrapper functions > to hide the differences in 'struct stat' between various > platforms. > > Linux and FreeBSD support the same names, except for > birthtime which Linux only provides in

Re: [libvirt PATCH 09/32] util: explicitly include windows.h

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:43:02AM +, Daniel P. Berrangé wrote: > The virProcess code relies on windows.h and is getting it > indirectly via some GNULIB header fixes. This dependancy > needs to be made explicit. > > Signed-off-by: Daniel P. Berrangé > --- > src/util/virprocess.c | 5 + >

Re: [libvirt PATCH 08/32] src: remove unused sys/utsname.h includes

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:43:01AM +, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > src/util/virhostcpu.c | 1 - > src/util/virhostmem.c | 1 - > 2 files changed, 2 deletions(-) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [libvirt PATCH 07/32] tools: replace wcwidth() with g_unichar_* APIs

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:43:00AM +, Daniel P. Berrangé wrote: > The combination of g_unichar_iszerowidth and > g_unichar_iswide is sufficient to replicate the logic > of wcwidth() for libvirt. > > Signed-off-by: Daniel P. Berrangé > --- > tests/vshtabletest.c | 8 ++-- >

Re: [libvirt PATCH 06/32] util: use getgrouplist() directly instead of mgetgroups

2020-01-27 Thread Pavel Hrdina
On Thu, Jan 23, 2020 at 11:42:59AM +, Daniel P. Berrangé wrote: > The mgetgroups function is a GNULIB custom wrapper around > getgrouplist(). This implements a simplified version of > that code directly. > > Signed-off-by: Daniel P. Berrangé > --- > src/internal.h | 4 >

Re: [libvirt PATCH v2 2/6] conf: parse/format subelement of

2020-01-27 Thread Daniel P . Berrangé
On Fri, Jan 24, 2020 at 10:39:17AM -0500, Laine Stump wrote: > The subelement of devices is used to configure a > simple teaming association between two interfaces in a domain. Example: > > > > > > > > > > > > > > > > > The

Re: [libvirt PATCH v2 1/6] qemu: add capabilities flag for failover feature

2020-01-27 Thread Daniel P . Berrangé
On Fri, Jan 24, 2020 at 10:39:16AM -0500, Laine Stump wrote: > Presence of the virtio-net-pci option called "failover" indicates > support in a qemu binary of a simplistic bonding of a virtio-net > device with another PCI device. This feature allows migration of > guests that have a network device

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

2020-01-27 Thread Stefan Hajnoczi
On Thu, Jan 23, 2020 at 5:49 PM Ján Tomko wrote: > > v1: https://www.redhat.com/archives/libvir-list/2019-November/msg5.html > > https://bugzilla.redhat.com/show_bug.cgi?id=1694166 > > Ján Tomko (10): > conf: use virXMLFormatElement in virDomainFSDefFormat > qemu: add

Re: [PATCH ocaml 0/3] Small fixes for OCaml 4.10.

2020-01-27 Thread Daniel P . Berrangé
On Sat, Jan 25, 2020 at 10:55:33AM +, Richard W.M. Jones wrote: > On Fri, Jan 24, 2020 at 04:13:14PM +, Daniel P. Berrangé wrote: > > On Fri, Jan 24, 2020 at 03:01:51PM +, Daniel P. Berrangé wrote: > > > On Fri, Jan 24, 2020 at 02:51:39PM +, Richard W.M. Jones wrote: > > > > On

Re: [RFC PATCH 06/16] qemu: checkpoint: tolerate missing disks on checkpoint deletion

2020-01-27 Thread Peter Krempa
On Fri, Jan 24, 2020 at 12:47:41 -0600, Eric Blake wrote: > On 1/9/20 12:21 PM, Peter Krempa wrote: > > If a disk is unplugged and then the user tries to delete a checkpoint > > the code would try to use NULL node name as it was not checked. > > > > Fix this by fetching the whole disk definition

Re: [RFC PATCH 02/16] qemu: checkpoint: split out checkpoint deletion bitmaps

2020-01-27 Thread Peter Krempa
On Fri, Jan 24, 2020 at 11:13:01 -0600, Eric Blake wrote: > On 1/9/20 12:21 PM, Peter Krempa wrote: > > qemuCheckpointDiscard is a massive function that can be separated into > > smaller bits. Extract the part that actually modifies the disk from the > > metadata handling. > > > > Signed-off-by:

Re: [libvirt] [PATCH 0/7] qemu: block iotune group fixes/improvements

2020-01-27 Thread Nikolay Shirokovskiy
ping On 08.01.2020 09:49, Nikolay Shirokovskiy wrote: > Currently iotune group impl has several bugs/oddities this patchset > aims to fix. Also patches (2) and (3) add/change functionality so > that group iotune became easier/saner to use. > > TODO: add docs to API/virsh in respect to using

Re: [PATCH v2 9/9] docs: secret: Unify and sanitize examples on how to set secret value

2020-01-27 Thread Peter Krempa
On Fri, Jan 24, 2020 at 10:41:00 -0600, Eric Blake wrote: > On 1/24/20 10:08 AM, Peter Krempa wrote: > > Discourage passing secrets as commandline arguments. > > > > Signed-off-by: Peter Krempa > > --- > > docs/formatsecret.html.in | 88 +-- > > 1 file