[libvirt PATCH 08/11] nodedev: Remove GetMdevctl*Command() wrappers

2021-04-09 Thread Jonathon Jongsma
These per-command generator functions were only exposed in the header to allow the commandline generation to be tested. Now that we have a generic mdevctl command generator, we can get rid of the per-command wrappers and reduce the noise in the header. Signed-off-by: Jonathon Jongsma ---

[libvirt PATCH 07/11] nodedev: driver: Create a generic mdevctl command translator

2021-04-09 Thread Jonathon Jongsma
From: Erik Skultety Currently there are dedicated wrappers to construct mdevctl command. These are mostly fine except for the one that translates both "start" and "define" commands, only because mdevctl takes the same set of arguments. Instead, keep the wrappers, but let them call a single

[libvirt PATCH 04/11] nodedev: driver: Swap virMdevctlStart and virMdevctlCreate

2021-04-09 Thread Jonathon Jongsma
From: Erik Skultety "start" in libvirt means - "take this object and create an instance out of it" "create" in libvirt most of the time means - "take and XML description, make an object out of it and use it to create an instance" This gets confusing with mdevctl which uses "start" for both.

[libvirt PATCH 05/11] nodedev: Switch to using long options for mdevctl

2021-04-09 Thread Jonathon Jongsma
rather than using short opentions (e.g. "-p :00:02.0"), use long options everywhere (e.g. "--parent=:00:02.0") Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 28 ++- ...19_36ea_4111_8f0a_8c9a70e21366-create.argv | 2 +-

[libvirt PATCH 03/11] tests: nodedev: switch all test macros to accept a filename

2021-04-09 Thread Jonathon Jongsma
Rather than specifying a UUID string to some test macros, just pass a filename to an xml definition. This helps work toward unifying the test macros and making it more maintainable. Signed-off-by: Jonathon Jongsma --- tests/nodedevmdevctldata/mdevctl-create.argv | 2 +-

[libvirt PATCH 11/11] tests: nodedev: remove unused variable

2021-04-09 Thread Jonathon Jongsma
This variable was leftover from previous changes but is no longer used. Signed-off-by: Jonathon Jongsma --- tests/nodedevmdevctltest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index 3a53254195..b2507e1567 100644 ---

[libvirt PATCH 06/11] nodedev: driver: Introduce internal mdevctl commands enum

2021-04-09 Thread Jonathon Jongsma
From: Erik Skultety This is not a 1:1 mapping to mdevctl because mdevctl doesn't support a 'create' command. It uses 'start' for both starting a defined device as well as creating a transient one. To make our code more readable in that regard and not second-guess what does a specific "start"

[libvirt PATCH 10/11] tests: nodedev: simplify test macros

2021-04-09 Thread Jonathon Jongsma
We only use the virt_type "QEMU" in this tests, so simply hard-code it in the test function rather than specifying it in the test macro. In addition, we can figure out the appropriate value for 'create' from the command type, so push that into the test function rather than specifying it in the

[libvirt PATCH 02/11] nodedev: avoid use of VIR_ERR_NO_* errors internally

2021-04-09 Thread Jonathon Jongsma
These errors are demoted to debug statements[1] since they're only intended to be used as return values for public APIs. This makes it difficult to debug the problem when something goes wrong since no error message is logged. Switch instead to VIR_ERR_INTERNAL_ERROR so that the error is logged as

[libvirt PATCH 00/11] Some additional cleanups to mdev support

2021-04-09 Thread Jonathon Jongsma
Erik recommended several changes to the mdev series that was just merged and suggested to address them in a follow-up patch series. They're mostly related to simplifying the testing, and shouldn't actually change any behavior (aside from switching to using the long commandline options when

[libvirt PATCH 09/11] tests: nodedev: Make the mdevctl test function and helper generic

2021-04-09 Thread Jonathon Jongsma
From: Erik Skultety Now that we have a generic mdevctl command generator, we can unify the test infrastructure as well. Signed-off-by: Erik Skultety --- ...19_36ea_4111_8f0a_8c9a70e21366-start.argv} | 0 ...019_36ea_4111_8f0a_8c9a70e21366-stop.argv} | 0

[libvirt PATCH 01/11] nodedev: don't log error in nodeDeviceFindAddressByName()

2021-04-09 Thread Jonathon Jongsma
The calling function will log the error. Just return NULL if a device cannot be found. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/node_device/node_device_driver.c

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-09 Thread Eric Farman
On 4/9/21 10:14 AM, Pavel Hrdina wrote: On Fri, Apr 09, 2021 at 09:13:32AM -0400, Eric Farman wrote: I still fail to see how calling virCgroupRemove(group->nested) in virCgroupRemove() would help at all. The original issue you mentioned in the commit message is that we log this error:

Re: [libvirt PATCH 2/2] api: Add 'flags' param to virNodeDeviceCreate/Undefine()

2021-04-09 Thread Daniel P . Berrangé
On Fri, Apr 09, 2021 at 11:04:47AM -0500, Jonathon Jongsma wrote: > Follow best practices and add a unsigned int flags parameter to these > new APIs that have not been in a release yet. > > Signed-off-by: Jonathon Jongsma > --- > include/libvirt/libvirt-nodedev.h| 6 -- >

Re: [libvirt PATCH 1/2] nodedev: fix release version in comments for new API

2021-04-09 Thread Daniel P . Berrangé
On Fri, Apr 09, 2021 at 11:04:46AM -0500, Jonathon Jongsma wrote: > The comments mistakenly say 7.2.0, when they were actually merged during > the 7.3 development cycle. > > Signed-off-by: Jonathon Jongsma > --- > src/node_device/node_device_udev.c | 6 +++--- > src/remote/remote_driver.c

Re: Removal of fake-capabilities test from qemuxml2argvtest

2021-04-09 Thread Daniel P . Berrangé
On Fri, Apr 09, 2021 at 05:14:41PM +0200, Peter Krempa wrote: > Hi, > > recently I've got very annoyed that we still have a very large amount of > tests in qemuxml2argvtest which use DO_TEST or some other fake-caps > test. > > While I can see value of fake-caps test for negative cases (but I'd >

[libvirt PATCH 2/2] api: Add 'flags' param to virNodeDeviceCreate/Undefine()

2021-04-09 Thread Jonathon Jongsma
Follow best practices and add a unsigned int flags parameter to these new APIs that have not been in a release yet. Signed-off-by: Jonathon Jongsma --- include/libvirt/libvirt-nodedev.h| 6 -- src/driver-nodedev.h | 6 -- src/libvirt-nodedev.c| 16

[libvirt PATCH 0/2] Minor fixes to new mdev apis

2021-04-09 Thread Jonathon Jongsma
A couple issues with the recently merged mdev patch series that were caught by Daniel Berrange. Jonathon Jongsma (2): nodedev: fix release version in comments for new API api: Add 'flags' param to virNodeDeviceCreate/Undefine() include/libvirt/libvirt-nodedev.h| 6 --

[libvirt PATCH 1/2] nodedev: fix release version in comments for new API

2021-04-09 Thread Jonathon Jongsma
The comments mistakenly say 7.2.0, when they were actually merged during the 7.3 development cycle. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_udev.c | 6 +++--- src/remote/remote_driver.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [RFC PATCH 16/43] virQEMUCapsInitQMPBasicArch: Use switch for arch-based decisions

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 56 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f5d72e3ef0..6ac9f8bcf7

Re: [RFC PATCH 15/43] virQEMUCapsInitQMPVersionCaps: Remove unneeded version checks

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Now that minimum supported qemu version is 2.11, we can remove the conditions. Note that the check enabling QEMU_CAPS_TCG was for < 2.10. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 65 +--- 1 file

Re: [RFC PATCH 14/43] virQEMUCapsInitProcessCaps: Remove obsolete version checks

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: We no longer have to mask out IOMMU and NVDIMM support as we no longer support the broken qemu versions. I see QEMU_CAPS_MACHINE_IOMMU still present at the end of this series. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 17

Re: [RFC PATCH 13/43] qemuBuildDeviceAddressStr: Remove unused 'qemuCaps'

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The qemuCaps is left for the device commandline formatters for now as it might come in handy. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 73 - 1 file changed, 36 insertions(+), 37 deletions(-)

Re: [RFC PATCH 12/43] qemuAssignDeviceControllerAlias: Remove unused 'qemuCaps' argument

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c | 3 +-- src/qemu/qemu_alias.h | 1 - src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [RFC PATCH 11/43] virQEMUCapsHasPCIMultiBus: Remove logic for PPC multibus support check

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: All machine types which have PCI support multibus since qemu 2.0 according to the logic we had, thus we can remove all the machine type and version checks which are now dead code. Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c| 4 ++--

Re: [RFC PATCH 10/43] qemucapabilitiesdata: Drop capability test data for qemu < 2.11

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- .../caps_1.5.3.x86_64.replies | 3327 --- .../caps_1.5.3.x86_64.xml | 176 - .../caps_1.6.0.x86_64.replies | 3298 --- .../caps_1.6.0.x86_64.xml |

Re: [RFC PATCH 09/43] [fixup] qemuxml2xmldata: Remove unused output files

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove the output files unused since the last commit. TODO/RFC: Squash into previous commit? Yes --- .../disk-cache.x86_64-1.5.3.xml | 61 --- .../disk-cache.x86_64-2.6.0.xml | 61 ---

Re: [RFC PATCH 05/43] NEWS: Mention that minimum supported qemu version was bumped to 2.11

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: TODO: move news to correct section, add sign-off (anti-push failsafe) --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 0a34798483..d2103e1150 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -5,6 +5,13 @@ libvirt

Re: [RFC PATCH 07/43] [fixup] qemuxml2argvdata: Remove unused output files

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove the output files unused since the last commit. TODO/RFC: Squash into previous commit? Definitely on pushing. But even in the review phase - the changes in tests will be separated thanks to alphabetical sorting. Reviewed-by: Ján Tomko Jano

Re: [RFC PATCH 41/43] tests: qemucapabilitiesdata: Fix formatting of manually added hunk

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Commit 66c5674e797 added a query for the device properties of 'usb-host' but the command header isn't formated the same way as if it were autogenerated. Reformat all the files. Signed-off-by: Peter Krempa ---

Re: [PATCH v2 00/25] Reuse interal rewrapping for 'args' test files

2021-04-09 Thread Pavel Hrdina
On Fri, Apr 09, 2021 at 02:50:02PM +0200, Peter Krempa wrote: > v2: > - rebased on current master > - added changes to nodedevmdevctltest > - reworked the token for virCommandSetDryRun to avoid macro > - truncated patch 17/25 to avoid getting stuck in list > > For full version please fetch

Re: [RFC PATCH 09/43] [fixup] qemuxml2xmldata: Remove unused output files

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove the output files unused since the last commit. TODO/RFC: Squash into previous commit? Yes. Reviewed-by: Ján Tomko Jano --- .../disk-cache.x86_64-1.5.3.xml | 61 --- .../disk-cache.x86_64-2.6.0.xml

Re: [RFC PATCH 42/43] tests: qemucapabilitiesdata: Fix wrong command identifier in caps_4.0.0.riscv64.replies

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Commit cbd4ab4cc69 added a hunk with a broken reply ID. Signed-off-by: Peter Krempa --- tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Push-before: 2021 May 7 Jano

Re: [RFC PATCH 03/43] qemuxml2(argv|xml)test: Don't exit early when testQemuInfoSetArgs fails

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Set the return code to failure and continue testing. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 2 +- tests/qemuxml2xmltest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Push-before: 2021 May 7

Re: [RFC PATCH 02/43] qemuxml2xmltest: testInfoSetPaths: Remove return value

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The function doesn't fail. Remove the return value and checks. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) Reviewed-by: Ján Tomko Push-before: 2021 May 7 Jano

Re: [RFC PATCH 01/43] docs/platforms: Drop separate link to qemu-kvm on repology.org

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The qemu-kvm page redirects to qemu on repology. Signed-off-by: Peter Krempa --- docs/platforms.rst | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Ján Tomko Push-before: 2021 May 7 Jano signature.asc Description: PGP signature

Re: [PATCH v2 23/25] bhyvexml2argvtest: Use internal wrapping of command line arguments

2021-04-09 Thread Pavel Hrdina
On Fri, Apr 09, 2021 at 02:50:25PM +0200, Peter Krempa wrote: > virCommandToString has the possibility to return an already wrapped > string with better format than what we get from the test wrapper script. > > The main advantage is that arguments for an option are always on the > same line which

Re: [PATCH v2 00/25] Reuse interal rewrapping for 'args' test files

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: v2: - rebased on current master - added changes to nodedevmdevctltest - reworked the token for virCommandSetDryRun to avoid macro - truncated patch 17/25 to avoid getting stuck in list For full version please fetch the changes from my repository: git

Re: [PATCH v2 07/25] virCommandSetDryRun: Rework resetting of the dry run data

2021-04-09 Thread Pavel Hrdina
On Fri, Apr 09, 2021 at 02:50:09PM +0200, Peter Krempa wrote: > While virCommandSetDryRun is used in tests only, there were some cases > when error paths would not call the function with NULL arguments to > reset the dry run infrastructure. > > Introduce virCommandDryRunToken type which must be

Removal of fake-capabilities test from qemuxml2argvtest

2021-04-09 Thread Peter Krempa
Hi, recently I've got very annoyed that we still have a very large amount of tests in qemuxml2argvtest which use DO_TEST or some other fake-caps test. While I can see value of fake-caps test for negative cases (but I'd prefer actually real-caps with capability masking) I don't think there's much

Re: [PATCH v2 05/25] virCommandToString: Allow stripping command path

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: In tests we don't want to use the full path to commands as it's unpleasant to keep that working on all systems. Add an integrated way to strip the prefix which will be used to replace virTestClearCommandPath() as a more systemic solution. Signed-off-by:

[RFC PATCH 35/43] qemu_domain_address: Drop compatibility with pre-device vga specification for q35

2021-04-09 Thread Peter Krempa
Remove the slot reservation for the vga card which doesn't make sense with supported qemus any more for the q35 machine type. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain_address.c | 40 -- 1 file changed, 4 insertions(+), 36 deletions(-) diff --git

[RFC PATCH 06/43] qemuxml2argvtest: Remove versioned tests for qemu < 2.11

2021-04-09 Thread Peter Krempa
Drop all the cases pinned to unsupported versions. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 15a14be1bb..5e062eefcb 100644 ---

[RFC PATCH 15/43] virQEMUCapsInitQMPVersionCaps: Remove unneeded version checks

2021-04-09 Thread Peter Krempa
Now that minimum supported qemu version is 2.11, we can remove the conditions. Note that the check enabling QEMU_CAPS_TCG was for < 2.10. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 65 +--- 1 file changed, 15 insertions(+), 50 deletions(-)

[RFC PATCH 16/43] virQEMUCapsInitQMPBasicArch: Use switch for arch-based decisions

2021-04-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 56 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f5d72e3ef0..6ac9f8bcf7 100644 ---

[RFC PATCH 38/43] qemu: capabilities: Always assume QEMU_CAPS_QUERY_QMP_SCHEMA

2021-04-09 Thread Peter Krempa
All supported qemu versions have 'query-qmp-schema' so we can remove the check whether it exists and all logic conntected to it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 36 --- src/qemu/qemu_capabilities.h | 2 +-

[RFC PATCH 25/43] qemuxml2argvtest: Remove negative test case for 'net-vhostuser-multiq'

2021-04-09 Thread Peter Krempa
QEMU_CAPS_VHOSTUSER_MULTIQUEUE is now always enabled, so the negative case doesn't make sense. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/net-vhostuser-multiq.err | 1 - tests/qemuxml2argvtest.c| 1 - 2 files changed, 2 deletions(-) delete mode 100644

[RFC PATCH 43/43] qemu: capabilities: Probe QMP schema before probing commands

2021-04-09 Thread Peter Krempa
All supported QEMU versions now support query-qmp-schema. In the future it will be possible to use the output of query-qmp-schema to also detect commands reliably. Since we are at the point where we have the least amount of .replies files needing changing for a long time, move the

[RFC PATCH 31/43] qemu: capabilities: Move rest of always present caps to virQEMUCapsInitQMPArch

2021-04-09 Thread Peter Krempa
These conveniently don't have any test fallout. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 36836cad3d..af0bb398e4 100644 ---

[RFC PATCH 39/43] qemu: monitor: Remove qemuMonitorGetEvents

2021-04-09 Thread Peter Krempa
Modern code uses QMP schema to query for supported event types. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 57 src/qemu/qemu_monitor_json.h | 3 -- 4 files

[RFC PATCH 04/43] qemu: Formally deprecate support for qemu < 2.11

2021-04-09 Thread Peter Krempa
As of May 7 2021, rhel-8 will be out for two years, which means we no longer have to support rhel-7 ancient qemu. QEMU versions in our supported distros: RHEL-8: 2.12 Debian Stable: 3.1 OpenSuse LEAP 15.0 (SLES15 GA): 2.11 OpenSuse LEAP 15.2: 4.2 Ubuntu (Bionic): 2.11 Ubuntu (Focal): 4.2

[RFC PATCH 41/43] tests: qemucapabilitiesdata: Fix formatting of manually added hunk

2021-04-09 Thread Peter Krempa
Commit 66c5674e797 added a query for the device properties of 'usb-host' but the command header isn't formated the same way as if it were autogenerated. Reformat all the files. Signed-off-by: Peter Krempa --- tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies | 10 +-

[RFC PATCH 27/43] qemu: capabilities: Move setting QEMU_CAPS_DEVICE_VIDEO_PRIMARY to virQEMUCapsInitQMPBasicArch

2021-04-09 Thread Peter Krempa
Until we clean up and remove all capabilities which no longer make sense to have separately, we should use virQEMUCapsInitQMPBasicArch to set the defaults as it's used by qemuxml2argvtest when testing with fake capabilities. This allows us to prevent testing dead code paths with the fake

[RFC PATCH 10/43] qemucapabilitiesdata: Drop capability test data for qemu < 2.11

2021-04-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../caps_1.5.3.x86_64.replies | 3327 --- .../caps_1.5.3.x86_64.xml | 176 - .../caps_1.6.0.x86_64.replies | 3298 --- .../caps_1.6.0.x86_64.xml | 185 - .../caps_1.7.0.x86_64.replies

[RFC PATCH 40/43] qemu: monitor: Remove qemuMonitorSupportsActiveCommit

2021-04-09 Thread Peter Krempa
Modern code uses QMP schema to query for active commit support. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 11 - src/qemu/qemu_monitor.h | 1 - src/qemu/qemu_monitor_json.c | 33 --- src/qemu/qemu_monitor_json.h | 3 ---

[RFC PATCH 30/43] qemuxml2(argv|xml)test: Retire QEMU_CAPS_DEVICE_VIDEO_PRIMARY from tests

2021-04-09 Thread Peter Krempa
All tests now get that capability via virQEMUCapsInitQMPBasicArch. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 70 +--- tests/qemuxml2xmltest.c | 30 +++-- 2 files changed, 20 insertions(+), 80 deletions(-) diff --git

[RFC PATCH 24/43] qemu: capabilities: Move setting of QEMU_CAPS_MACH_VIRT_GIC_VERSION to virQEMUCapsInitQMPBasicArch

2021-04-09 Thread Peter Krempa
Move it under AARCH 64, since it's a platform specific feature, thus it will be removed from all other platforms. Since virQEMUCapsInitQMPBasicArch is used in qemuxml2argv test to initiate qemuCaps for tests with fake capabilities, all the tests gain GIC support now. Signed-off-by: Peter Krempa

[RFC PATCH 13/43] qemuBuildDeviceAddressStr: Remove unused 'qemuCaps'

2021-04-09 Thread Peter Krempa
The qemuCaps is left for the device commandline formatters for now as it might come in handy. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 73 - 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/src/qemu/qemu_command.c

[RFC PATCH 03/43] qemuxml2(argv|xml)test: Don't exit early when testQemuInfoSetArgs fails

2021-04-09 Thread Peter Krempa
Set the return code to failure and continue testing. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 2 +- tests/qemuxml2xmltest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 07cd522699..15a14be1bb

[RFC PATCH 42/43] tests: qemucapabilitiesdata: Fix wrong command identifier in caps_4.0.0.riscv64.replies

2021-04-09 Thread Peter Krempa
Commit cbd4ab4cc69 added a hunk with a broken reply ID. Signed-off-by: Peter Krempa --- tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies

[RFC PATCH 36/43] qemuDomainValidateDevicePCISlotsChipsets: Remove unused @qemuCaps

2021-04-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_domain_address.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 308b23676d..291878931a 100644 --- a/src/qemu/qemu_domain_address.c +++

[RFC PATCH 37/43] qemu: capabilities: Retire QEMU_CAPS_DEVICE_VIDEO_PRIMARY

2021-04-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 1 - src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 -

[RFC PATCH 19/43] qemuxml2xmltest: Always include basic set of capabilities

2021-04-09 Thread Peter Krempa
Use virQEMUCapsInitQMPBasicArch to add the basic set of capabilities which all qemu versions will get. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index

[RFC PATCH 22/43] qemu: capabilities: Move setting of PPC specific flags to virQEMUCapsInitQMPBasicArch

2021-04-09 Thread Peter Krempa
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT and QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT are now always asserted on PPC machine types, move them to virQEMUCapsInitQMPBasicArch. It's now always set for AARCH64, move it into the function setting basic caps for the emulator. Signed-off-by: Peter Krempa

[RFC PATCH 32/43] qemuhotplugtest: Add also always-present capabilities

2021-04-09 Thread Peter Krempa
Use virQEMUCapsInitQMPBasicArch in qemuHotplugCreateObjects so that we also add the always-present capabilities to the set of capabilities used for the hotplug test and fix fallout. Signed-off-by: Peter Krempa --- tests/qemuhotplugtest.c | 5 +

[RFC PATCH 33/43] qemu: command: Remove legacy '-vga' commandline formatter

2021-04-09 Thread Peter Krempa
All supported qemus now support using '-device' for adding a graphics device. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 115 +++- 1 file changed, 6 insertions(+), 109 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c

[RFC PATCH 34/43] qemu_domain_address: Drop compatibility with pre-device vga specification for i440fx

2021-04-09 Thread Peter Krempa
Remove the slot reservation for the vga card which doesn't make sense with supported qemus any more for the i440fx machine type. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain_address.c | 37 +++--- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git

[RFC PATCH 21/43] qemuxml2argvtest: Remove negative test case 'pseries-features-htp-resize'

2021-04-09 Thread Peter Krempa
All supported qemu versions now have the flag so the test doesn't make sense any more. The flag setting will be moved to virQEMUCapsInitQMPBasicArch which will make this test fail. Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/pseries-features-htp-resize.err | 1 -

[RFC PATCH 20/43] qemu: capabilities: Move setting of QEMU_CAPS_CPU_AARCH64_OFF to virQEMUCapsInitQMPBasicArch

2021-04-09 Thread Peter Krempa
It's now always set for AARCH64, move it into the function setting basic caps for the emulator. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[RFC PATCH 26/43] qemuxml2argvtest: Remove tests for absence of QEMU_CAPS_DEVICE_VIDEO_PRIMARY

2021-04-09 Thread Peter Krempa
All supported qemu versions now have the capability so testing the absence doesn't make sense. Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/video-qxl-nodevice.args | 32 --- tests/qemuxml2argvdata/video-qxl-nodevice.xml | 29 -

[RFC PATCH 07/43] [fixup] qemuxml2argvdata: Remove unused output files

2021-04-09 Thread Peter Krempa
Remove the output files unused since the last commit. TODO/RFC: Squash into previous commit? --- .../channel-unix-guestfwd.x86_64-2.5.0.args | 33 - .../console-virtio-unix.x86_64-2.5.0.args | 34 -- .../disk-cache.x86_64-1.5.3.args | 38 ---

[RFC PATCH 23/43] qemuxml2argvtest: Remove negative test for gic v3/host

2021-04-09 Thread Peter Krempa
QEMU_CAPS_MACH_VIRT_GIC_VERSION will be assumed for all aarch64 machines starting from next commit, so this test will become invalid. Remove it. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/aarch64-gic-host.err | 1 - tests/qemuxml2argvdata/aarch64-gic-v3.err | 1 -

[RFC PATCH 17/43] qemuxml2argvtest: Rewrite parsing of XMLs to provide earlier parsing

2021-04-09 Thread Peter Krempa
In upcoming patches we'll need to parse a certain bit of XML before calling the full XML parser. This effectively open-codes what virDomainDefParseFile to reach virDomainDefParseNode. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 24 +--- 1 file changed, 21

[RFC PATCH 14/43] virQEMUCapsInitProcessCaps: Remove obsolete version checks

2021-04-09 Thread Peter Krempa
We no longer have to mask out IOMMU and NVDIMM support as we no longer support the broken qemu versions. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 17 - 1 file changed, 17 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[RFC PATCH 11/43] virQEMUCapsHasPCIMultiBus: Remove logic for PPC multibus support check

2021-04-09 Thread Peter Krempa
All machine types which have PCI support multibus since qemu 2.0 according to the logic we had, thus we can remove all the machine type and version checks which are now dead code. Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c| 4 ++-- src/qemu/qemu_capabilities.c | 42

[RFC PATCH 00/43] qemu: Remove support for qemu-1.5 - qemu-2.10 and clean up capabilities

2021-04-09 Thread Peter Krempa
May 7, 2021 is the 2nd anniversary of release of rhel-8, which means we no longer have to support qemu-1.5. Remove the capabilities and test data for the versions we no longer care about and clean up some capabilities related stuff: - remove code for QEMU_CAPS_DEVICE_VIDEO_PRIMARY - remove

[RFC PATCH 09/43] [fixup] qemuxml2xmldata: Remove unused output files

2021-04-09 Thread Peter Krempa
Remove the output files unused since the last commit. TODO/RFC: Squash into previous commit? --- .../disk-cache.x86_64-1.5.3.xml | 61 --- .../disk-cache.x86_64-2.6.0.xml | 61 --- .../disk-cache.x86_64-2.7.0.xml | 61

[RFC PATCH 08/43] qemuxml2xmltest: Remove versioned tests for qemu < 2.11

2021-04-09 Thread Peter Krempa
Drop all the cases pinned to unsupported versions. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 4 1 file changed, 4 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 2b8fca8316..c7030a22e9 100644 --- a/tests/qemuxml2xmltest.c +++

[RFC PATCH 18/43] qemuxml2argvtest: Parse 'arch' from XML early

2021-04-09 Thread Peter Krempa
If we want to provide correct (fake) caps already for the XML parser we need to be able to parse the arch early so that we can properly initialize the caps cache prior to calling the XML parser. This patch adds code which parses the arch and updates the caps cache prior to the parse step.

[RFC PATCH 12/43] qemuAssignDeviceControllerAlias: Remove unused 'qemuCaps' argument

2021-04-09 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c | 3 +-- src/qemu/qemu_alias.h | 1 - src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index a36b245811..7f93231e0b 100644 ---

[RFC PATCH 02/43] qemuxml2xmltest: testInfoSetPaths: Remove return value

2021-04-09 Thread Peter Krempa
The function doesn't fail. Remove the return value and checks. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 70a4a57df1..03cb405123 100644 ---

[RFC PATCH 05/43] NEWS: Mention that minimum supported qemu version was bumped to 2.11

2021-04-09 Thread Peter Krempa
TODO: move news to correct section, add sign-off (anti-push failsafe) --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 0a34798483..d2103e1150 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -5,6 +5,13 @@ libvirt releases This is the list of official

[RFC PATCH 01/43] docs/platforms: Drop separate link to qemu-kvm on repology.org

2021-04-09 Thread Peter Krempa
The qemu-kvm page redirects to qemu on repology. Signed-off-by: Peter Krempa --- docs/platforms.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/platforms.rst b/docs/platforms.rst index 6d55728625..8c281afebd 100644 --- a/docs/platforms.rst +++ b/docs/platforms.rst @@ -34,7 +34,6

Re: [PATCH 25/39] storage: zfs: Use g_strsplit instead of virStringSplitCount

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Both instances just check the length once. Replicate that faithfully. Signed-off-by: Peter Krempa --- src/storage/storage_backend_zfs.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH 24/39] virStorageBackendZFSRefreshPool: Reduce scope of 'tokens'

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Declare it in the loop that actually uses it. Signed-off-by: Peter Krempa --- src/storage/storage_backend_zfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 23/39] storage: zfs: Don't split string if we need only first/last component

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Use str(r)chr to find the correct bit rather than fully splitting the string. Signed-off-by: Peter Krempa --- src/storage/storage_backend_zfs.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 0/3] util: json: Remove virBitmap from virJSON headers

2021-04-09 Thread Pavel Hrdina
On Fri, Apr 09, 2021 at 02:32:34PM +0200, Peter Krempa wrote: > virJSONValueGetArrayAsBitmap and virJSONValueNewArrayFromBitmap can be > simplified and unexported. > > > Peter Krempa (3): > virQEMUBuildCommandLineJSONArrayBitmap: Open code bitmap conversion > util: json: Remove

Re: [PATCH 37/39] virVMXParseConfig: Replace virStringSplitCount by g_strsplit

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Remove the last usage of virStringSplitCount Signed-off-by: Peter Krempa --- src/vmx/vmx.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 39/39] tests: string: Remove pointless test for virStringListFreeCount

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: It's way more useful to run valgrind against the rest of the code than this test to see whether virStringListFreeCount works. Remove the test. Signed-off-by: Peter Krempa --- tests/virstringtest.c | 23 --- 1 file changed, 23

Re: [PATCH 38/39] util: virstring: Remove the virStringSplitCount wrapper funcion

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Callers which need the count of elements now count it in place. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstring.c | 20 src/util/virstring.h | 6 -- 3 files changed, 27 deletions(-)

Re: [PATCH 36/39] virSystemdActivationInitFromNames: Replace virStringSplit by g_strsplit

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: While the code invokes the string list length calculation twice, it happens only on error path, which by itself should never happen. Signed-off-by: Peter Krempa --- src/util/virsystemd.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [PATCH 35/39] openvzParseBarrierLimit: Rework string handling

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Use g_strsplit instead of virStringSplitCount and automatically free the temporary string list. Signed-off-by: Peter Krempa --- src/openvz/openvz_conf.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) Reviewed-by: Ján

Re: [PATCH 34/39] xenParseXLVnuma: Replace virStringSplitCount by g_strsplit

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/libxl/xen_xl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 33/39] xenParsePCI: Replace virStringSplitCount by g_strsplit

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Count the number of elements in place just for the check. Signed-off-by: Peter Krempa --- src/libxl/xen_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 32/39] util: virresctrl: Use g_strsplit instead of virStringSplitCount

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: In 3 of 4 instances the code didn't even need the count of the elements. Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) Reviewed-by: Ján Tomko

Re: [PATCH 31/39] util: virresctrl: Remove empty 'cleanup' sections

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 111 +++--- 1 file changed, 39 insertions(+), 72 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 30/39] util: virresctrl: Use automatic memory freeing

2021-04-09 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/util/virresctrl.c | 53 ++- 1 file changed, 17 insertions(+), 36 deletions(-) @@ -1945,7 +1937,7 @@ virResctrlAllocFindUnused(virResctrlAllocPtr alloc, { unsigned long long

Re: [libvirt PATCH] meson: Drop readline kludge

2021-04-09 Thread Ján Tomko
On a Tuesday in 2021, Andrea Bolognani wrote: Both FreeBSD ports and Homebrew on macOS have readline 8.1 now, and that version contains a correct pkg-config file so the kludge is no longer necessary. Signed-off-by: Andrea Bolognani --- Only took a couple of years :) Test pipeline:

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-09 Thread Pavel Hrdina
On Fri, Apr 09, 2021 at 09:13:32AM -0400, Eric Farman wrote: > > I still fail to see how calling virCgroupRemove(group->nested) in > > virCgroupRemove() would help at all. The original issue you mentioned in > > the commit message is that we log this error: > > > > unable to open > >

Re: [libvirt PATCH v6 20/30] api: add virNodeDeviceUndefine()

2021-04-09 Thread Ján Tomko
On a Friday in 2021, Daniel P. Berrangé wrote: On Fri, Apr 09, 2021 at 03:57:12PM +0200, Ján Tomko wrote: On a Friday in 2021, Jonathon Jongsma wrote: > This interface allows you to undefine a persistently defined (but > inactive) mediated devices. It is implemented via 'mdevctl' > >

  1   2   >