Re: [libvirt PATCH v2] tests: Undo recent breakages

2023-03-06 Thread Andrea Bolognani
On Mon, Mar 06, 2023 at 04:29:19PM +, Daniel P. Berrangé wrote: > On Mon, Mar 06, 2023 at 05:23:46PM +0100, Andrea Bolognani wrote: > > Turns out that those overrides I recently removed where actually > > there for a reason, and there was a motivation behind creating > &

Re: passt SELinux labelling (was: Re: [PATCH v2 1/3] qemu_passt: Don't make passt transition to svirt_t/libvirt_domain on start)

2023-03-06 Thread Andrea Bolognani
On Mon, Mar 06, 2023 at 09:03:42AM +, Daniel P. Berrangé wrote: > On Fri, Mar 03, 2023 at 07:46:27PM -0500, Laine Stump wrote: > > On 3/3/23 1:36 PM, Daniel P. Berrangé wrote: > > > On Fri, Mar 03, 2023 at 10:18:39AM -0800, Andrea Bolognani wrote: > > > > I still

[libvirt PATCH v2] tests: Undo recent breakages

2023-03-06 Thread Andrea Bolognani
approach. Fixes: 2f56f69f7f7e ("tests: Create privileged config for QEMU driver") Fixes: 0f49b6cc6b81 ("tests: Drop no longer necessary overrides") Fixes: 0b464cd84ff3 ("tests: Drop more QEMU driver config overrides") Signed-off-by: Andrea Bolognani --- Pushed under the

[libvirt PATCH] tests: Undo recent breakages

2023-03-06 Thread Andrea Bolognani
ssary overrides") Fixes: 0b464cd84ff3 ("tests: Drop more QEMU driver config overrides") Signed-off-by: Andrea Bolognani --- I will push this under the build breaker rule as soon as the corresponding pipeline[1] has successfully completed. [1] https://gitlab.com/abologna/libvirt/-/pipelin

Re: [libvirt PATCH 00/14] tests: Improve QEMU driver config handling

2023-03-06 Thread Andrea Bolognani
On Mon, Mar 06, 2023 at 01:49:50PM +0100, Martin Kletzander wrote: > On Mon, Mar 06, 2023 at 04:41:28AM -0800, Andrea Bolognani wrote: > > A test called "controller-order" is definitely unrelated to SPICE > > TLS. For "q35-virt-manager-basic", I guess you could

[PATCH 05+1/14] tests: Limit use of TLSx509secretUUIDs

2023-03-06 Thread Andrea Bolognani
These are intended to be used for just a few specific tests, but since we don't always free them up afterwards they could end up accidentally affecting subsequent tests as well. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [libvirt PATCH 00/14] tests: Improve QEMU driver config handling

2023-03-06 Thread Andrea Bolognani
On Mon, Mar 06, 2023 at 12:02:03PM +0100, Martin Kletzander wrote: > On Mon, Mar 06, 2023 at 11:10:33AM +0100, Andrea Bolognani wrote: > > Move more settings to common code and more closely match > > real-world configurations. > > > > Andrea Bolognani (14): > >

[libvirt PATCH 08/14] tests: Drop no longer necessary overrides

2023-03-06 Thread Andrea Bolognani
Creating a privileged config ensures these are already set correctly. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 6 -- tests/qemuxml2xmltest.c | 3 --- 2 files changed, 9 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 22c0642d25

[libvirt PATCH 13/14] tests: Set SASLdirs to default values

2023-03-06 Thread Andrea Bolognani
We use standard paths for almost everything else. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata/graphics-spice-sasl.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/graphics-vnc-sasl.x86_64-latest.args | 2 +- .../graphics-vnc-tls-secret.x86_64-5.2.0.args | 2

[libvirt PATCH 12/14] tests: Set TLSx509certdirs to default values

2023-03-06 Thread Andrea Bolognani
For almost all directories, the value we set matches the one a standard deployment would use, but in a couple of cases they deviate from that. Keep things consistent. Signed-off-by: Andrea Bolognani --- .../disk-network-tlsx509-nbd-hostname.x86_64-latest.args | 2 +- .../disk-network

[libvirt PATCH 10/14] tests: Move more QEMU driver settings to common code

2023-03-06 Thread Andrea Bolognani
None of these settings is specific to the xml2argv test. Moving them to the common code ensures the behavior of the QEMU driver is consistent across all QEMU tests. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 26 -- tests/testutilsqemu.c| 28

[libvirt PATCH 11/14] tests: Set more TLSx509certdirs

2023-03-06 Thread Andrea Bolognani
We were missing a couple. Signed-off-by: Andrea Bolognani --- tests/testutilsqemu.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 9b6be28fa1..1ce76ac855 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -693,6 +693,10

[libvirt PATCH 09/14] tests: Add convenience variable for QEMU driver config

2023-03-06 Thread Andrea Bolognani
This makes the code less clunky. Signed-off-by: Andrea Bolognani --- tests/testutilsqemu.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 55d680ac84..7c14bdfcd7 100644 --- a/tests/testutilsqemu.c

[libvirt PATCH 05/14] tests: Limit use of SPICE TLS

2023-03-06 Thread Andrea Bolognani
. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata/controller-order.args| 2 +- .../q35-virt-manager-basic.x86_64-4.2.0.args| 2 +- .../q35-virt-manager-basic.x86_64-latest.args | 2 +- tests/qemuxml2argvtest.c| 13 - 4 files

[libvirt PATCH 06/14] tests: Set the QEMU driver as privileged in common code

2023-03-06 Thread Andrea Bolognani
Most test programs were already doing this, and moving it to the common code ensures we see consistent behavior across all QEMU tests. Signed-off-by: Andrea Bolognani --- tests/qemumemlocktest.c| 2 -- tests/qemumigrationcookiexmltest.c | 2 -- tests/qemustatusxml2xmltest.c | 2

[libvirt PATCH 03/14] tests: Drop unnecessary free

2023-03-06 Thread Andrea Bolognani
The various TLSx509certdirs can be set throughout the lifetime of the test program without issue. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f46fc29f32

[libvirt PATCH 04/14] tests: Increase scope for SASLdirs

2023-03-06 Thread Andrea Bolognani
Just like TLSx509certdirs, these can be set throughout the lifetime of the test program. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt PATCH 07/14] tests: Create privileged config for QEMU driver

2023-03-06 Thread Andrea Bolognani
. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata/graphics-dbus.args| 2 +- tests/qemuxml2argvdata/net-user-passt.x86_64-7.2.0.args | 2 +- tests/qemuxml2argvdata/net-user-passt.x86_64-latest.args | 2 +- tests/testutilsqemu.c| 2 +- 4 files

[libvirt PATCH 01/14] tests: Poison more XDG variables

2023-03-06 Thread Andrea Bolognani
We use these in QEMU command lines, so we should poison them to catch test suite issues. Signed-off-by: Andrea Bolognani --- tests/testutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testutils.c b/tests/testutils.c index e8cb8e6737..d77b9e8db2 100644 --- a/tests/testutils.c

[libvirt PATCH 02/14] tests: Drop unnecessary configuration overrides

2023-03-06 Thread Andrea Bolognani
They are not used by the specific test. Signed-off-by: Andrea Bolognani --- tests/qemuhotplugtest.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 2e8ac05e5e..6e3d4dd807 100644 --- a/tests/qemuhotplugtest.c +++ b/tests

[libvirt PATCH 00/14] tests: Improve QEMU driver config handling

2023-03-06 Thread Andrea Bolognani
Move more settings to common code and more closely match real-world configurations. Andrea Bolognani (14): tests: Poison more XDG variables tests: Drop unnecessary configuration overrides tests: Drop unnecessary free tests: Increase scope for SASLdirs tests: Limit use of SPICE TLS

Re: passt SELinux labelling (was: Re: [PATCH v2 1/3] qemu_passt: Don't make passt transition to svirt_t/libvirt_domain on start)

2023-03-03 Thread Andrea Bolognani
On Fri, Mar 03, 2023 at 06:06:05PM +, Daniel P. Berrangé wrote: > On Fri, Mar 03, 2023 at 09:56:55AM -0800, Andrea Bolognani wrote: > > Right, but wouldn't the idea of poking at the filesystem to retrieve > > the label from the binary (passt_exec_t) and then applying a text >

Re: passt SELinux labelling (was: Re: [PATCH v2 1/3] qemu_passt: Don't make passt transition to svirt_t/libvirt_domain on start)

2023-03-03 Thread Andrea Bolognani
On Fri, Mar 03, 2023 at 05:15:43PM +, Daniel P. Berrangé wrote: > On Fri, Mar 03, 2023 at 09:06:38AM -0800, Andrea Bolognani wrote: > > > > Since we know that we're launching passt and not some other random > > > > helper, why can't we simply use passt_t d

Re: passt SELinux labelling (was: Re: [PATCH v2 1/3] qemu_passt: Don't make passt transition to svirt_t/libvirt_domain on start)

2023-03-03 Thread Andrea Bolognani
On Fri, Mar 03, 2023 at 03:47:23PM +, Daniel P. Berrangé wrote: > On Fri, Mar 03, 2023 at 07:23:41AM -0800, Andrea Bolognani wrote: > > I'm in no way a SELinux expert, but the idea of figuring out the > > runtime label for the process based on information found on the > >

Re: passt SELinux labelling (was: Re: [PATCH v2 1/3] qemu_passt: Don't make passt transition to svirt_t/libvirt_domain on start)

2023-03-03 Thread Andrea Bolognani
process based on information found on the filesystem makes me uncomfortable. The idea of using some sort of text transformation to get from one to the other, even more so. Since we know that we're launching passt and not some other random helper, why can't we simply use passt_t directly here? It feels like that would be less prone to issues caused by accidental (or intentional) misconfigurations. -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 10/33] qemu: Introduce qemuDomainDefBootPostParse()

2023-03-03 Thread Andrea Bolognani
On Thu, Mar 02, 2023 at 04:59:36PM +0100, Michal Prívozník wrote: > On 2/15/23 11:42, Andrea Bolognani wrote: > > +static int > > +qemuDomainDefBootPostParse(virDomainDef *def, > > + virQEMUDriverConfig *cfg) > > +{ > > +

Re: [PATCH] security: Add support for SUSE edk2 firmware paths

2023-03-02 Thread Andrea Bolognani
er paths listed here point to directories that are specific to the firmware at hand. I don't think this really opens up any attack vectors, so Reviewed-by: Andrea Bolognani but perhaps it would be a good idea to consider migrating edk2 images to their own directory long term? -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH] qemu: Remove duplicate user/group lookup

2023-03-01 Thread Andrea Bolognani
Commit 068efae5b1a9 created a copy of this code instead of simply moving it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_conf.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index a831783d75..680832742c 100644 --- a/src/qemu

[PATCH] qemu: Align arguments correctly

2023-03-01 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 16d52cbbd4..a831783d75 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -98,7 +98,7

[libvirt PATCH 2/4] tests: Adopt fakerootdir helpers

2023-03-01 Thread Andrea Bolognani
-by: Andrea Bolognani --- tests/qemuhotplugtest.c | 14 +++--- tests/qemumemlocktest.c | 15 +++ tests/qemustatusxml2xmltest.c | 15 +++ tests/qemuxml2argvtest.c | 15 +++ tests/qemuxml2xmltest.c | 16 +++- tests/scsihosttest.c

[libvirt PATCH 4/4] tests: Print fakerootdir when it's preserved

2023-03-01 Thread Andrea Bolognani
Setting the LIBVIRT_SKIP_CLEANUP environment variable results in the contents of fakerootdir being preserved for inspection. Be more helpful towards the developer and print out the path in this case. Signed-off-by: Andrea Bolognani --- tests/testutils.c | 2 ++ 1 file changed, 2 insertions

[libvirt PATCH 0/4] tests: Improve fakerootdir handling

2023-03-01 Thread Andrea Bolognani
I'd be open to squash patches 2 and 3 together, if that's considered preferable by the reviewer. Andrea Bolognani (4): tests: Introduce helpers for fakerootdir handling tests: Adopt fakerootdir helpers tests: Move fakerootdir handling to common logic tests: Print fakerootdir when it's

[libvirt PATCH 3/4] tests: Move fakerootdir handling to common logic

2023-03-01 Thread Andrea Bolognani
to build another path, so we need to do things slightly differently. In order to keep things working, we retrieve the value from the LIBVIRT_FAKE_ROOT_DIR environment variable, same as all the mock libraries are already doing. Signed-off-by: Andrea Bolognani --- tests/qemuhotplugtest.c | 7

[libvirt PATCH 1/4] tests: Introduce helpers for fakerootdir handling

2023-03-01 Thread Andrea Bolognani
We have this logic open-coded all over the test suite. Provide proper helpers implementing it. Signed-off-by: Andrea Bolognani --- tests/testutils.c | 26 ++ tests/testutils.h | 3 +++ 2 files changed, 29 insertions(+) diff --git a/tests/testutils.c b/tests/testutils.c

Re: [libvirt PATCH] NEWS: Clarify limitations of passt support

2023-03-01 Thread Andrea Bolognani
On Tue, Feb 28, 2023 at 11:28:30PM -0500, Laine Stump wrote: > On 2/28/23 4:34 PM, Andrea Bolognani wrote: > > Let users know that we're working on lifting the limitations > > and that they should not use the feature in production until > > then. > > > >

[libvirt PATCH] NEWS: Clarify limitations of passt support

2023-02-28 Thread Andrea Bolognani
Let users know that we're working on lifting the limitations and that they should not use the feature in production until then. Signed-off-by: Andrea Bolognani --- NEWS.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index 683c147af0..b19c75ceac

Re: [PATCH] NEWS: note new passt feature & bugfix for 9.1.0 release

2023-02-28 Thread Andrea Bolognani
On Tue, Feb 28, 2023 at 07:53:09PM +0100, Stefano Brivio wrote: > On Tue, 28 Feb 2023 10:06:18 -0800 Andrea Bolognani > wrote: > > On Tue, Feb 28, 2023 at 09:49:26AM -0500, Laine Stump wrote: > > > +(NB: it is still necessary to disable SELinux to start passt.) >

Re: [PATCH] NEWS: Mention two user-visible bug fixes

2023-02-28 Thread Andrea Bolognani
ould cause problems such as errors when detaching a > disk > +after snapshot. Maybe s/transitions which/transitions, which/ ? Either way, make sure that we still have *two* empty lines between sections after your changes have been applied. Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] NEWS: note new passt feature & bugfix for 9.1.0 release

2023-02-28 Thread Andrea Bolognani
th. Also, please make sure that there still are *two* empty lines between the section for v9.1.0 and the one for v9.0.0. The current version of the patch drops one of them. With the tweaks mentioned above, plus the stuff already pointed out by Peter, Reviewed-by: Andrea Bolognani --

Re: [PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI

2023-02-27 Thread Andrea Bolognani
On Mon, Feb 27, 2023 at 06:25:23PM +0100, Peter Krempa wrote: > On Mon, Feb 27, 2023 at 08:44:57 -0800, Andrea Bolognani wrote: > > This looks like you're checking whether -acpi itself exists as a > > top-level option. Which it doesn't, but -no-acpi does and yet it &

Re: [PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI

2023-02-27 Thread Andrea Bolognani
se let me know what it is :) [1] https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02217.html -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] NEWS: Document new pvpanic-pci device

2023-02-21 Thread Andrea Bolognani
On Tue, Feb 21, 2023 at 05:37:52PM +0100, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Andrea Bolognani and pushed along with the patches implementing the feature. -- Andrea Bologna

Re: [PATCH v2 0/6] add support for pvpanic-pci device

2023-02-20 Thread Andrea Bolognani
uce QEMU_CAPS_DEVICE_PANIC_PCI > conf: add panic model 'pvpanic' > tests: add test cases for device pvpanic-pci > qemu: assign PCI address to device pvpanic-pci > tests: add case for pvpanic-pci without address > docs: document panic device 'pvpanic-pci' Everything looks great, so

Re: [libvirt PATCH 2/2] syntax-check: Ensure Python is called via env(1)

2023-02-20 Thread Andrea Bolognani
On Mon, Feb 20, 2023 at 02:33:55PM +0100, Erik Skultety wrote: > On Mon, Feb 20, 2023 at 03:02:42AM -0800, Andrea Bolognani wrote: > > On Mon, Feb 20, 2023 at 11:40:34AM +0100, Erik Skultety wrote: > > > On Mon, Feb 20, 2023 at 11:21:46AM +0100, Andr

Re: [libvirt PATCH 2/2] syntax-check: Ensure Python is called via env(1)

2023-02-20 Thread Andrea Bolognani
On Mon, Feb 20, 2023 at 11:40:34AM +0100, Erik Skultety wrote: > On Mon, Feb 20, 2023 at 11:21:46AM +0100, Andrea Bolognani wrote: > > +sc_prohibit_python_without_env: > > + @prohibit='#!/usr/.*/py''thon' \ > > Shouldn't this be just '#!/usr/.*/python' ? Yes, but then

[libvirt PATCH 1/2] docs: Recommend better python3 shebang

2023-02-20 Thread Andrea Bolognani
Python scripts should always invoked the interpreter through env(1) to ensure that they work on macOS and the BSDs, and at this point not explicitly asking for Python 3 doesn't really make sense. Signed-off-by: Andrea Bolognani --- docs/hooks.rst | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt PATCH 2/2] syntax-check: Ensure Python is called via env(1)

2023-02-20 Thread Andrea Bolognani
The syntax-check rule that calls flake8 on Python scripts expects this to be the case, and it's the best practice anyway. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk

[libvirt PATCH 0/2] syntax-check: Ensure Python is called via env(1)

2023-02-20 Thread Andrea Bolognani
As suggested in [1]. [1] https://listman.redhat.com/archives/libvir-list/2022-December/236211.html *** BLURB HERE *** Andrea Bolognani (2): docs: Recommend better python3 shebang syntax-check: Ensure Python is called via env(1) build-aux/syntax-check.mk | 5 + docs/hooks.rst

Re: [libvirt PATCH] docs: introduce a more interesting 404 error page

2023-02-16 Thread Andrea Bolognani
fun with 404 error > pages, so it is also a real suggestion :-) +1 to the April Fools' joke, -1 to actually merging this. Sorry! -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH 06/33] tests: Unify input files for firmware tests

2023-02-15 Thread Andrea Bolognani
results in the descriptor-based autoselection logic being effectively skipped, because the compatible machine types as listed in them are only the versioned variants. Signed-off-by: Andrea Bolognani --- .../firmware-auto-bios-not-stateless.xml | 4 ++-- .../firmware-auto-bios-nvram.xml

[libvirt PATCH 30/33] tests: Add more firmware tests

2023-02-15 Thread Andrea Bolognani
These cover various scenarios related to firmware formats, specifically ensuring that all the ways in which the user can ask for a non-default format to be used work correctly. Signed-off-by: Andrea Bolognani --- ...efi-format-loader-qcow2.x86_64-latest.args | 37

[libvirt PATCH 27/33] qemu: Propagate firmware format

2023-02-15 Thread Andrea Bolognani
Take the information from the descriptor and store it in the domain definition. Various things, such as the arguments passed to -blockdev and the path generated for the NVRAM file, will then be based on it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 2 +- src/qemu

[libvirt PATCH 19/33] conf: Export virDomainDefOSValidate()

2023-02-15 Thread Andrea Bolognani
We're going to need it elsewhere very soon. Signed-off-by: Andrea Bolognani --- src/conf/domain_validate.c | 4 ++-- src/conf/domain_validate.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf

[libvirt PATCH 14/33] qemu: Only fill nvramTemplate for local sources

2023-02-15 Thread Andrea Bolognani
It doesn't make sense for non-local sources, since we can't create or reset the corresponding NVRAM file. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu

[libvirt PATCH 15/33] qemu: Clear os.firmwareFeatures after autoselection

2023-02-15 Thread Andrea Bolognani
feature-based autoselection can't be fed back into libvirt. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 175a4db21d..572172bc75 100644 --- a/src/qemu/qemu_firmware.c +++ b/src

[libvirt PATCH 28/33] conf: Accept QCOW2 firmware format

2023-02-15 Thread Andrea Bolognani
All of the drivers will reject this value. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c| 6 -- src/conf/schemas/domaincommon.rng | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 528426511e

[libvirt PATCH 16/33] qemu: Don't pick firmware that requires SMM when smm=off

2023-02-15 Thread Andrea Bolognani
into account the fact that SMM is disabled while performing autoselection, and ignore all descriptors that advertise the requires-smm feature. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 33 +++-- ...rmware-auto-efi-smm-off.x86_64-latest.args | 37

[libvirt PATCH 25/33] drivers: Reject unsupported firmware formats

2023-02-15 Thread Andrea Bolognani
-by: Andrea Bolognani --- src/bhyve/bhyve_firmware.c | 7 +++ src/libxl/libxl_conf.c | 7 +++ src/qemu/qemu_firmware.c | 16 3 files changed, 30 insertions(+) diff --git a/src/bhyve/bhyve_firmware.c b/src/bhyve/bhyve_firmware.c index cb1b94b4d5..ff131efa41 100644

[libvirt PATCH 32/33] news: Document changes to firmware autoselection

2023-02-15 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4625a838f8..577e1502b5 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -41,6 +41,16 @@ v9.1.0 (unreleased) allowing installation of a modular daemon configuration

[libvirt PATCH 33/33] news: Document support for QCOW2 format firmware

2023-02-15 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 577e1502b5..d9b923dabb 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -33,6 +33,12 @@ v9.1.0 (unreleased) Support crypto device(virtio crypto only), also add support

[libvirt PATCH 22/33] qemu: Introduce qemuFirmwareEnsureNVRAM()

2023-02-15 Thread Andrea Bolognani
This helper replaces qemuDomainNVRAMPathFormat() and also incorporates some common operations that all callers of that helper needed. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 49 ++-- 1 file changed, 27 insertions(+), 22 deletions

[libvirt PATCH 23/33] conf: Change handling for empty NVRAM path

2023-02-15 Thread Andrea Bolognani
loader->nvram even when no path is present. Change the firmware handling code so that such a scenario is dealt with appropriately. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 9 +++-- src/qemu/qemu_firmware.c | 7 ++- 2 files changed, 9 insertions(+), 7 deletions

[libvirt PATCH 31/33] docs: Document firmware format attribute

2023-02-15 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/formatdomain.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 8407bab1ba..6122f30b76 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -257,6 +257,11 @@ harddisk, cdrom

[libvirt PATCH 29/33] qemu: Add support for QCOW2 format firmware

2023-02-15 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=2161965 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 14 ++ .../firmware-auto-efi-aarch64.aarch64-latest.args | 8 .../virtio-iommu-aarch64.aarch64-latest.args | 8

[libvirt PATCH 24/33] conf: Parse firmware format

2023-02-15 Thread Andrea Bolognani
The default is raw, which corresponds to the historical behavior and is also the only accepted value. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c| 72 +-- src/conf/domain_conf.h| 1 + src/conf/schemas/domaincommon.rng | 14

[libvirt PATCH 26/33] qemu: Filter firmwares based on format

2023-02-15 Thread Andrea Bolognani
lds listed in there are in raw format. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 20 1 file changed, 20 insertions(+) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index be6d8d4519..a0167f860c 100644 --- a/src/qemu/qemu_firmware.c +++

[libvirt PATCH 21/33] qemu: Move qemuDomainNVRAMPathFormat() to qemu_firmware

2023-02-15 Thread Andrea Bolognani
There are no other callers remaining. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 9 - src/qemu/qemu_domain.h | 5 - src/qemu/qemu_firmware.c | 9 + 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu

[libvirt PATCH 20/33] qemu: Move firmware selection from startup to postparse

2023-02-15 Thread Andrea Bolognani
correctly, even if their firmware configuration can't be successfully resolved. Failure to complete the firmware selection process is only considered fatal when defining a new domain; in all other cases the error will be reported during startup, as is already the case today. Signed-off-by: Andrea

[libvirt PATCH 18/33] tests: Add descriptors for QCOW2 format firmware builds

2023-02-15 Thread Andrea Bolognani
. This matches the expectation that QCOW2 will quickly be adopted as the default on aarch64, where its use produces significant benefits in terms of memory usage, while x86_64 will likely stick with raw for the foreseeable future. Signed-off-by: Andrea Bolognani --- .../share/qemu/firmware/65

[libvirt PATCH 11/33] conf: Introduce virDomainLoaderDefParseXMLLoader()

2023-02-15 Thread Andrea Bolognani
We already handle the element in a separate helper, which is cleaner than having all the logic in the top-level virDomainLoaderDefParseXML() function. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 36 1 file changed, 24 insertions(+), 12

[libvirt PATCH 17/33] qemu: Don't pick firmware with unsupported format

2023-02-15 Thread Andrea Bolognani
Right now, if the descriptor with the highest priority happens to describe a firmware in a format other than raw, no domain that uses autoselection will be able to start. A better approach is to filter out descriptors that advertise unsupported formats during autoselection. Signed-off-by: Andrea

[libvirt PATCH 09/33] qemu: Introduce qemuDomainDefMachinePostParse()

2023-02-15 Thread Andrea Bolognani
Move all the machine type related parts of qemuDomainDefPostParse() to a separate helper. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 45 ++ 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu

[libvirt PATCH 13/33] qemu: Add convenience local variables

2023-02-15 Thread Andrea Bolognani
This makes the code more compact and less awkward. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 58 +--- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 98b42bc6fb

[libvirt PATCH 10/33] qemu: Introduce qemuDomainDefBootPostParse()

2023-02-15 Thread Andrea Bolognani
Move all the boot related parts of qemuDomainDefPostParse() to a separate helper. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu

[libvirt PATCH 12/33] conf: introduce virDomainLoaderDefNew()

2023-02-15 Thread Andrea Bolognani
For now we just allocate the object, so the only advantage is that invocations are shorter and look a bit nicer. Later on, its introduction will pay off by letting us change things in a single spot instead of all over the library. Signed-off-by: Andrea Bolognani --- src/bhyve/bhyve_firmware.c

[libvirt PATCH 03/33] tests: Rename firmware-manual-efi-rw* tests

2023-02-15 Thread Andrea Bolognani
These test cases deal with EFI, not BIOS. Signed-off-by: Andrea Bolognani --- ...rgs => firmware-manual-efi-rw-implicit.x86_64-latest.args} | 0 ...os-rw-implicit.xml => firmware-manual-efi-rw-implicit.xml} | 0 ...-latest.args => firmware-manual-efi-rw.x86_64-latest.args} | 0 ..

[libvirt PATCH 08/33] tests: Add more firmware tests

2023-02-15 Thread Andrea Bolognani
These cover scenarios such as using the new, more verbose format of the element to point to a local path, mixing firmware autoselection with non-local NVRAM files, and explicitly disabling SMM when using firmware autoselection. Signed-off-by: Andrea Bolognani --- ...are-auto-efi-nvram

[libvirt PATCH 07/33] tests: Enable qemuxml2xml for more firmware tests

2023-02-15 Thread Andrea Bolognani
Some of the test cases had only been added to the xml2argv test program and not to the xml2xml one. Signed-off-by: Andrea Bolognani --- ...mware-auto-efi-stateless.x86_64-latest.xml | 35 ++ ...manual-efi-acpi-aarch64.aarch64-latest.xml | 31 ...ware-manual-efi

[libvirt PATCH 05/33] tests: Move firmware tests to CAPS_LATEST

2023-02-15 Thread Andrea Bolognani
This is already the case for the vast majority, but a few are using explicit capabilities lists. Signed-off-by: Andrea Bolognani --- ...nual-bios-not-stateless.x86_64-latest.err} | 0 ...-manual-bios-stateless.x86_64-latest.args} | 7 ++-- ...> firmware-manual-bios.x86_64-latest.args} |

[libvirt PATCH 02/33] tests: Set nvramDir in qemuxml2xmltest

2023-02-15 Thread Andrea Bolognani
We already do this in qemuxml2argvtest. Right now setting this doesn't change anything, but it will become relevant later. Signed-off-by: Andrea Bolognani --- tests/qemuxml2xmltest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index

[libvirt PATCH 04/33] tests: Use x86_64 for all x86 firmware tests

2023-02-15 Thread Andrea Bolognani
Most test cases are on 64-bit architectures already, but there are a couple of exceptions. Right now this works, but it will no longer fly after some upcoming changes. Prepare for those by switching away from 32-bit architectures. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata

[libvirt PATCH 01/33] docs: Fix documentation for loader.stateless attribute

2023-02-15 Thread Andrea Bolognani
It works exactly the other way around. Signed-off-by: Andrea Bolognani --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 36c6d87907..8407bab1ba 100644 --- a/docs/formatdomain.rst +++ b/docs

[libvirt PATCH 00/33] qemu: Move firmware selection to postparse and add support for QCOW2 firmware

2023-02-15 Thread Andrea Bolognani
BZ#2161965] https://bugzilla.redhat.com/show_bug.cgi?id=2161965 Andrea Bolognani (33): docs: Fix documentation for loader.stateless attribute tests: Set nvramDir in qemuxml2xmltest tests: Rename firmware-manual-efi-rw* tests tests: Use x86_64 for all x86 firmware tests tests: Move firm

Re: [libvirt PATCH] gitlab: Ask users not to attach screenshots to bug reports

2023-02-10 Thread Andrea Bolognani
On Fri, Feb 10, 2023 at 11:11:03AM +, Daniel P. Berrangé wrote: > On Fri, Feb 10, 2023 at 02:27:46AM -0800, Andrea Bolognani wrote: > > On Fri, Feb 10, 2023 at 09:50:25AM +, Daniel P. Berrangé wrote: > > > IMHO if someone provides a bug report

Re: [libvirt PATCH] gitlab: Ask users not to attach screenshots to bug reports

2023-02-10 Thread Andrea Bolognani
On Fri, Feb 10, 2023 at 09:50:25AM +, Daniel P. Berrangé wrote: > On Fri, Feb 10, 2023 at 10:34:11AM +0100, Andrea Bolognani wrote: > > + > > I think this is pretty user hostile. When filing bugs, the more rules a > project imposes on the bug report, the less likel

[libvirt PATCH] gitlab: Ask users not to attach screenshots to bug reports

2023-02-10 Thread Andrea Bolognani
Hopefully including this request in ALL CAPITAL LETTERS in the issue template will cut down on the number of screenshots that end up cluttering bug reports by at least a tiny bit. Signed-off-by: Andrea Bolognani --- .gitlab/issue_templates/bug.md | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH 3/6] tests: add test cases for device pvpanic-pci

2023-02-09 Thread Andrea Bolognani
On Thu, Feb 09, 2023 at 07:47:45AM -0800, Andrea Bolognani wrote: > On Wed, Feb 08, 2023 at 12:49:02PM +0100, Kristina Hanicova wrote: > > + > > You can use > > > > here and in the other input XMLs for slightly smaller output files. You can similarly drop t

Re: [PATCH 4/6] qemu: assign PCI address to device pvpanic-pci

2023-02-09 Thread Andrea Bolognani
On Thu, Feb 09, 2023 at 06:26:14PM +0100, Eric Auger wrote: > On 2/9/23 17:33, Andrea Bolognani wrote: > > On Wed, Feb 08, 2023 at 12:49:03PM +0100, Kristina Hanicova wrote: > >> +++ b/src/qemu/qemu_domain_address.c > >> @@ -1062,10 +1062,24 @@ > >> qemu

[libvirt PATCH] conf: Allow conventional PCI devices to be marked as integrated

2023-02-09 Thread Andrea Bolognani
Integrated PCI devices can be either PCIe (virtio-iommu) or conventional PCI (pvpanic-pci). Right now libvirt will refuse to assign an address on pcie.0 for the latter, but that's an undesirable limitation that we can easily remove. Signed-off-by: Andrea Bolognani --- src/conf/domain_addr.c | 7

Re: [PATCH 6/6] docs: document panic device 'pvpanic-pci'

2023-02-09 Thread Andrea Bolognani
On Thu, Feb 09, 2023 at 06:32:12PM +0100, Peter Krempa wrote: > On Thu, Feb 09, 2023 at 08:41:01 -0800, Andrea Bolognani wrote: > > On Wed, Feb 08, 2023 at 01:09:05PM +0100, Peter Krempa wrote: > > > On Wed, Feb 08, 2023 at 12:49:05 +0100, Kristina Hanicova wrote:

Re: [PATCH 0/6] add support for pvpanic-pci device

2023-02-09 Thread Andrea Bolognani
like an oversight rather than a conscious design decision, and it would be great if you would consider addressing that in a follow-up series :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 6/6] docs: document panic device 'pvpanic-pci'

2023-02-09 Thread Andrea Bolognani
quot;, or rather "only when using the QEMU or KVM domain type"? The latter sounds more likely to me, and it would be accurate for the pvpanic-pci device. -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 5/6] tests: add case for pvpanic-pci without address

2023-02-09 Thread Andrea Bolognani
> +DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-no-address-aarch64", "aarch64"); You have forgotten the corresponding qemuxml2argvtest change. The output file is there, so I know you have made the change locally ;) -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 4/6] qemu: assign PCI address to device pvpanic-pci

2023-02-09 Thread Andrea Bolognani
't seem to work with pciFlags at the moment O:-) It works fine with pcieFlags and virtioFlags. I'll try to figure out why that's the case.) -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 3/6] tests: add test cases for device pvpanic-pci

2023-02-09 Thread Andrea Bolognani
and pci-bridge controllers from being added and, again, produce slightly smaller output files. More discussion about device placement in the upcoming reply to a later patch :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 2/6] conf: add panic model 'pvpanic'

2023-02-09 Thread Andrea Bolognani
variant, handled just above, where it's necessary because not specifying an address is somehow considered a valid configuration. I agree with you that it's not needed for pvpanic-pci. -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 1/1] apparmor: Allow umount(/dev)

2023-01-18 Thread Andrea Bolognani
On Wed, Jan 18, 2023 at 08:59:23AM -0700, Jim Fehlig wrote: > On 1/18/23 03:45, Andrea Bolognani wrote: > > Jim, it looks like you came up with exactly the same solution as > > me, despite concerns about the size of the resulting hammer. Any > > other ideas, or should we ju

Re: [libvirt PATCH 1/1] apparmor: Allow umount(/dev)

2023-01-18 Thread Andrea Bolognani
On Wed, Jan 18, 2023 at 11:00:33AM +0100, Michal Prívozník wrote: > On 1/18/23 10:43, Andrea Bolognani wrote: > > Commit 379c0ce4bfed introduced a call to umount(/dev) performed > > inside the namespace that we run QEMU in. > > > > As a result of this, on machines usi

Re: [PATCH V9 00/14] spec: Decompose the daemon subpackage

2023-01-18 Thread Andrea Bolognani
iel? > > I have no further comments. So can you please give your R-b to the few patches that are missing it? -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH 0/1] apparmor: Allow umount(/dev)

2023-01-18 Thread Andrea Bolognani
CC'ing AppArmor experts to get their input :) This is a farily big hammer, but unfortunately I don't think it's possible to tell AppArmor "let the driver use umount, but only if it's running inside a namespace". Andrea Bolognani (1): apparmor: Allow umount(/dev) src/securit

<    1   2   3   4   5   6   7   8   9   10   >