Re: [PATCH 5/5] tests: Tests for virtio-vga-gl and virtio-gpu-gl-pci device

2021-06-08 Thread Han Han
On Tue, Jun 8, 2021 at 10:14 PM Michal Prívozník wrote: > On 6/8/21 3:15 AM, Han Han wrote: > > Signed-off-by: Han Han > > --- > > .../video-virtio-vga-gpu-gl.args | 29 + > > .../video-virtio-vga-gpu-gl.xml | 34 +++ > >

Re: [PATCH 2/5] qemu: Adapt to virtio-gpu-gl-pci device when available

2021-06-08 Thread Han Han
On Tue, Jun 8, 2021 at 10:14 PM Michal Prívozník wrote: > On 6/8/21 3:15 AM, Han Han wrote: > > QEMU 6.1 will add virtio-gpu-gl-pci device to replace the virgl property > > of virtio-gpu-pci device. Adapt to that change. > > > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1967356 > > >

Re: [PATCH] apparmor: Add denied capabilities

2021-06-08 Thread Jim Fehlig
On 6/7/21 5:43 PM, Neal Gompa wrote: On Mon, Jun 7, 2021 at 6:34 PM Jim Fehlig wrote: The audit log contains the following denials from libvirtd apparmor="DENIED" operation="capable" profile="libvirtd" pid=6012 comm="daemon-init" capability=17 capname="sys_rawio" apparmor="DENIED"

Re: [PATCH 0/5] virth-host-validate: Couple of cleanups

2021-06-08 Thread Fabiano Fidêncio
On Tue, Jun 8, 2021 at 9:17 PM Fabiano Fidêncio wrote: > > On Tue, Jun 8, 2021 at 10:45 AM Michal Privoznik wrote: > > > > I've noticed couple of bugs/problems while reviewing Fabiano's patch. > > Here are fixes. > > > > Michal Prívozník (5): > > virt-host-validate: Initialize the error object

[PATCH] virt-host-validate: Fix IOMMU output on aarch64

2021-06-08 Thread Fabiano Fidêncio
virt-host-validate should print "Checking for device assignment IOMMU support" for all architectures, not only for Intel / AMD. This is the output without the patch: ``` [fidencio@dentola libvirt]$ virt-host-validate QEMU: comprobando if device /dev/kvm exists

Re: [PATCH] apparmor: Add denied capabilities

2021-06-08 Thread Neal Gompa
On Tue, Jun 8, 2021 at 1:35 PM Jim Fehlig wrote: > > On 6/7/21 5:43 PM, Neal Gompa wrote: > > On Mon, Jun 7, 2021 at 6:34 PM Jim Fehlig wrote: > >> > >> The audit log contains the following denials from libvirtd > >> > >> apparmor="DENIED" operation="capable" profile="libvirtd" pid=6012 > >>

Re: [PATCH 0/5] virth-host-validate: Couple of cleanups

2021-06-08 Thread Fabiano Fidêncio
On Tue, Jun 8, 2021 at 10:45 AM Michal Privoznik wrote: > > I've noticed couple of bugs/problems while reviewing Fabiano's patch. > Here are fixes. > > Michal Prívozník (5): > virt-host-validate: Initialize the error object > virt-host-validate: Report an error if failed to detect CGroups >

Re: [PATCH 4/5] virt-host-validate: Call VIR_HOST_VALIDATE_FAILURE() more frequently

2021-06-08 Thread Fabiano Fidêncio
[...] > > if (virFileExists("/dev/sev")) { > @@ -513,6 +515,7 @@ int virHostValidateSecureGuests(const char *hvname, > virHostMsgFail(level, > "AMD Secure Encrypted Virtualization appears to > be " > "disabled in

Re: [PATCH v2 3/3] qapi: deprecate drive-backup

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
08.06.2021 14:12, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: [...] TODO: We also need to deprecate drive-backup transaction action.. But union members in QAPI doesn't support 'deprecated' feature. I tried to dig a bit, but failed :/ Markus, could you please help with it?

Re: [PATCH] storage: Don't overwrite error in virISCSIDirectDisconnect()

2021-06-08 Thread Jano Tomko
On 6/2/21 10:46 AM, Michal Privoznik wrote: > The iscsi-direct storage pool backend works merely like this: a > connection is established to the target (usually done via > virStorageBackendISCSIDirectSetConnection()), intended action is > executed (e.g. reporting LUNs, volume wiping), and at the

Re: [PATCH 0/2] Another round of CH driver fixes

2021-06-08 Thread Jano Tomko
On 6/7/21 3:47 PM, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (2): > ch_driver: Avoid driver double free > virCHDriverConfig: Drop @uri member > > src/ch/ch_conf.c | 1 - > src/ch/ch_conf.h | 1 - > src/ch/ch_driver.c | 2 +- > 3 files changed, 1 insertion(+), 3

Re: [PATCH 0/5] virth-host-validate: Couple of cleanups

2021-06-08 Thread Jano Tomko
On 6/8/21 10:45 AM, Michal Privoznik wrote: > I've noticed couple of bugs/problems while reviewing Fabiano's patch. > Here are fixes. > > Michal Prívozník (5): > virt-host-validate: Initialize the error object > virt-host-validate: Report an error if failed to detect CGroups >

Re: [PATCH 2/5] qemu: Adapt to virtio-gpu-gl-pci device when available

2021-06-08 Thread Peter Krempa
On Tue, Jun 08, 2021 at 16:14:36 +0200, Michal Prívozník wrote: > On 6/8/21 3:15 AM, Han Han wrote: > > QEMU 6.1 will add virtio-gpu-gl-pci device to replace the virgl property > > of virtio-gpu-pci device. Adapt to that change. > > > > Resolves:

Re: [PATCH 2/5] qemu: Adapt to virtio-gpu-gl-pci device when available

2021-06-08 Thread Michal Prívozník
On 6/8/21 3:15 AM, Han Han wrote: > QEMU 6.1 will add virtio-gpu-gl-pci device to replace the virgl property > of virtio-gpu-pci device. Adapt to that change. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1967356 > > Signed-off-by: Han Han > --- > src/qemu/qemu_command.c | 7

Re: [PATCH 5/5] tests: Tests for virtio-vga-gl and virtio-gpu-gl-pci device

2021-06-08 Thread Michal Prívozník
On 6/8/21 3:15 AM, Han Han wrote: > Signed-off-by: Han Han > --- > .../video-virtio-vga-gpu-gl.args | 29 + > .../video-virtio-vga-gpu-gl.xml | 34 +++ > tests/qemuxml2argvtest.c | 6 +++ > .../video-virtio-vga-gpu-gl.xml

Re: [libvirt PATCH v2 0/7] Enable sanitizers

2021-06-08 Thread Tim Wiederhake
Ping On Tue, 2021-05-18 at 10:41 +0200, Tim Wiederhake wrote: > Ping. > > On Thu, 2021-05-06 at 17:08 +0200, Tim Wiederhake wrote: > > This series enables and adds AddressSanitizer and > > UndefinedBehaviorSanitizer > > builds to the CI. > > > > See: > >

Re: [PATCH] meson.build: Compile with -Walloca

2021-06-08 Thread Jano Tomko
On 5/27/21 1:30 PM, Ján Tomko wrote: > On a Thursday in 2021, Thomas Huth wrote: >> We are already compiling libvirt with -Wvla - so it does not make >> too much sense to still allow people to use alloca() instead. Thus >> put it on the list of things we want to warn about. Fortunately, >> there

Re: [PATCH] meson.build: Remove the -Wvla-larger-then flag

2021-06-08 Thread Jano Tomko
On 5/27/21 12:37 PM, Thomas Huth wrote: > The flag has a typo in it, it's "...-than=..." and not "...-then=...", > so this was in fact never used. Since we're also using -Wvla (without > size), we should already get warnings about any variable length arrays > anyway, so the additional

Re: [PATCH v2 3/3] qapi: deprecate drive-backup

2021-06-08 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: [...] > TODO: We also need to deprecate drive-backup transaction action.. > But union members in QAPI doesn't support 'deprecated' feature. I tried > to dig a bit, but failed :/ Markus, could you please help with it? At > least by advice? There are two

Re: [PATCH 0/3] libxl: A few firmware improvments

2021-06-08 Thread Michal Prívozník
On 6/4/21 7:27 PM, Jim Fehlig wrote: > Upstream ovmf will be removing support for Xen in the traditional ovmf > package, moving it to a separate OvmfXen package > > https://bugzilla.tianocore.org/show_bug.cgi?id=2122 > > This motivated me to verify the impact on libvirt+ovmf+xen. Fortunately it

Re: [PATCH] apparmor: Add denied capabilities

2021-06-08 Thread Michal Prívozník
On 6/8/21 12:34 AM, Jim Fehlig wrote: > The audit log contains the following denials from libvirtd > > apparmor="DENIED" operation="capable" profile="libvirtd" pid=6012 > comm="daemon-init" capability=17 capname="sys_rawio" > apparmor="DENIED" operation="capable" profile="libvirtd" pid=6012 >

Re: [libvirt PATCH] meson: Ask rst2html to strip comments

2021-06-08 Thread Daniel P . Berrangé
On Mon, Jun 07, 2021 at 08:35:39PM +0200, Michal Prívozník wrote: > On 6/7/21 5:03 PM, Daniel P. Berrangé wrote: > > On Mon, Jun 07, 2021 at 04:52:41PM +0200, Pavel Hrdina wrote: > >> On Mon, Jun 07, 2021 at 04:39:15PM +0200, Michal Prívozník wrote: > >>> On 6/4/21 2:31 PM, Andrea Bolognani wrote:

[PATCH 5/5] virHostValidateSecureGuests: Drop useless 'return 0' at the end

2021-06-08 Thread Michal Privoznik
Previous patches rendered 'return 0' at the end of the function a dead code. Therefore, the code can be rearranged a bit and the line can be dropped. Signed-off-by: Michal Privoznik --- tools/virt-host-validate-common.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

[PATCH 4/5] virt-host-validate: Call VIR_HOST_VALIDATE_FAILURE() more frequently

2021-06-08 Thread Michal Privoznik
Ideally, every virHostMsgFail() would be coupled with VIR_HOST_VALIDATE_FAILURE() so that the failure is correctly propagated to the caller. However, in virHostValidateSecureGuests() we are either ignoring @level and returning 0 directly (no error), or not returning at all, relying on 'return 0'

[PATCH 3/5] virt-host-validate: Turn failure to read /proc/cmdline into an error

2021-06-08 Thread Michal Privoznik
When validating secure guests support on s390(x) we may read /proc/cmdline and look for "prot_virt" argument. Reading the kernel command line is done via virFileReadValueString() which may fail. In such case caller won't see any error message. But we can produce the same warning/error as if

[PATCH 2/5] virt-host-validate: Report an error if failed to detect CGroups

2021-06-08 Thread Michal Privoznik
As a part of its checks, virt-host-validate calls virCgroupNew() to detect CGroup controllers which are then printed out. However, virCgroupNew() can fail (with appropriate error message set). Let's print an error onto stderr if that happens. Signed-off-by: Michal Privoznik ---

[PATCH 1/5] virt-host-validate: Initialize the error object

2021-06-08 Thread Michal Privoznik
Several libvirt functions are called from virt-host-validate. Some of these functions do report an error on failure. But reporting an error is coupled with freeing previous error (by calling virResetError()). But we've never called virErrorInitialize() and thus resetting error object frees some

[PATCH 0/5] virth-host-validate: Couple of cleanups

2021-06-08 Thread Michal Privoznik
I've noticed couple of bugs/problems while reviewing Fabiano's patch. Here are fixes. Michal Prívozník (5): virt-host-validate: Initialize the error object virt-host-validate: Report an error if failed to detect CGroups virt-host-validate: Turn failure to read /proc/cmdline into an error

Re: [libvirt PATCH] openvswitch: don't delete existing OVS port prior to recreating same port

2021-06-08 Thread Daniel P . Berrangé
On Mon, Jun 07, 2021 at 05:07:17PM -0400, Laine Stump wrote: > Connecting a tap device to an Open vSwitch is done by adding a "port" > to the switch with the ovs-vsctl "add-port" command. The port will > have the same name as the tap device, but it is a separate entity, and > can survive beyond

Re: [PATCH v2] tools: only fail validations if VIR_HOST_VALIDATE_FAIL is set

2021-06-08 Thread Fabiano Fidêncio
On Tue, Jun 8, 2021 at 8:51 AM Michal Prívozník wrote: > > On 6/7/21 6:22 PM, Fabiano Fidêncio wrote: > > Currently `virt-host-validate` will fail whenever one of its calls fail, > > regardless of virHostValidateLevel set. > > > > This behaviour is not optimal and makes it not exactly reliable as

Re: [PATCH v2] tools: only fail validations if VIR_HOST_VALIDATE_FAIL is set

2021-06-08 Thread Michal Prívozník
On 6/7/21 6:22 PM, Fabiano Fidêncio wrote: > Currently `virt-host-validate` will fail whenever one of its calls fail, > regardless of virHostValidateLevel set. > > This behaviour is not optimal and makes it not exactly reliable as a > command line tool as other tools or scripts using it would