Re: [PATCH 2/5] qemu: add support for discard_granularity

2023-08-02 Thread Peter Krempa
On Wed, Aug 02, 2023 at 13:47:15 +0200, Kristina Hanicova wrote: > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1849570 > > Signed-off-by: Kristina Hanicova > --- > src/qemu/qemu_command.c| 2 ++ > src/vz/vz_utils.c |

[PATCH] daemon: Treat logging of VIR_ERR_MULTIPLE_INTERFACES same as VIR_ERR_NO_INTERFACE

2023-08-02 Thread Peter Krempa
rt/libvirt/-/issues/514 Signed-off-by: Peter Krempa --- src/remote/remote_daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index d880711c91..d4d999e53a 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -

[PATCH 1/3] virLXCControllerSetupUsernsMap: Modify debug logging for clean startup errors

2023-08-02 Thread Peter Krempa
Avoid logging multiline debug logs so that the function which attempts to extract a non-debug log error message can work properly. Signed-off-by: Peter Krempa --- src/lxc/lxc_controller.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src

[PATCH 2/3] virLXCProcessReadLogOutputData: Refill buffer after filtering out noise

2023-08-02 Thread Peter Krempa
retry the reading loop if the filtering function made space in the buffer. Signed-off-by: Peter Krempa --- src/lxc/lxc_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d003742fa1..6b79bd737b 100644 --- a/src/lxc/lxc_process.c

[PATCH 3/3] virLXCProcessReportStartupLogError: Strip trailing newline from error

2023-08-02 Thread Peter Krempa
Since the error message originates from a log file it contains a trailing newline. Strip it as all error handling adds it's own newline. Signed-off-by: Peter Krempa --- src/lxc/lxc_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_proc

[PATCH 0/3] lxc: Fix reporting of startup errors with debug logging enabled

2023-08-02 Thread Peter Krempa
Few issues with propagating error to the user when debug logging is enabled, Peter Krempa (3): virLXCControllerSetupUsernsMap: Modify debug logging for clean startup errors virLXCProcessReadLogOutputData: Refill buffer after filtering out noise virLXCProcessReportStartupLogError

[PATCH] NEWS: Mention CVE-2023-3750 and BeeGFS migration support

2023-07-31 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 12 1 file changed, 12 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 8f0c67f779..e31448e829 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,13 @@ v9.6.0 (unreleased) * **Security** + * ``CVE-2023-3750``: Fix race condition in

Re: [libvirt PATCH v2 15/24] qemu_snapshot: add merge to external snapshot delete prepare data

2023-07-31 Thread Peter Krempa
there is anything that'd require another pass through the disks. > +virDomainSnapshotDiskDef *snapDisk = &(snapdef->disks[i]); > +g_autofree qemuSnapshotDeleteExternalData *data = NULL; > + > +if (snapDisk->snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) > +continue; With the extra loop removed: Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 14/24] qemu_snapshot: extract external snapshot delete prepare to function

2023-07-31 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:17 +0200, Pavel Hrdina wrote: > This part of code is about to grow to make deletion work when user > reverts to non-leaf snapshot. > > Signed-off-by: Pavel Hrdina > Reviewed-by: Peter Krempa > --- > src/qemu

Re: [libvirt PATCH v2 12/24] qemu_snapshot: introduce external snapshot revert support

2023-07-31 Thread Peter Krempa
sk(inactiveConfig, tmpsnapdef, false) < > 0) > +return -1; > + > +if (qemuSnapshotCreateQcow2Files(vm, domdef, tmpsnapdef, created, false) > < 0) { > + ssize_t bit = -1; Consider storing the error here ... > + > +while ((bit = virBitmapNextSetBit(created, bit)) >= 0) { > +virDomainSnapshotDiskDef *snapdisk = &(tmpsnapdef->disks[bit]); > + > +if (virStorageSourceInit(snapdisk->src) < 0 || > +virStorageSourceUnlink(snapdisk->src) < 0) { ... so that this doesn't overwrite it. > +VIR_WARN("Failed to remove snapshot image '%s'", > + snapdisk->src->path); > +} > +} > + > +return -1; > +} > + > +return 0; > +} The rest seems to make sense: Reviewed-by: Peter Krempa

Re: [PATCH Libvirt 04/11] virsh: Introduce limit-dirty-page-rate api

2023-07-31 Thread Peter Krempa
On Mon, Aug 08, 2022 at 23:41:27 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Introduce limit-dirty-page-rate virsh api to set dirty page > rate upper limit for virtual CPUs: > > The following is the usage: > $ virsh limit-dirty-page-rate [--vcpu ] > > Set the specified index of vcpu if '

Re: [PATCH Libvirt 03/11] qemu_driver: Implement qemuDomainSetVcpuDirtyLimit

2023-07-31 Thread Peter Krempa
On Wed, Aug 03, 2022 at 00:27:47 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Implement qemuDomainSetVcpuDirtyLimit which set dirty page > rate upper limit. > > Signed-off-by: Hyman Huang(黄勇) > --- > src/qemu/qemu_driver.c | 52 > src/qemu/qemu_mo

Re: [PATCH Libvirt 02/11] libvirt: Add virDomainSetVcpuDirtyLimit API

2023-07-31 Thread Peter Krempa
On Tue, Aug 02, 2022 at 22:13:40 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Introduce virDomainSetVcpuDirtyLimit API to set upper limit > of dirty page rate. > > Signed-off-by: Hyman Huang(黄勇) > --- > include/libvirt/libvirt-domain.h | 16 ++ > src/driver-hypervisor.h |

Re: [PATCH Libvirt 07/11] virsh: Extend vcpuinfo api

2023-07-31 Thread Peter Krempa
On Sat, Aug 13, 2022 at 11:11:15 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Extend vcpuinfo api to display dirty page rate upper limit info, > which is set by 'limit-dirty-page-rate'. > > Signed-off-by: Hyman Huang(黄勇) > --- > src/remote/remote_daemon_dispatch.c | 2 ++ > src/remote/remo

Re: [PATCH Libvirt 06/11] qemu_driver: Extend qemuDomainGetVcpus

2023-07-31 Thread Peter Krempa
On Sat, Aug 13, 2022 at 11:06:27 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Extend qemuDomainGetVcpus for getting dirty page rate upper > limit info so 'virsh vcpuinfo' api can display it. > > Signed-off-by: Hyman Huang(黄勇) > --- > include/libvirt/libvirt-domain.h | 2 ++ > src/qemu/qem

Re: [libvirt PATCH v2 11/24] qemu_snapshot: use VIR_ASYNC_JOB_SNAPSHOT when reverting snapshot

2023-07-25 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:14 +0200, Pavel Hrdina wrote: So what is this actually doing? > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_snapshot.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) > > diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_sna

Re: [libvirt PATCH v2 05/24] snapshot_conf: add new argument to virDomainSnapshotAlignDisks

2023-07-25 Thread Peter Krempa
On Mon, Jul 24, 2023 at 16:08:14 +0200, Peter Krempa wrote: > Preferrably: > > virDomainSnapshotAlignDisks: Allow overriding user-configured snapshot default > > > Reply-To: > In-Reply-To: > <322f30a38fa3a4e7a6ef9b1161a07da4b74f0d6e.1687877087.git.phrd...@red

Re: [libvirt PATCH v2 05/24] snapshot_conf: add new argument to virDomainSnapshotAlignDisks

2023-07-25 Thread Peter Krempa
hot_conf.c | 15 --- > src/conf/snapshot_conf.h | 3 ++- > src/qemu/qemu_snapshot.c | 2 +- > src/test/test_driver.c | 2 +- > 4 files changed, 16 insertions(+), 6 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 10/24] qemu_snapshot: move external disk prepare to single function

2023-07-25 Thread Peter Krempa
19 insertions(+), 19 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 09/24] qemu_snapshot: allow using alternate domain definition when creating qcow2 files

2023-07-25 Thread Peter Krempa
ION_EXTERNAL) > continue; > @@ -268,7 +272,7 @@ qemuSnapshotCreateInactiveExternal(virQEMUDriver *driver, > virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap); > g_autoptr(virBitmap) created = virBitmapNew(snapdef->ndisks); > > -if (qemuSnapshotCreateQcow2Files(vm, snapdef, created, reuse) < 0) > +if (qemuSnapshotCreateQcow2Files(vm, NULL, snapdef, created, reuse) < 0)a and adjust this to pass the vm def explicitly. With adjustments: Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 08/24] qemu_snapshot: introduce qemuSnapshotCreateQcow2Files

2023-07-25 Thread Peter Krempa
inObj *vm, > + virDomainSnapshotDef *snapdef, > + virBitmap *created, > + bool reuse) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 4/5] cpu_map: Remove unused alias information

2023-07-25 Thread Peter Krempa
On Tue, Jul 25, 2023 at 14:53:00 +0200, Tim Wiederhake wrote: Please don't skip writing the justification into the commit message. I tried finding why this became unused or how this was intended to be used and came across this commit message: commit 1d946ac79416f3731262c059c35a234c95285d46 Author

[PATCH] util: file: Mark 'BeeGFS' as shared filesystem

2023-07-25 Thread Peter Krempa
s/508 Signed-off-by: Peter Krempa --- src/util/virfile.c | 6 +- src/util/virfile.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 7c44a2a963..2984e2ead2 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3382,6 +3

Re: [libvirt PATCH v2 05/24] snapshot_conf: add new argument to virDomainSnapshotAlignDisks

2023-07-24 Thread Peter Krempa
e used by external snapshot revert code. > > Signed-off-by: Pavel Hrdina > --- > src/conf/snapshot_conf.c | 15 --- > src/conf/snapshot_conf.h | 3 ++- > src/qemu/qemu_snapshot.c | 2 +- > src/test/test_driver.c | 2 +- > 4 files changed, 16 insertions(+), 6

Re: [libvirt PATCH 5/5] qemu: Implement support for vDPA block devices

2023-07-24 Thread Peter Krempa
As I've promised a long time ago I gave your patches some testing in regards of cooperation with blockjobs and snapshots. Since the new version of the patches was not yet posted on the list I'm replying here including my observations from testing patches from your gitlab branch: On Tue, Jun 06, 2

[PATCH] node_device: Don't leak error message buffer from virMdevctlListDefined|Active

2023-07-19 Thread Peter Krempa
r only on failure of virMdevctlListActive|Defined which invoke the command. Add a comment to nodeDeviceGetMdevctlListCommand reminding how virCommandSetErrorBuffer() works. Fixes: 44a0f2f0c8f Signed-off-by: Peter Krempa --- src/node_device/node_device_driver.c | 17 +++-- 1 file changed,

Re: [libvirt PATCH 7/9] util: relax requirement for logind to be running

2023-07-19 Thread Peter Krempa
ttps://gitlab.com/libvirt/libvirt/-/issues/489 > Signed-off-by: Daniel P. Berrangé > --- > src/util/virsystemd.c | 12 > 1 file changed, 12 insertions(+) Based on the discussion in the other thread: Reviewed-by: Peter Krempa

Re: [PATCH 2/2] tests: Refresh valgrind suppressions

2023-07-19 Thread Peter Krempa
On Wed, Jul 19, 2023 at 14:31:24 +0200, Michal Prívozník wrote: > On 7/19/23 12:50, Peter Krempa wrote: > > On Tue, Jul 18, 2023 at 14:28:57 +0200, Michal Privoznik wrote: > >> Since nobody is expected to run valgrind over scripts now, we can > >> drop plenty of suppres

Re: [PATCH 1/2] meson: Annotate each test() with 'suite'

2023-07-19 Thread Peter Krempa
compiled tests, and > 'script' for script based tests and annotate each test() > accordingly. Tbh this annotation feels very arbitrary but since we don't use it and I don't really see us running anything besides unit tests from this repository I don't think we'll need to use this any time soon for anything else. Reviewed-by: Peter Krempa

Re: [PATCH 2/2] tests: Refresh valgrind suppressions

2023-07-19 Thread Peter Krempa
On Tue, Jul 18, 2023 at 14:28:57 +0200, Michal Privoznik wrote: > Since nobody is expected to run valgrind over scripts now, we can > drop plenty of suppressions. Also, there are some old ones that > no longer exist and new ones, that are not covered. > > Signed-off-by: Michal Privoznik > --- >

Re: [PATCH] qemu: Retire QEMU_CAPS_USB_STORAGE_REMOVABLE

2023-07-19 Thread Peter Krempa
| 1 - > .../caps_8.1.0_x86_64.replies | 255 +- > .../caps_8.1.0_x86_64.xml | 1 - > 64 files changed, 1704 insertions(+), 5025 deletions(-) Please split this at least into a patch that retires the capability (removes the c

Re: [PATCH 4/5] test_driver: Pass virt_type to virNodeDeviceDefParse() in testNodeDeviceCreateXML()

2023-07-19 Thread Peter Krempa
src/test/test_driver.c | 7 +-- > src/util/virrandom.c | 3 +++ > 2 files changed, 8 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [PATCH 5/5] virrandommock: Drop virRandomGenerateWWN

2023-07-19 Thread Peter Krempa
k.c | 8 > 1 file changed, 8 deletions(-) Also adjust the following line, as this function isn't being mocked any more: src/util/virrandom.h:int virRandomGenerateWWN(char **wwn, const char *virt_type) G_NO_INLINE; Reviewed-by: Peter Krempa

Re: [PATCH Libvirt v2 1/3] conf: Add 'virtio_discard' and 'virtio_write_zeroes' attributes

2023-07-19 Thread Peter Krempa
On Wed, Jul 19, 2023 at 11:52:45 +0800, Yong Huang wrote: > On Tue, Jul 18, 2023 at 9:31 PM Peter Krempa wrote: > > > On Sun, Jul 16, 2023 at 22:36:21 +0800, ~hyman wrote: > > > From: Hyman Huang(黄勇) > > > > > > Add 'virtio_discard' and 'v

Re: [PATCH 2/5] virrandom: Accept "nodedev" driver in virRandomGenerateWWN()

2023-07-19 Thread Peter Krempa
ible through a new API (complex, unclear benefit, doesn't solve all cases anywyas) >From my side, please drop the commit message bit about it being chosen by a dice roll. I don't really buy that. Additionally please allow others to chime in (don't push it right after): Reviewed-by: Peter Krempa

Re: [PATCH] Added support for disk model string for QEMU IDE and SATA devices

2023-07-19 Thread Peter Krempa
t it's done properly. I'll also also adjust the commit message to go along with that, so there's no need to resend. > Signed-off-by: Benedek Major > Reviewed-by: Peter Krempa > --- > src/conf/domain_validate.c | 18 +++--- >

Re: [PATCH 3/5] virrandom: Fix printf format string in virRandomGenerateWWN()

2023-07-19 Thread Peter Krempa
/util/virrandom.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [PATCH 1/5] virsh: Make cmdVersion() work with split daemon

2023-07-18 Thread Peter Krempa
rel = hvVersion % 1000; > > -vshPrint(ctl, _("Running hypervisor: %1$s %2$d.%3$d.%4$d\n"), > - hvType, major, minor, rel); > +vshPrint(ctl, _("Running hypervisor: %1$s %2$d.%3$d.%4$d\n"), > + hvType, major, minor, rel); > +} > } Ideally you'd also add an else branch with 'vshResetLibvirtError(); but the other call to virConnectGetLibVersion() doesn't do that so ... whatever ... I guess :) > > if (vshCommandOptBool(cmd, "daemon")) { > -- > 2.41.0 > Reviewed-by: Peter Krempa

[PATCH 3/3] qemu: capabilities: Retire QEMU_CAPS_(IDE|SCSI)_DRIVE_WWN

2023-07-18 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 4 ++-- tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml | 2 -- tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml | 2 -- tests

[PATCH 1/3] qemu: Always assume support for QEMU_CAPS_SCSI_DISK_WWN

2023-07-18 Thread Peter Krempa
The support for configuring the 'wwn' of a SCSI disk was added in qemu commit 27395add759ff4caeb0 (v1.0-3326-g27395add75) and can't be compiled out. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 18 -- tests/qemuxml2xmltest.c | 2 +- 2 files chang

[PATCH 2/3] qemu: Always assume support for QEMU_CAPS_IDE_DRIVE_WWN

2023-07-18 Thread Peter Krempa
The support for configuring the 'wwn' of a IDE disk was added in qemu commit 95ebda85e09 (v1.0-1869-g95ebda85e0) and can't be compiled out. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_valida

[PATCH 0/3] qemu: capabilities: Retire QEMU_CAPS_SCSI_DISK_WWN and QEMU_CAPS_IDE_DRIVE_WWN

2023-07-18 Thread Peter Krempa
Peter Krempa (3): qemu: Always assume support for QEMU_CAPS_SCSI_DISK_WWN qemu: Always assume support for QEMU_CAPS_IDE_DRIVE_WWN qemu: capabilities: Retire QEMU_CAPS_(IDE|SCSI)_DRIVE_WWN src/qemu/qemu_capabilities.c | 6 ++--- src/qemu/qemu_capabilities.h

Re: [PATCH] Added support for vendor and product for qemu ide-hd

2023-07-18 Thread Peter Krempa
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > _("Only scsi disk supports vendor and product")); > return -1; > } > > +if (disk->product && > +disk->bus != VIR_DOMAIN_DISK_BUS_IDE && > +disk->bus != VIR_DOMAIN_DISK_BUS_SATA && > +disk->bus != VIR_DOMAIN_DISK_BUS_SCSI) { > +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > + _("Only scsi, ide, sata disk supports product")); > +return -1; > +} > + > + > /* Properties wwn, vendor and product were introduced in the > * same QEMU release (1.2.0). > */ ... I'll post a patch to remove this dead code. Minimum supported qemu is 4.2.0, thus we always have this. Once you do the above, you can add: Reviewed-by: Peter Krempa I'll post the final version, after you mainly fix the commit message.

Re: [PATCH Libvirt v2 1/3] conf: Add 'virtio_discard' and 'virtio_write_zeroes' attributes

2023-07-18 Thread Peter Krempa
On Sun, Jul 16, 2023 at 22:36:21 +0800, ~hyman wrote: > From: Hyman Huang(黄勇) > > Add 'virtio_discard' and 'virtio_write_zeroes' attribute to control > whether discard and write-zeroes requests are handled by the > virtio-blk device. > > To distinguish the attributes in block drive layer, use th

[PATCH 1/2] file reproducer

2023-07-18 Thread Peter Krempa
To reproduce the issue run many instances of 'virsh vol-info /some/path/to/a/storage/pool' --- src/storage/storage_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index d39aa92eae..a478a85a05 100644 --- a/src/storage/storage_util

[PATCH 0/2] storage: Fix returning of locked objects from 'virStoragePoolObjListSearch'

2023-07-18 Thread Peter Krempa
Patch 1 improves chances to reproduce the bug. https://bugzilla.redhat.com/show_bug.cgi?id=210 Peter Krempa (2): file reproducer storage: Fix returning of locked objects from 'virStoragePoolObjListSearch' src/conf/virstorageobj.c | 7 ++- src/storage/storage_util.c

[PATCH 2/2] storage: Fix returning of locked objects from 'virStoragePoolObjListSearch'

2023-07-18 Thread Peter Krempa
UARD' which auto-unlocked it when leaving the scope, even when the code was originally "leaking" the lock. Revert the corresponding conversion and add a comment that this function is intentionally leaking a locked object. Fixes: 0c4b391e2a9 Resolves: https://bugzilla.redhat.com/show

Re: Add blocksize properties to libvirt

2023-07-17 Thread Peter Krempa
On Mon, Jul 10, 2023 at 16:39:43 +0300, Андрей Ячменёв wrote: >Hello! > >I want to make patch for exposing min_io_size and opt_io_size properties >to >export block topology information to the guest. This is needed to set >optimal >i/o alignment for storages in underlay. >

Re: [PATCH] Added support for vendor and product for qemu ide-hd

2023-07-17 Thread Peter Krempa
On Sat, Jul 15, 2023 at 18:37:10 +0200, Benedek Major wrote: > The XML-Schema specifies two tags vendor and product for the disk type. But > they only apply to the SCSI bus, > even though the QEMU driver ide-hd and ide-cd have support for the command > line argument -model. > The model correspond

Re: [PATCH] storage: zfs: Use 'zfs list' to check pool status

2023-07-17 Thread Peter Krempa
aset > specified by the pool's def->source.name. > > Resolves: https://gitlab.com/libvirt/libvirt/-/issues/221 > > Signed-off-by: Matt Low > --- > src/storage/storage_backend_zfs.c | 20 +--- > 1 file changed, 17 insertions(+), 3 deletions(-) Reviewed-by: Peter Krempa I'll push it shortly.

[PATCH 3/3] qemu_monitor: Remove helpers for 'query-commands'

2023-07-14 Thread Peter Krempa
Now that we don't use it for probing at all we can remove all the corresponding monitor code. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 44 --- src

[PATCH 1/3] qemu: capabilities: Probe presence of commands from QMP schema instead of 'query-commands'

2023-07-14 Thread Peter Krempa
Move the probing code to extract the data from the QMP schema rather than invoking 'query-commands'. This patch doesn't yet remove the actual invocation of 'query-commands', just moves the actual probing. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c

[PATCH 0/3] Don't use 'query-commands' to probe presence of commands

2023-07-14 Thread Peter Krempa
We now call 'query-qmp-schema' unconditionally and can extract the information from there. Peter Krempa (3): qemu: capabilities: Probe presence of commands from QMP schema instead of 'query-commands' qemu: capabilities: Don't probe 'query-commands'

[PATCH 00/10] More real qemu capability testing cleanups

2023-07-04 Thread Peter Krempa
Few other patches to move towards purely real qemu-caps testing. Peter Krempa (10): testutils: Print number of failed tests domaincapstest: Use obviously fake firmware name in capabilities testQemuGetRealCaps: Strip the default machine alias before insertion into cache

[PATCH 07/10] tests: qemudomainsnapshotxml2xmlout: Use real 'x86_64' capabilities in all test data

2023-07-04 Thread Peter Krempa
Use the platform which is getting most development for the snapshot XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa --- .../disk_snapshot_redefine.xml | 9 ++--- .../external_vm_redefine.xml

[PATCH 09/10] qemudomaincheckpointxml2xmltest: Use real 'x86_64' capabilities in all test data

2023-07-04 Thread Peter Krempa
Use the platform which is getting most development for the checkpoint XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa --- .../internal-active-invalid.xml | 4 ++-- .../internal-inactive-invalid.xml

[PATCH 10/10] qemuTestDriverInit: Don't autopopulate qemu capabilities when initializing driver

2023-07-04 Thread Peter Krempa
ff-by: Peter Krempa --- tests/testutilsqemu.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index e0b58b1d5d..16b773a768 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -428,7 +428,6 @@ int qemuTestDriverInit(virQEMUDriver *d

[PATCH 08/10] qemuagenttest: Use real x86_64 capabilities for parsing domain definitions

2023-07-04 Thread Peter Krempa
Some test cases require a real definition and thus parse a XML with the definition to obtain it. Convert the code to use real capabilities and switch to x86_64. Signed-off-by: Peter Krempa --- tests/qemuagentdata/fsinfo.xml | 4 ++-- tests/qemuagenttest.c | 8 2 files changed

[PATCH 03/10] testQemuGetRealCaps: Strip the default machine alias before insertion into cache

2023-07-04 Thread Peter Krempa
Expand the default machine type alias of the 'latest' capabilities for an architecture before caching it rather than after copying it, so that we don't duplicate the work all the time. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 6 +++--- 1 file changed, 3 insertions(

[PATCH 05/10] testutilsqemu: Introduce 'testQemuInsertRealCaps' helper

2023-07-04 Thread Peter Krempa
the capabilities that are borrowed from it's internal cache thus they must not be modified afterwards in contrast to the above steps. The use of this helper is in simple tests which require some form of capabilities to parse a definition but don't care about doctoring them in any way. Sign

[PATCH 06/10] qemumemlocktest: Use 'testQemuInsertRealCaps'

2023-07-04 Thread Peter Krempa
Rewrite the capability fetching to use the new helper, thus simplifying the code. Signed-off-by: Peter Krempa --- tests/qemumemlocktest.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c index 7d219fcc40

[PATCH 02/10] domaincapstest: Use obviously fake firmware name in capabilities

2023-07-04 Thread Peter Krempa
reted in a meaningful way. Signed-off-by: Peter Krempa --- tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 5 ++--- tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 5 ++--- tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml | 5 ++--- tests/domaincapsdata/qemu_4.2.0.aarch6

[PATCH 04/10] testQemuGetRealCaps: Extract caching of the caps into a new helper

2023-07-04 Thread Peter Krempa
ned-off-by: Peter Krempa --- tests/testutilsqemu.c | 79 +++ 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 40c2cb8bba..0a42e59c59 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c

[PATCH 01/10] testutils: Print number of failed tests

2023-07-04 Thread Peter Krempa
We can easily report how many tests failed. Signed-off-by: Peter Krempa --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.c b/tests/testutils.c index d77b9e8db2..e546422941 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -922,7

Re: [PATCH v1] ci: disable usage of libattr in Leap

2023-07-03 Thread Peter Krempa
On Mon, Jul 03, 2023 at 14:42:57 +0200, Olaf Hering wrote: > Commit dffeef89ef ("meson: attr_dep switch to dependency()") made > libattr.pc mandatory. Could you explain why this is needed in the first place? > Signed-off-by: Olaf Hering > --- > ci/containers/opensuse-leap-15.Dockerfile | 2 +- >

[PATCH 1/2] qemu: driver: Reformat helpers for saving VM state

2023-06-30 Thread Peter Krempa
Rewrap argument definition of qemuDomainSaveInternal and align argument in the invocation of the aforementioned function in qemuDomainManagedSaveHelper. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src

[PATCH 0/2] qemu: VM saving related fixes

2023-06-30 Thread Peter Krempa
Peter Krempa (2): qemu: driver: Reformat helpers for saving VM state Properly mark auto-added 'terminator' virStorageSource src/qemu/qemu_domain.c| 4 +++- src/qemu/qemu_driver.c| 11 +++ src/storage_file/storage_source.c | 1 + 3 files c

[PATCH 0/2] NEWS update for upcoming release

2023-06-30 Thread Peter Krempa
Peter Krempa (2): NEWS: Move section about 'discard_no_unref' to features NEWS: Document changes for the release NEWS.rst | 49 - 1 file changed, 44 insertions(+), 5 deletions(-) -- 2.41.0

[PATCH 2/2] Properly mark auto-added 'terminator' virStorageSource

2023-06-30 Thread Peter Krempa
s manually terminated even when it was auto-detected. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 4 +++- src/storage_file/storage_source.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 94587638c3..

[PATCH 1/2] NEWS: Move section about 'discard_no_unref' to features

2023-06-30 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index 950b188a8b..857fef0f6d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,13 @@ v9.5.0 (unreleased) * **New features** + * qemu: Allow

[PATCH 2/2] NEWS: Document changes for the release

2023-06-30 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 39 +++ 1 file changed, 39 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 857fef0f6d..f3e8f9bf8b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -33,8 +33,47 @@ v9.5.0 (unreleased) compatible with all hosts even

Re: [libvirt PATCH v2 1/4] tests: add capabilities for QEMU 8.1.0 on s390x

2023-06-29 Thread Peter Krempa
,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,sea_esop2=on,te=on,cmm=on \ +-cpu gen16a-base,nnpa=on,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,pai=on,paie=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,rdp=on,sea_esop2=on,beareh=on,te=on,cmm=on,vxpdeh2=on \ -m size=262144k \ -object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \ -overcommit mem-lock=off \ If the .xml changes are either separated or properly justified you can use: Reviewed-by: Peter Krempa

Re: [PATCH] domain_event: Drop virDomainEventMemoryDeviceSizeChangePtr

2023-06-28 Thread Peter Krempa
it. > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_event.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) Reviewed-by: Peter Krempa

[PATCH v2] qemuDomainWaitForDeviceRemoval: recheck the value of priv->unplug.alias when timeout

2023-06-23 Thread Peter Krempa
nplug.alias to determine who is going to remove the device from domain definition. Signed-off-by: zuo boqun Reviewed-by: Peter Krempa Signed-off-by: Peter Krempa --- v2: - rewrote waiting loop so that we always check the unplug status if the thread was notified - added comments explainin

Re: [PATCH] qemuDomainWaitForDeviceRemoval: recheck the value of priv->unplug.alias when timeout

2023-06-23 Thread Peter Krempa
On Mon, Jun 05, 2023 at 11:59:36 +0800, zuoboqun wrote: > When detaching a device, the following race condition may happen: > Once qemuDomainSignalDeviceRemoval() marks the device for > removal, it returns true, which means it is the caller > that marked the device for removal is going to remove th

[PATCH v3 1/3] qemu: capabilities: Introduce QEMU_CAPS_QCOW2_DISCARD_NO_UNREF

2023-06-23 Thread Peter Krempa
The qcow2 driver allows passing discards to the storage while keeping the reference of the block, and just marking it as zeroed. This can decrease the levels of fragmentation of the qcow2 metadata when discards are enabled. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c

[PATCH v3 0/3] Add support for discard_no_unref qcow2 option

2023-06-23 Thread Peter Krempa
discard_no_unref option for qcow2 images NEWS: Update NEWS with new discard_no_unref option Peter Krempa (1): qemu: capabilities: Introduce QEMU_CAPS_QCOW2_DISCARD_NO_UNREF NEWS.rst | 7 docs/formatdomain.rst | 7 src

[PATCH v3 3/3] NEWS: Update NEWS with new discard_no_unref option

2023-06-23 Thread Peter Krempa
From: Jean-Louis Dupond Signed-off-by: Jean-Louis Dupond Reviewed-by: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index c520a96177..950b188a8b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -26,6 +26,13

[PATCH v3 2/3] Add discard_no_unref option for qcow2 images

2023-06-23 Thread Peter Krempa
discard to the lower layer. This was implemented to avoid fragmentation within the qcow2 image. Signed-off-by: Jean-Louis Dupond Reviewed-by: Peter Krempa Signed-off-by: Peter Krempa --- docs/formatdomain.rst | 7 src/conf/domain_conf.c| 8

Re: [libvirt PATCH 2/9] src: remote deps on ip[6]tables/firewalld.service from systemd units

2023-06-22 Thread Peter Krempa
ually needed. This answers the question posed in that above commit > message about firewalld ordering. > > https://gitlab.com/libvirt/libvirt/-/issues/489 > Signed-off-by: Daniel P. Berrangé > --- > src/network/virtnetworkd.service.in | 3 --- > src/remote/libvirtd.service.in | 3 --- > 2 files changed, 6 deletions(-) Reviewed-by: Peter Krempa

[PATCH 0/4] qemu: Allow 'maxMemory' without 'slots' and fix slot validation for virtio-mem

2023-06-22 Thread Peter Krempa
First patch reworks memory specification to use the explicit 'size' parameter (since qemu v2.0.0-179-g6e1d3c1c85), the reset modifies memory hotplug related checks to properly handle non-DIMM devices which don't require DIMM slots. Peter Krempa (4): qemu_command: Always use moder

[PATCH 4/4] qemuxml2(argv|xml)test: Add case for validating proper DIMM slot validation

2023-06-22 Thread Peter Krempa
Add a config where both DIMM and non-DIMM devices are used so that it validates that only DIMMs require memory slots. Signed-off-by: Peter Krempa --- ...memory-hotplug-multiple.x86_64-latest.args | 46 ++ .../memory-hotplug-multiple.xml | 89 ++ tests

[PATCH 2/4] qemu_domain: Properly validate count of memory slots

2023-06-22 Thread Peter Krempa
Memory slots are required only for DIMM-like devices, while other devices defined via such as virtio-mem may use the PCI bus and thus do not require/consume a memory slot. Fix the validation code to calculate the required count of memory devices only for DIMMs and NVDIMMs. Signed-off-by: Peter

[PATCH 3/4] conf: Allow omitting 'slots' attribute of

2023-06-22 Thread Peter Krempa
Memory slots are required only for DIMM-like devices, but the maximum memory address space is relevant also for other non-DIMM memory devices such as virtio-mem. Allow configurations where no slots are added. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c

Re: [libvirt PATCH 9/9] util: add logging about node suspend availability

2023-06-22 Thread Peter Krempa
rget, > bool *supported) > return ret; > } > > +VIR_DEBUG("Node systemd systemd target %d: %d", target, ret); systemd systemd? > return ret; > } Reviewed-by: Peter Krempa

Re: [libvirt PATCH 5/9] rpc: automatically raise max file limit in all daemons

2023-06-22 Thread Peter Krempa
pc/virnetdaemon.c | 3 +++ Reviewed-by: Peter Krempa

Re: [libvirt PATCH 8/9] src: remove dep on systemd-logind.service from unit files

2023-06-22 Thread Peter Krempa
> --- > src/ch/virtchd.service.in | 1 - > src/lxc/virtlxcd.service.in| 1 - > src/qemu/virtqemud.service.in | 1 - > src/remote/libvirtd.service.in | 1 - Reviewed-by: Peter Krempa

Re: [libvirt PATCH 6/9] src: set max open file limit to match systemd >= 240 defaults

2023-06-22 Thread Peter Krempa
ct(vshControl *ctl, const char *uri, bool > readonly) > keepalive_forced = true; > } > > -if (virPolkitAgentAvailable() && > +if (0 && virPolkitAgentAvailable() && > !(pkagent = virPolkitAgentCreate())) > virResetLastError(); More irrelevant debug code accidentally added. For the unit file bits: Reviewed-by: Peter Krempa

Re: [libvirt PATCH 4/9] util: add helper for raising the max files limit

2023-06-22 Thread Peter Krempa
to do this limit raising. > > Signed-off-by: Daniel P. Berrangé > --- > src/libvirt_private.syms | 1 + > src/util/virprocess.c| 34 ++ > src/util/virprocess.h| 1 + > 3 files changed, 36 insertions(+) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 7/9] util: relax requirement for logind to be running

2023-06-22 Thread Peter Krempa
On Wed, Jun 21, 2023 at 14:32:30 +0100, Daniel P. Berrangé wrote: > Historically we wanted to check if logind was actually running, not > merely activatable, because on systems where systemd is installed, > but the OS is booted into non-systemd init, we want to fallback to > pm-utils. > > Requirin

Re: [libvirt PATCH 1/9] src: remove After=local-fs.target from systemd units

2023-06-22 Thread Peter Krempa
rt(errno != EAGAIN); > err = (errno || (!end_ptr && *p) || p == s); > if (end_ptr) > *end_ptr = p; > @@ -223,6 +228,7 @@ virStrToLong_ullp(char const *s, char **end_ptr, int base, > > errno = 0; > val = g_ascii_strtoull(s, &p, base); > +g_assert(errno != EAGAIN); > err = (memchr(s, '-', p - s) || > errno || (!end_ptr && *p) || p == s); > if (end_ptr) You've accidentally added some debugging code to this patch. For the systemd stuff: Reviewed-by: Peter Krempa

Re: [libvirt PATCH 3/9] util: remove pointless wrappers for setrlimit/getrlimit

2023-06-22 Thread Peter Krempa
, 2 insertions(+), 20 deletions(-) Reviewed-by: Peter Krempa

[PATCH 1/2] tests: qemucapabilitiesdata: Update data for qemu-8.1 dev cycle

2023-06-09 Thread Peter Krempa
nd 'PIIX3-xen' devices removed Signed-off-by: Peter Krempa --- .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 5 +- .../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml | 1 - tests/domaincapsdata/qemu_8.1.0.x86_64.xml| 5 +- .../caps_8.1.0_x86_64.replies | 82 ++

[PATCH 2/2] Explicitly reject unsupported storage types for legacy config generators

2023-06-09 Thread Peter Krempa
New storage types are not implemented in generators for -drive and the xen config. Explicitly reject them in case of a programming error. Signed-off-by: Peter Krempa --- src/libxl/xen_xl.c | 4 +++- src/qemu/qemu_command.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff

[PATCH 0/2] qemu: Caps update for 'vdpa-block' and corner case hardening

2023-06-09 Thread Peter Krempa
Peter Krempa (2): tests: qemucapabilitiesdata: Update data for qemu-8.1 dev cycle Explicitly reject unsupported storage types for legacy config generators src/libxl/xen_xl.c| 4 +- src/qemu/qemu_command.c | 5 +- .../domaincapsdata

Re: [PATCH 1/2] Add discard_no_unref option for qcow2 images

2023-06-08 Thread Peter Krempa
On Tue, Jun 06, 2023 at 11:54:40 +0200, Jean-Louis Dupond wrote: > Qemu 8.1.0 will add discard_no_unref option for qcow2 images. > When this option is enabled (default=false), then it will no longer > unreference clusters when guest does a discard, but it will just free > the blocks (useful for inc

Re: [libvirt PATCH 1/5] conf: add ability to configure a vdpa block disk device

2023-06-08 Thread Peter Krempa
ed to labelling the fd passed to qemu. What I'm missing is selinux-labelling of the FD passed to the VM. Since the /dev/ node doesn't get labelled either it will most likely we forbidden by selinux. Do you have any guide how to setup the VDPA simulator handy? Generally this patch lo

Re: [libvirt PATCH 5/5] qemu: Implement support for vDPA block devices

2023-06-08 Thread Peter Krempa
On Tue, Jun 06, 2023 at 16:15:30 -0500, Jonathon Jongsma wrote: > Requires recent qemu with support for the virtio-blk-vhost-vdpa device > and the ability to pass a /dev/fdset/N path for the vdpa path (8.1.0) > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1900770 > --- > src/qemu/qemu_blo

Re: [libvirt PATCH 4/5] qemu: consider vdpa block devices for memlock limits

2023-06-08 Thread Peter Krempa
rc/qemu/qemu_domain.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 3/5] qemu: make vdpa connect function more generic

2023-06-08 Thread Peter Krempa
4 ++-- > tests/qemuxml2argvmock.c | 2 +- > 6 files changed, 26 insertions(+), 29 deletions(-) Reviewed-by: Peter Krempa

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