Re: [libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices

2020-06-23 Thread Ján Tomko
On a Tuesday in 2020, Jonathon Jongsma wrote: It's possible to use ramfb as the boot display of an assigned vgpu device. This was introduced in 4b95738c, but unfortunately the attribute was not formatted into the xml output for such a device. This patch fixes that oversight and adds a xml2xml

Re: [libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices

2020-06-23 Thread Daniel Henrique Barboza
On 6/23/20 3:29 PM, Jonathon Jongsma wrote: It's possible to use ramfb as the boot display of an assigned vgpu device. This was introduced in 4b95738c, but unfortunately the attribute was not formatted into the xml output for such a device. This patch fixes that oversight and adds a xml2xml

[libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices

2020-06-23 Thread Jonathon Jongsma
It's possible to use ramfb as the boot display of an assigned vgpu device. This was introduced in 4b95738c, but unfortunately the attribute was not formatted into the xml output for such a device. This patch fixes that oversight and adds a xml2xml test to verify proper behavior.

Re: [PATCH v2 3/3] virhook: changes in docs about support hooks placed in several files

2020-06-23 Thread Michal Privoznik
On 6/23/20 4:45 PM, Dmitry Nesterenko wrote: Signed-off-by: Dmitry Nesterenko --- NEWS.rst | 6 ++ docs/hooks.html.in | 27 +++ 2 files changed, 33 insertions(+) This should have been split into two patches: one changing the NEWS.rst and the rest.

Re: [PATCH v2 2/3] virhook: support hooks placed in several files

2020-06-23 Thread Michal Privoznik
On 6/23/20 4:45 PM, Dmitry Nesterenko wrote: Signed-off-by: Dmitry Nesterenko --- src/util/virhook.c | 106 + 1 file changed, 97 insertions(+), 9 deletions(-) diff --git a/src/util/virhook.c b/src/util/virhook.c index 64ee9a2307..cd26c8c9bd 100644

Re: [PATCH v2 0/3] Support hooks placed in several files

2020-06-23 Thread Michal Privoznik
On 6/23/20 4:45 PM, Dmitry Nesterenko wrote: Libvirt hook calls only one script (/etc/libvirt/hooks/) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. These patches are changing behaviour of

Re: [PATCH v7 00/10] TPM Proxy (H_TPM_COMM) support for PPC64

2020-06-23 Thread Ján Tomko
On a Sunday in 2020, Daniel Henrique Barboza wrote: Ping for reviews Also, this series is related to a bug that wasn't available publicly when I posted the patches: https://bugzilla.redhat.com/show_bug.cgi?id=1838975 Oops, I forgot to link the bug in the commit message before pushing this.

[PATCH] qemu_command: Fix IOMMU validator name in two comments

2020-06-23 Thread Michal Privoznik
When building command line for IOMMU or machine, there are two comments which mention function that validate IOMMU. But they both refer to old name which was changed in v6.3.0-rc1~246. Signed-off-by: Michal Privoznik --- Pushed as trivial. src/qemu/qemu_command.c | 4 ++-- 1 file changed, 2

[PATCH v2 1/3] virhook: refactoring for support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
Signed-off-by: Dmitry Nesterenko --- src/util/virhook.c | 74 +- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/src/util/virhook.c b/src/util/virhook.c index e499841f66..64ee9a2307 100644 --- a/src/util/virhook.c +++

[PATCH v2 2/3] virhook: support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
Signed-off-by: Dmitry Nesterenko --- src/util/virhook.c | 106 + 1 file changed, 97 insertions(+), 9 deletions(-) diff --git a/src/util/virhook.c b/src/util/virhook.c index 64ee9a2307..cd26c8c9bd 100644 --- a/src/util/virhook.c +++

[PATCH v2 0/3] Support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
Libvirt hook calls only one script (/etc/libvirt/hooks/) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. These patches are changing behaviour of hooks to usual linux scheme - running all scripts

[PATCH v2 3/3] virhook: changes in docs about support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
Signed-off-by: Dmitry Nesterenko --- NEWS.rst | 6 ++ docs/hooks.html.in | 27 +++ 2 files changed, 33 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 42d159b233..18917d9e95 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -28,6 +28,12 @@ v6.5.0 (unreleased)

Re: [PATCH 2/2] qemu: format address wdith on intel-iommu command line

2020-06-23 Thread Michal Privoznik
On 6/4/20 9:42 AM, Menno Lageman wrote: Format the address width attribute. Depending on the version of QEMU it is named 'aw-bits' or 'x-aw-bits'. Signed-off-by: Menno Lageman --- src/qemu/qemu_capabilities.c | 6 src/qemu/qemu_capabilities.h | 4 +++

Re: [PATCH 0/2] Add support for IOMMU address width

2020-06-23 Thread Michal Privoznik
On 6/4/20 9:42 AM, Menno Lageman wrote: Since commit 37f51384ae05 ('intel-iommu: Extend address width to 48 bits') QEMU supports setting the address width of the IOMMU. This patch adds a new 'aw_bits' attribute to the iommu in libvirtd to configure this. Menno Lageman (2): conf: add address

Re: [PATCH 1/2] conf: add address width attribute to iommu

2020-06-23 Thread Michal Privoznik
On 6/4/20 9:42 AM, Menno Lageman wrote: Add a new aw_bits attribute to the iommu device to control the address width of the intel-iommu Signed-off-by Menno Lageman --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 5 +++

Re: [PATCH v7 10/10] NEWS.rst: update for the new TPM Proxy device

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- NEWS.rst | 13 + 1 file changed, 13 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH v7 09/10] tests/qemuxml2argvtest.c: add TPM Proxy command line tests

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: Add tests for both supported scenarios: a single TPM Proxy and a TPM Proxy with a regular TPM device in the same domain. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza ---

Re: [PATCH v7 08/10] qemu: build command line for the TPM Proxy device

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: This patch wraps it up all the wiring done in previous patches, enabling a PPC64 guest to launch a guest using a TPM Proxy device. Note that device validation is already being done in qemu_validate.c, qemuValidateDomainDeviceDefTPM(), on

Re: [PATCH v7 06/10] qemu: add validations after TPM Proxy model introduction

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: Previous patch handled the conversion of def->tpm to the array def->tpms and the XML parsing logic. This patch handles the validations needed to ensure the intended behavior. The existing qemuValidateDomainDeviceDefTPM() function was

Re: [PATCH v7 07/10] tests: add XML schema tests for the TPM Proxy device

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: This tests aims to exercise how a TPM Proxy device can be added in the domain, either alone or with a regular TPM device. It also ensures that we do not allow bogus scenarios to slip by. Tested-by: Satheesh Rajendran Reviewed-by: Stefan

Re: [PATCH v7 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: A TPM Proxy device can coexist with a regular TPM, but the current domain definition supports only a single TPM device in the 'tpm' pointer. This patch replaces this existing pointer in the domain definition to an array of TPM devices. All

Re: [PATCH 1/1] qemu_capabilities.c: modernize virQEMUCapsCacheLookupDefault

2020-06-23 Thread Ján Tomko
On a Monday in 2020, Daniel Henrique Barboza wrote: Use g_autoptr() in qemuCaps to get rid of a virObjectUnref call, a 'cleanup' label and the 'ret' pointer. Signed-off-by: Daniel Henrique Barboza --- Found this while reviewing a patch last week. src/qemu/qemu_capabilities.c | 21

Re: [PATCH v7 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: This trivial rework is aimed to reduce the amount of line changes made by the next patch, when 'def->tpm' will become a 'def->tpms' array. Instead of using a 'switch' where only the VIR_DOMAIN_TPM_TYPE_EMULATOR label does something, use an

Re: [PATCH v7 03/10] qemu_extdevice.c: remove unneeded 'ret' variable

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: qemuExtDevicesInitPaths() does not need 'ret'. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_extdevice.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

Re: [PATCH v7 01/10] docs: documentation and schema for the new TPM Proxy model

2020-06-23 Thread Ján Tomko
On a Wednesday in 2020, Daniel Henrique Barboza wrote: QEMU 4.1.0 introduced a new device type called TPM Proxy, currently implemented by PPC64 guests via a new virtual device called 'spapr-tpm-proxy' (see QEMU 0fb6bd073230 for more info). The TPM Proxy device interacts with a TPM Resource

Re: [PATCH] qemu: Correct the log name for qemu_security.c

2020-06-23 Thread Michal Privoznik
On 6/23/20 9:58 AM, Yi Wang wrote: From: Liao Pingfang Correct the log name for qemu_security.c to qemu.qemu_security instead of qemu.qemu_process. Signed-off-by: Liao Pingfang --- src/qemu/qemu_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Michal

Re: [libvirt PATCH v2] qemu: don't continue loading caps if outdated

2020-06-23 Thread Michal Privoznik
On 6/22/20 8:07 PM, Daniel P. Berrangé wrote: The XML format used for QEMU capabilities is not required to be stable across releases, as we invalidate the cache whenever the libvirt binary changes. We none the less always try to parse te entire XML file before we do any validity checks. Thus if

Re: [PATCH 00/12] qemuxml2*test: Improve testing of SCSI hostdevs

2020-06-23 Thread Michal Privoznik
On 6/22/20 5:42 PM, Peter Krempa wrote: Switch to qemu caps based testing to validate pre and post blockdev configs. This is split out from my unfinished series for switching hostdevs to blockdev. Peter Krempa (12): qemuxml2argvtest: hostdev-scsi-lsi: Modernize to qemu-4.1

Re: [PATCH 2/2] virhook: support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
> But that leads me to think that maybe after all we should run all hook scripts and report failure if either of them failed. > we would not have paired "prepare" and "release" calls for both scripts. I agree with you. I will do this scheme - always run all scripts. Dmitry

Re: [PATCH v5 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-06-23 Thread Kevin Wolf
Am 22.06.2020 um 23:58 hat Eric Blake geschrieben: > On 5/5/20 10:30 AM, Eric Blake wrote: > > On 5/5/20 2:35 AM, Kevin Wolf wrote: > > > Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > > > > qcow has no space in the metadata to store a backing format, and there > > > > are existing qcow

Re: [PATCH 2/2] virhook: support hooks placed in several files

2020-06-23 Thread Michal Privoznik
On 6/23/20 10:24 AM, Dmitry Nesterenko wrote: virFileIsExecutable() is enough I agree and will fix it in next version of patch. I'm not sure we want this check for output If we are given param for xml output - it is call hook for "migrate" or "restore" and any fail from script can

Re: [PATCH v4] numa: forbid '-numa node,mem' for 5.1 and newer machine types

2020-06-23 Thread Paolo Bonzini
On 08/06/20 14:03, Igor Mammedov wrote: > Deprecation period is run out and it's a time to flip the switch > introduced by cd5ff8333a. Disable legacy option for new machine > types (since 5.1) and amend documentation. > > '-numa node,memdev' shall be used instead of disabled option > with new

Re: [libvirt PATCH] ci: Drop mips container for Debian sid

2020-06-23 Thread Daniel P . Berrangé
On Tue, Jun 23, 2020 at 11:26:19AM +0200, Andrea Bolognani wrote: > The build job for this container has been failing every single > time, and as it turns out the explanation for that is very simple: > Debian is just not going to support the mips architecture going > forward. > > Reported-by:

Re: [PATCH v3] numa: forbid '-numa node,mem' for 5.1 and newer machine types

2020-06-23 Thread Paolo Bonzini
On 05/06/20 18:03, Igor Mammedov wrote: > Deprecation period is run out and it's a time to flip the switch > introduced by cd5ff8333a. Disable legacy option for new machine > types (since 5.1) and amend documentation. > > '-numa node,memdev' shall be used instead of disabled option > with new

Re: [PATCH v2] numa: forbid '-numa node,mem' for 5.1 and newer machine types

2020-06-23 Thread Paolo Bonzini
On 05/06/20 14:13, Igor Mammedov wrote: > Deprecation period is run out and it's a time to flip the switch > introduced by cd5ff8333a. Disable legacy option for new machine > types (since 5.1) and amend documentation. > > '-numa node,memdev' shall be used instead of disabled option > with new

[libvirt PATCH] ci: Drop mips container for Debian sid

2020-06-23 Thread Andrea Bolognani
The build job for this container has been failing every single time, and as it turns out the explanation for that is very simple: Debian is just not going to support the mips architecture going forward. Reported-by: Pino Toscano Signed-off-by: Andrea Bolognani --- .gitlab-ci.yml

Re: [PATCH 0/5] qemu: backup: Memory handling fixes

2020-06-23 Thread Ján Tomko
On a Tuesday in 2020, Peter Krempa wrote: See individual patches. Peter Krempa (5): qemuBackupBegin: Don't leak 'def' on early failures qemu: backup: Initialize 'store' source properly and just once qemuBackupDiskStarted: Fix improper dereference of array qemuBackupDiskDataCleanupOne: Don't

Re: [libvirt PATCH] qemu: format 'ramfb' attribute for mediated devices

2020-06-23 Thread Erik Skultety
On Mon, Jun 22, 2020 at 04:43:21PM -0500, Jonathon Jongsma wrote: > It's possible to use ramfb as the boot display of an assigned vgpu > device. This was introduced in 4b95738c, but unfortunately the attribute > was not formatted into the xml output for such a device. This patch > fixes that

Re: [PATCH 2/2] virhook: support hooks placed in several files

2020-06-23 Thread Dmitry Nesterenko
> virFileIsExecutable() is enough I agree and will fix it in next version of patch. > I'm not sure we want this check for output If we are given param for xml output - it is call hook for "migrate" or "restore" and any fail from script can break the process. So we can break running of all

Re: [libvirt PATCH 11/23] src: remove use of the term 'whitelist' from remaining code

2020-06-23 Thread Ján Tomko
On a Monday in 2020, Daniel P. Berrangé wrote: On Fri, Jun 19, 2020 at 01:43:46PM +0200, Ján Tomko wrote: On a Friday in 2020, Daniel P. Berrangé wrote: > The terms can be avoided with simple tweaks. > > Signed-off-by: Daniel P. Berrangé > --- > src/libvirt.c | 2 +- >

[PATCH] qemu: Correct the log name for qemu_security.c

2020-06-23 Thread Yi Wang
From: Liao Pingfang Correct the log name for qemu_security.c to qemu.qemu_security instead of qemu.qemu_process. Signed-off-by: Liao Pingfang --- src/qemu/qemu_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_security.c b/src/qemu/qemu_security.c

[PATCH 2/5] qemu: backup: Initialize 'store' source properly and just once

2020-06-23 Thread Peter Krempa
Two functions called in sequence both initialized the virStorageSource backing 'store' leading to a memleak. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index

[PATCH 5/5] qemuBackupDiskDataCleanupOne: Free 'incrementalBitmap'

2020-06-23 Thread Peter Krempa
The bitmap name used for the incremental backup would be leaked otherwise. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 3bd59402dc..8dc9d2504d 100644 --- a/src/qemu/qemu_backup.c

[PATCH 0/5] qemu: backup: Memory handling fixes

2020-06-23 Thread Peter Krempa
See individual patches. Peter Krempa (5): qemuBackupBegin: Don't leak 'def' on early failures qemu: backup: Initialize 'store' source properly and just once qemuBackupDiskStarted: Fix improper dereference of array qemuBackupDiskDataCleanupOne: Don't exit early when the job has started

[PATCH 3/5] qemuBackupDiskStarted: Fix improper dereference of array

2020-06-23 Thread Peter Krempa
The code would repeatedly mark the first disk's blockjob as started rather than accessing all the blockjobs. Fix the dereferencing operator. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c

[PATCH 1/5] qemuBackupBegin: Don't leak 'def' on early failures

2020-06-23 Thread Peter Krempa
The cleanup path expects that 'def' is assigned to 'priv->backup', but that's not the case for early failures. Add a check to stop overwriting of 'def' so that it can be freed. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 4/5] qemuBackupDiskDataCleanupOne: Don't exit early when the job has started

2020-06-23 Thread Peter Krempa
Originally the function was cleaning up a failed job only but now there's other stuff that needs to be cleared too. Make only steps which clean up after a failed job depend on the 'started' field and execute the rest of the code always. This fixes a leak of the backup job tracking object and the