Re: [libvirt PATCH 1/3] include: Introduce VIR_MIGRATE_ASSUME_SHARED_STORAGE

2023-11-01 Thread Peter Krempa
On Tue, Oct 31, 2023 at 18:12:58 +0100, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > include/libvirt/libvirt-domain.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/include/libvirt/libvirt-domain.h > b/include/libvirt/libvirt-domain.h > index a1902

Re: [libvirt PATCH 2/3] qemu: Implement VIR_MIGRATE_ASSUME_SHARED_STORAGE support

2023-11-01 Thread Peter Krempa
On Tue, Oct 31, 2023 at 18:12:59 +0100, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_migration.c | 5 + > src/qemu/qemu_migration.h | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index ac58

Re: [libvirt PATCH 3/3] virsh: Wire up VIR_MIGRATE_ASSUME_SHARED_STORAGE support

2023-11-01 Thread Peter Krempa
On Tue, Oct 31, 2023 at 18:13:00 +0100, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > docs/manpages/virsh.rst | 5 - > tools/virsh-domain.c| 5 + > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst >

Re: [libvirt PATCH 0/3] Introduce VIR_MIGRATE_ASSUME_SHARED_STORAGE

2023-11-01 Thread Peter Krempa
Andrea Bolognani (3): > include: Introduce VIR_MIGRATE_ASSUME_SHARED_STORAGE > qemu: Implement VIR_MIGRATE_ASSUME_SHARED_STORAGE support > virsh: Wire up VIR_MIGRATE_ASSUME_SHARED_STORAGE support Reviewed-by: Peter Krempa but please add some wording being more explicit about t

[PATCH] virDomainDeviceInfoCheckABIStability: Implement proper check for CCW addresses

2023-11-02 Thread Peter Krempa
CCW addresses need to be also checked for ABI stability. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 80f467ae7a..5ce1793c2d 100644 --- a/src/conf

[PATCH 0/6] qemucapabilitiestest: Bump 8.2 dev cycle data

2023-11-09 Thread Peter Krempa
Peter Krempa (6): qemumigrationcookiexmltest: Don't crash when parsing of status XML fails tests: qemumigparamsdata: Drop deprecated fields qemuxml2argvtest: Rename 'cpu-host-model' tests according to emulation type qemuxml2argvtest: Add complementary 'kvm

[PATCH 1/6] qemumigrationcookiexmltest: Don't crash when parsing of status XML fails

2023-11-09 Thread Peter Krempa
Some sub-tests dereference 'data->vm' even when it is NULL. Signed-off-by: Peter Krempa --- tests/qemumigrationcookiexmltest.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qemumigrationcookiexmltest.c b/tests/qemumigrationcookiexm

[PATCH 3/6] qemuxml2argvtest: Rename 'cpu-host-model' tests according to emulation type

2023-11-09 Thread Peter Krempa
The cpu-host-model.xml test case uses 'kvm' whereas the fallback/nofallback cases use tcg in the definition. Rename them accordingly so that the complement cases can be added later. Signed-off-by: Peter Krempa --- ...host-model-fallback-tcg.x86_64-4.2.0.args} | 0 ...host-mode

[PATCH 2/6] tests: qemumigparamsdata: Drop deprecated fields

2023-11-09 Thread Peter Krempa
to add any further code to prepare for the legacy compression to be dropped. Signed-off-by: Peter Krempa --- tests/qemumigparamsdata/basic.json | 3 --- tests/qemumigparamsdata/basic.reply| 3 --- tests/qemumigparamsdata/basic.xml | 3 --- tests/qemumigparamsdat

[PATCH 5/6] qemuxml2argvtest: Add '8.1.0' variants of 'cpu-host-model*' tests

2023-11-09 Thread Peter Krempa
Upcoming test bump will cause some changes thus preserve the existing state. Signed-off-by: Peter Krempa --- ...-host-model-fallback-kvm.x86_64-8.1.0.args | 33 ...-host-model-fallback-tcg.x86_64-8.1.0.args | 33 .../cpu-host-model-kvm.x86_64-8.1.0.args

[PATCH 4/6] qemuxml2argvtest: Add complementary 'kvm/tcg' test cases for cpu-host-model*

2023-11-09 Thread Peter Krempa
CPU host model expansion depends on the CPU data from the capabilities and can change based on emulation type. Add complementary tests to the ones we already have to ensure full coverage. Signed-off-by: Peter Krempa --- ...-host-model-fallback-kvm.x86_64-4.2.0.args | 33

Re: [libvirt PATCH] qemu_snapshot: fix snapshot deletion that had multiple children

2023-11-16 Thread Peter Krempa
the correct storage source. > > Fixes: https://gitlab.com/libvirt/libvirt/-/issues/534 > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_snapshot.c | 46 ++-- > 1 file changed, 44 insertions(+), 2 deleti

Re: [libvirt PATCH] qemu_snapshot: fix reverting to inactive snapshot

2023-11-16 Thread Peter Krempa
ame filename as the backing file > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_snapshot.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libv

Re: [PATCH 1/5] domain_validate: Move memdevice address conflict check into a separate function

2023-11-16 Thread Peter Krempa
)). > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_validate.c | 147 ++--- > 1 file changed, 86 insertions(+), 61 deletions(-) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lis

Re: [PATCH 2/5] qemuxml2argvdata: Extend memory-hotplug-virtio-mem-overlap-address.xml

2023-11-16 Thread Peter Krempa
On Mon, Nov 06, 2023 at 12:38:25 +0100, Michal Privoznik wrote: > This test case of qemuxml2argvtest is used to check whether we > correctly identify overlapping memory devices. Well, so far we > consider just virtio-mem and virtio-pmem devices, but this is > about to change and be extended for oth

Re: [PATCH 3/5] virDomainMemoryDefCheckConflict: Check dimm & nvdimm models too

2023-11-16 Thread Peter Krempa
(other->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM) { > +otherStart = other->info.addr.dimm.base; > +} > +break; > case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM: > otherStart = other->target.virtio_pmem.address; &

Re: [PATCH 4/5] virDomainMemoryDefCheckConflict: Validate dimm slot too

2023-11-16 Thread Peter Krempa
On Mon, Nov 06, 2023 at 12:38:27 +0100, Michal Privoznik wrote: > Since we're iterating over def->mems array, might as well check > for dimm slot duplicates. > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_validate.c | 36 +++- > 1 file changed, 23 ins

Re: [PATCH 5/5] qemu_domain: Drop qemuCheckMemoryDimmConflict()

2023-11-16 Thread Peter Krempa
-- > 1 file changed, 37 deletions(-) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH 1/3] conf: Introduce pipewire audio backend

2023-11-16 Thread Peter Krempa
O_TYPE_PIPEWIRE: > +return > virDomainAudioIOPipewireAudioIsEqual(&this->backend.pipewire.input, > + > &that->backend.pipewire.input) && > + > virDomainAudioIOPipewireAudioIsEqual(&this->

Re: [PATCH 2/3] qemu: Generate cmd line for pipewire audio backend

2023-11-16 Thread Peter Krempa
irt/-/issues/560 > Signed-off-by: Michal Privoznik > --- Reviewed-by: Peter Krempa but note I didn't too deeply investigate any potential side effects of the env variable stuff. ___ Devel mailing list -- devel@lists.libvirt.o

Re: [PATCH 3/3] NEWS: Document pipewire audio backend

2023-11-16 Thread Peter Krempa
On Tue, Nov 07, 2023 at 13:55:24 +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > NEWS.rst | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index 08e5a3d04a..f73dd867d5 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -17,6 +17,16 @@

[PATCH] qemu: validate: Reword error message when CCW addresses are not supported for a machine

2023-11-21 Thread Peter Krempa
specific device. Resolves:https://issues.redhat.com/browse/RHEL-16878 Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 93df9e4c8e..2afd7e128a 100644

Re: [libvirt PATCH] security: drop virSecurityDACRestoreImageLabelSingle()

2023-11-21 Thread Peter Krempa
On Tue, Nov 21, 2023 at 16:46:59 +0100, Andrea Bolognani wrote: > It only has a single, trivial caller. > > Signed-off-by: Andrea Bolognani > --- > src/security/security_dac.c | 21 - > 1 file changed, 4 insertions(+), 17 deletions(-) Reviewe

[PATCH 0/3] qemuDomainAttachDeviceDiskLiveInternal: Fix error handling and properly hotplug empty cdroms

2023-11-21 Thread Peter Krempa
Patch 3 is best viewed with '-w' Peter Krempa (3): qemuDomainAttachDeviceDiskLiveInternal: Fix jumps on error qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error qemu: hotplug: Don't try to setup disk image when hotplugging empty

[PATCH 2/3] qemuDomainAttachDeviceDiskLiveInternal: Add missing jump to 'cleanup' on error

2023-11-21 Thread Peter Krempa
Commit allowing hotplug of CDROMs moved the logic forbidding the hotplug to the appropriate blocks based on the disk frontend but forgot to actually bail out on such error. Fixes: 3078799fef82d45ac10624e3bacded7a285d8a4f Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 1 + 1 file

[PATCH 1/3] qemuDomainAttachDeviceDiskLiveInternal: Fix jumps on error

2023-11-21 Thread Peter Krempa
disk images. Fixes: 52f865543920b0cc5ba93f4407c1b2efdffb8ddc Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index fec7c4be4e..2d55d1d21e 100644 --- a/src/qemu/qemu_hotp

[PATCH 3/3] qemu: hotplug: Don't try to setup disk image when hotplugging empty cdrom drive

2023-11-21 Thread Peter Krempa
djusted to deal with empty drives thus attempted to setup the blockdev backend for it. Fixes: 3078799fef82d45ac10624e3bacded7a285d8a4f Resolves: https://issues.redhat.com/browse/RHEL-16870 Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 96 + 1 f

Re: [PATCH 3/3] NEWS: Document pipewire audio backend

2023-11-22 Thread Peter Krempa
On Wed, Nov 22, 2023 at 12:37:58 +0100, Michal Prívozník wrote: > On 11/16/23 14:30, Peter Krempa wrote: > > On Tue, Nov 07, 2023 at 13:55:24 +0100, Michal Privoznik wrote: > >> Signed-off-by: Michal Privoznik > >> --- > >> NEWS.rst | 10 ++

[PATCH 0/2] qemu: block fixes

2023-11-23 Thread Peter Krempa
Few issues I've found while testing the block layer for an upcoming patchset. Peter Krempa (2): qemu: hotplug: Detect disk backing images before setting up security access qemu: block: Don't try to merge bitmaps into 'raw' images src/qemu/qemu_block.c | 10

[PATCH 1/2] qemu: hotplug: Detect disk backing images before setting up security access

2023-11-23 Thread Peter Krempa
. Fixes: 9b8bb536ff999fa61e41869bd98a026b8e23378f Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f197a9d5ff..4e2fc724c0 100644 --- a/src/qemu

[PATCH 2/2] qemu: block: Don't try to merge bitmaps into 'raw' images

2023-11-23 Thread Peter Krempa
persisten bitmaps we can simply skip the operation if the target of a block copy or block commit is a raw image. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index fab122942a

Re: [PATCH 4/5] virDomainMemoryDefCheckConflict: Validate dimm slot too

2023-11-23 Thread Peter Krempa
On Thu, Nov 23, 2023 at 16:06:08 +0100, Michal Prívozník wrote: > On 11/16/23 14:05, Peter Krempa wrote: > > On Mon, Nov 06, 2023 at 12:38:27 +0100, Michal Privoznik wrote: [...] > >> @@ -2244,7 +2246,7 @@ virDomainMemoryDefCheckConflict(const > >> virDomainMemoryDe

Re: [PATCH 3/3] syntax-check: Forbid use of qsort()

2023-11-23 Thread Peter Krempa
On Thu, Nov 23, 2023 at 13:19:00 +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > build-aux/syntax-check.mk | 7 +++ > tools/nss/libvirt_nss.c | 3 ++- > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-ch

[PATCH 0/7] storage_file_probe: Handle qcow2 images with 'protocol' driver name in 'backing file format' field (part 1 - the fix)

2023-11-24 Thread Peter Krempa
See 6/7 and 7/7 for the rationale. Further patches will be posted to refactor the rest of the parsers which are bitrotten. Peter Krempa (7): storage_file_probe: Remove unused state 'BACKING_STORE_ERROR' virStorageFileProbeGetMetadata: Do not partially skip probing of the

[PATCH 1/7] storage_file_probe: Remove unused state 'BACKING_STORE_ERROR'

2023-11-24 Thread Peter Krempa
None of the backing store parser functions actually use it. Remove it to avoid confusion. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 4 1 file changed, 4 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage_file_probe.c

[PATCH 2/7] virStorageFileProbeGetMetadata: Do not partially skip probing of the image

2023-11-24 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage_file_probe.c index c73f533d2d..4cf052c03d 100644 --- a/src/storage_file/storage_file_pr

[PATCH 3/7] storage_file_probe: Remove BACKING_STORE_OK,BACKING_STORE_INVALID states

2023-11-24 Thread Peter Krempa
Replace the return values by 0 because none of the callers care and some of the backing store parser functions return this state also in cases the rest of the code would consider as success. Subsequently the parsers will be refactored and proper error reporting returned. Signed-off-by: Peter

[PATCH 4/7] virstoragetest: Use strings for storage type and format in output data

2023-11-24 Thread Peter Krempa
Make it easier for the humans to read/compare the outputs. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 8 tests/virstoragetestdata/out/directory-dir | 4 ++-- tests/virstoragetestdata/out/directory-none | 4 ++-- tests

[PATCH 5/7] virstoragetest: Format detected/unprocessed backing store format into output files

2023-11-24 Thread Peter Krempa
Compare also the detected format of the backing file ('backingStoreRawFormat' field) into the outptu data for comparison with others. Since the ToString function can't convert VIR_STORAGE_FILE_AUTO use also the numeric value. Signed-off-by: Peter Krempa --- tests/v

[PATCH 6/7] virstoragetest: Add test cases for QCOW2 files with a protocol name as backing file format

2023-11-24 Thread Peter Krempa
sing 'nbd' and 'file' as backing format respectively. (note that '-b raw' refers to the file in the example image folder) To satisfy the test, note that the NBD image is also rejected as we can't probe it, thus such configuration would not work. S

[PATCH 7/7] storage_file_probe: Treat qcow2 images with protocol drivers in backing store field as raw

2023-11-24 Thread Peter Krempa
h cases. The examples added in previous patch show the difference in behaviour. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 8 ++- tests/virstoragetest.c| 2 +- .../out/qcow2-protocol-backing-file | 2 +-

[PATCH 01/17] qemu: block: Introduce qemuBlockStorageSourceGetSliceNodename

2023-11-24 Thread Peter Krempa
The helper retrieves the nodename of the slice layer if it's present. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 23 --- src/qemu/qemu_block.h | 3 +++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_bl

[PATCH 00/17] qemu: Prepare block device setup for removing the 'raw' driver ('raw' driver removal part 3)

2023-11-24 Thread Peter Krempa
ormat field which would break with older versions of libvirt (see my other series). Peter Krempa (17): qemu: block: Introduce qemuBlockStorageSourceGetSliceNodename qemu: block: Use qemuBlockStorageSourceNeedsStorageSliceLayer only for setup qemu: block: Introduce helper for deciding w

[PATCH 02/17] qemu: block: Use qemuBlockStorageSourceNeedsStorageSliceLayer only for setup

2023-11-24 Thread Peter Krempa
qemuBlockStorageSourceDetachPrepare to use the same logic. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index ea1af61561..1a718ae82b 100644 --- a/src/qemu

[PATCH 03/17] qemu: block: Introduce helper for deciding when a 'format' layer is needed

2023-11-24 Thread Peter Krempa
The 'format' layer is not required in certain cases. As the logic for this will be a bit more involved create a helper function to do the decision. For now we'll keep to always format the 'format' -blockdev layer. Signed-off-by: Peter Krempa --- s

[PATCH 04/17] qemuBlockStorageSourceGetBlockdevStorageSliceProps: Allow turning the slice layer into effective blockdev layer

2023-11-24 Thread Peter Krempa
Allow using the slice layer as effective layer once we stop formatting the unnecessary 'raw' driver. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_blo

[PATCH 05/17] qemuBlockStorageSourceAttachPrepareBlockdev: Prepare for optionally missing format layer

2023-11-24 Thread Peter Krempa
ect set of arguments. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index f7e912ece0..749cd9fdac 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qe

[PATCH 06/17] qemuBlockStorageSourceDetachPrepare: Prepare for possibly missing 'format' layer

2023-11-24 Thread Peter Krempa
raw disks. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 749cd9fdac..7137604e36 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_blo

[PATCH 07/17] qemuDomainPrepareStorageSourceBlockdevNodename: Restructure code to allow missing 'format' layer

2023-11-24 Thread Peter Krempa
Similarly to other bits of code, we don't need to setup the format layer if it will not be formatted. Add logic which uses qemuBlockStorageSourceNeedsFormatLayer to see whether the setup of the format node is needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c

[PATCH 08/17] qemuBlockStorageSourceGetEffectiveNodename: Prepare for missing 'format' driver

2023-11-24 Thread Peter Krempa
Return the effective storage nodename if the format layer is not present. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 7137604e36..b7f16b43ae 100644 --- a/src

[PATCH 09/17] qemu: block: Extract logic from qemuBlockReopenReadWrite/ReadOnly

2023-11-24 Thread Peter Krempa
rs will be added. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 62 +-- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index b7f16b43ae..1ef6bf98bc 100644 --- a/src/qemu/qemu_block.c +++

[PATCH 10/17] qemu: block: Absorb logic from qemuBlockReopenFormat to qemuBlockReopenAccess

2023-11-24 Thread Peter Krempa
Move all the logic into the new function and remove the old one. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 60 +++ 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 1ef6bf98bc

[PATCH 11/17] qemu: monitor: Sanitize arguments of qemuMonitorBlockdevReopen

2023-11-24 Thread Peter Krempa
be cleaned up. Also note that the logging of the node name never worked as the top level object didn't ever contain a 'node-name' property. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c| 8 +--- src/qemu/qemu_monitor.c | 7 ++- src/qemu/q

[PATCH 12/17] testQemuMonitorJSONBlockdevReopen: Don't use qemuBlockReopenFormatMon

2023-11-24 Thread Peter Krempa
Use the low level monitor API directly to test the QMP wrapper itself. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 6293b416bd..d9ebb429e7

[PATCH 13/17] qemu: block: Absorb qemuBlockReopenFormatMon into qemuBlockReopenAccess

2023-11-24 Thread Peter Krempa
Move all the code into the now only caller. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 31 +-- src/qemu/qemu_block.h | 5 - 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index

[PATCH 15/17] qemuMigrationSrcNBDCopyCancel: Use qemuBlockStorageSourceAttachRollback to detach migration NBD blockdevs

2023-11-24 Thread Peter Krempa
migration QMP commands and objects we need to strip it's alias from the definition of the storage source before attempting to detach it. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src

[PATCH 16/17] qemu: block: Remove unused qemuBlockStorageSourceDetachOneBlockdev

2023-11-24 Thread Peter Krempa
The only caller was converted to use the common blockdev infrastructure thus this function is no longer needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 34 -- src/qemu/qemu_block.h | 5 - 2 files changed, 39 deletions(-) diff --git a/src

[PATCH 17/17] qemuMigrationSrcNBDStorageCopyBlockdevPrepareSource: Don't setup 'raw' layer for migration NBD connection

2023-11-24 Thread Peter Krempa
The raw driver layer is not needed in this case and can be dropped. Removing the nodename will cause other pieces of the code to pick up and stop addign the layer. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu

[PATCH 14/17] qemuBlockReopenAccess: prepare for removal of 'raw' format layer

2023-11-24 Thread Peter Krempa
Make the helper reopening a blockdev for access pick the correct layer to reopen based on what is currently in use. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu

Re: [libvirt PATCH v2 02/15] schema: consolidate RNG for all hostdev elements

2023-11-27 Thread Peter Krempa
++ > src/conf/schemas/network.rng | 10 +- > src/conf/schemas/networkport.rng | 10 +- > 4 files changed, 94 insertions(+), 112 deletions(-) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH v2 03/15] conf: move/rename hostdev PCI driver type enum to device_conf.h

2023-11-27 Thread Peter Krempa
backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT) { > +virDeviceHostdevPCIDriverType driverType > += dev->source.subsys.u.pci.backend; ditto > + > +if (driverType == VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_VFIO || > +driverType == > VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_DEFAULT) { > needsVfio = true; > } Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH v2 04/15] conf: normalize hostdev parsing to simplify adding new attr

2023-11-27 Thread Peter Krempa
rtdef.h > +++ b/src/conf/virnetworkportdef.h > @@ -69,7 +69,7 @@ struct _virNetworkPortDef { > } direct; > struct { > virPCIDeviceAddress addr; /* PCI Address of device */ > -int driver; /* virNetworkForwardDriverNameType */ > +unsigned int driver; /* virNetworkForwardDriverNameType */ Use the proper enum type here. Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH v2 05/15] conf: put hostdev PCI backend into a struct

2023-11-27 Thread Peter Krempa
VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_XEN: > -virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("Unexpected PCI backend 'xen'")); > -break; > - Falling through to virReportEnumRangeError from such ca

Re: [libvirt PATCH v2 06/15] conf: use virDeviceHostdevPCIDriverInfo in network and networkport objects

2023-11-27 Thread Peter Krempa
eString(&driverAttrBuf, " name='%s'", > - > virNetworkForwardDriverNameTypeToString( > - def->plug.hostdevpci.driver)); > + virDeviceHostdevPCIDriverTypeToString( > + def->plug.hostdevpci.driver.type)); > } > > virXMLFormatElement(buf, "driver", &driverAttrBuf, NULL); > diff --git a/src/conf/virnetworkportdef.h b/src/conf/virnetworkportdef.h > index bfe1dae9ea..9e51ab1a8b 100644 > --- a/src/conf/virnetworkportdef.h > +++ b/src/conf/virnetworkportdef.h > @@ -22,6 +22,8 @@ > #pragma once > > #include "internal.h" > +#include "virconftypes.h" > +#include "device_conf.h" > #include "virnetdevvlan.h" > #include "virnetdevvportprofile.h" > #include "virnetdevbandwidth.h" > @@ -69,7 +71,7 @@ struct _virNetworkPortDef { > } direct; > struct { > virPCIDeviceAddress addr; /* PCI Address of device */ > -unsigned int driver; /* virNetworkForwardDriverNameType */ > +virDeviceHostdevPCIDriverInfo driver; You can ignore my earlier comment about this. Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH v2 07/15] conf: split out hostdev parse/format to their own functions

2023-11-27 Thread Peter Krempa
ver) > +{ > +g_auto(virBuffer) driverAttrBuf = VIR_BUFFER_INITIALIZER; > + > +if (driver->type != VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_DEFAULT) { > +const char *driverType > + = virDeviceHostdevPCIDriverTypeToString(driver->type); -||- Reviewed-by: Peter Krem

Re: [libvirt PATCH v2 08/15] conf: use new common parser/formatter for hostdev driver in network XML

2023-11-27 Thread Peter Krempa
networkportdef.c | 21 ++--- > 2 files changed, 10 insertions(+), 35 deletions(-) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH v2 09/15] tests: remove explicit from hostdev test cases

2023-11-27 Thread Peter Krempa
ocumentation that seems to mention it: docs/formatdomain.rst: docs/formatnetwork.rst: docs/formatnetworkport.rst: docs/pci-addresses.rst: 3) You are not leaving any example with the existing syntax. To prevent regression, either keep some in or create a specific new test ca

Re: [libvirt PATCH v2 10/15] xen: explicitly set hostdev driver.type at runtime, not in postparse

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:55 -0500, Laine Stump wrote: > Xen only supports a single type of PCI hostdev assignment, so it is > superfluous to have peppered throughout the > config. It *is* necessary to have the driver type explicitly set in > the hosdev object before calling into the hyperviso

Re: [libvirt PATCH v2 11/15] conf: replace virHostdevIsVFIODevice with virHostdevIsPCIDevice

2023-11-27 Thread Peter Krempa
.h | 4 ++-- > src/hypervisor/virhostdev.c | 8 > src/hypervisor/virhostdev.h | 2 -- > src/libvirt_private.syms| 5 ++--- > src/qemu/qemu_domain.c | 6 +++--- > src/qemu/qemu_hostdev.c | 2 +- > src/qemu/qemu_hotplug.c | 2 +- > 8 files

Re: [PATCH 1/2] Report first tried socket from remoteProbeSystemDriverFromSocket

2023-11-28 Thread Peter Krempa
7; here ... > + > VIR_DEBUG("Missing sock %s for driver %s", sockname, drivers[i]); ... and here it's still used. For making the code future proof, it'll be most likely better to simply copy the string instead of rearr

Re: [PATCH 1/2] Report first tried socket from remoteProbeSystemDriverFromSocket

2023-11-28 Thread Peter Krempa
On Tue, Nov 28, 2023 at 14:04:12 +0100, Peter Krempa wrote: > On Tue, Nov 28, 2023 at 13:02:39 +0100, Martin Kletzander wrote: > > This will improve an error message later on. > > > > Signed-off-by: Martin Kletzander > > --- > > src/remote/remote_daemon_d

Re: [PATCH 2/2] Report better error message in remoteGetUNIXSocket

2023-11-28 Thread Peter Krempa
On Tue, Nov 28, 2023 at 13:22:47 +, Daniel P. Berrangé wrote: > On Tue, Nov 28, 2023 at 01:02:40PM +0100, Martin Kletzander wrote: > > Before this patch users might be confused with the error when no daemon > > nor systemd socket unit is running due to the error message being a bit > > vague wh

Re: [libvirt PATCH v2 12/15] conf: support manually specifying VFIO variant driver in XML

2023-11-28 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:57 -0500, Laine Stump wrote: > This patch makes it possible to manually specify which VFIO variant > driver to use for PCI hostdev device assignment, so that, e.g. you > could force use of the generic vfio-pci driver with > > > > when libvirt would have normally (

Re: [libvirt PATCH v2 14/15] tests: mock virPCIDevice(BindTo|UnbindFrom)Stub with nop functions

2023-11-28 Thread Peter Krempa
PCIDeviceBindToStub(virPCIDevice *dev); > + You need to use G_NO_INLINE with any function to be mocked > void virPCIDeviceSetManaged(virPCIDevice *dev, > bool managed); > bool virPCIDeviceGetManaged(virPCIDevice *dev); Reviewed-by: Peter Krempa ___

Re: [libvirt PATCH v2 15/15] qemu: automatically bind to a vfio variant driver, if available

2023-11-28 Thread Peter Krempa
return 0; > +} > + > + > +#else /* __linux__ */ > + > + > +static int > +virPCIDeviceFindBestVFIOVariant(virPCIDevice *dev G_GNUC_UNUSED, > +char **moduleName G_GNUC_UNUSED) > +{ > +virReportSystemError(ENOSYS, "%s",

Re: [libvirt PATCH v2 13/15] util: new function virStringSkipToSpace()

2023-11-28 Thread Peter Krempa
il/virstring.c | 17 + > src/util/virstring.h | 1 + > 3 files changed, 19 insertions(+) Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [RFC v2: vf-token 2/7] qemu: vf-token capability

2023-11-30 Thread Peter Krempa
Please change the subject/summary to: qemu: capabilities: Introduce QEMU_CAPS_VFIO_VFTOKEN capability On Wed, Nov 29, 2023 at 21:07:22 -0700, Vivek Kashyap wrote: > Introduce qemu capability for vf-token > > Signed-off-by: Vivek Kashyap > --- > src/qemu/qemu_capabilities.c | 3 +++ > src/qemu/

Re: [RFC v2: vf-token 4/7] conf: vf-token parsing and formatting

2023-11-30 Thread Peter Krempa
On Wed, Nov 29, 2023 at 21:07:24 -0700, Vivek Kashyap wrote: > XML parsing and formatting of vf-token attribute > > Signed-off-by: Vivek Kashyap > --- > src/conf/device_conf.c | 32 ++-- > src/conf/device_conf.h | 3 +++ > src/conf/domain_conf.c

Re: [RFC v2: vf-token 5/7] conf: test cases

2023-11-30 Thread Peter Krempa
On Wed, Nov 29, 2023 at 21:07:25 -0700, Vivek Kashyap wrote: > Add related test cases > > Signed-off-by: Vivek Kashyap > Signed-off-by: Ciara Loftus > --- > .../qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 + > .../caps_8.1.0_x86_64.xml | 1 + > .../caps_8.2.0_x86_64.xml

Re: [RFC v2: vf-token 6/7] qemu: validate & generate command line

2023-11-30 Thread Peter Krempa
On Wed, Nov 29, 2023 at 21:07:26 -0700, Vivek Kashyap wrote: > Introduce a validation function for vf-token support in qemu > and generate vf-token device attribute in qemu command line > > Signed-off-by: Vivek Kashyap > --- > src/qemu/qemu_command.c | 13 + > src/qemu/qemu_validate

Re: [RFC v2: vf-token 7/7] doc: doc and news

2023-11-30 Thread Peter Krempa
On Wed, Nov 29, 2023 at 21:07:27 -0700, Vivek Kashyap wrote: > Update documentation and information about vf-token > > Signed-off-by: Vivek Kashyap > --- > NEWS.rst | 8 > docs/formatdomain.rst | 4 > 2 files changed, 12 insertions(+) > > diff --git a/NEWS.rst b/NEWS.

Re: [RFC v2: vf-token 4/7] conf: vf-token parsing and formatting

2023-11-30 Thread Peter Krempa
On Thu, Nov 30, 2023 at 09:36:00 +0100, Peter Krempa wrote: > On Wed, Nov 29, 2023 at 21:07:24 -0700, Vivek Kashyap wrote: > > XML parsing and formatting of vf-token attribute > > > > Signed-off-by: Vivek Kashyap > > --- > > src

Re: [RFC v2: vf-token 7/7] doc: doc and news

2023-11-30 Thread Peter Krempa
On Thu, Nov 30, 2023 at 09:45:30 +0100, Peter Krempa wrote: > On Wed, Nov 29, 2023 at 21:07:27 -0700, Vivek Kashyap wrote: > > Update documentation and information about vf-token > > > > Signed-off-by: Vivek Kashyap > > --- > > NEWS.rst | 8 ++

Re: [PATCH 2/2] Report better error message in remoteGetUNIXSocket

2023-11-30 Thread Peter Krempa
On Thu, Nov 30, 2023 at 09:49:56 +0100, Martin Kletzander wrote: > On Wed, Nov 29, 2023 at 06:33:54PM +, Richard W.M. Jones wrote: > > > > Can we have the error message include a link to this page? > > https://wiki.libvirt.org/Failed_to_connect_to_the_hypervisor.html > > > > I think we could

[PATCH for 9.9.0] qemuProcessStartWithMemoryState: Don't start qemu with '-loadvm SNAP' and '-incoming defer' together

2023-12-01 Thread Peter Krempa
430e528d3e5e8d6455ded4d1d Resolves: https://issues.redhat.com/browse/RHEL-17841 Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f32e82bbd1..fc05b4b24f 100644 --- a/src/

[PATCH] NEWS: Mention image probing, snaphsot and hotplug fixes

2023-12-01 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index f12734c2a1..9739bcdc36 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -24,8 +24,30 @@ v9.10.0 (unreleased) * **Improvements** + * Adapt to qemu's u

Re: [PATCH rfcv3 00/11] LIBVIRT: X86: TDX support

2023-12-04 Thread Peter Krempa
On Mon, Dec 04, 2023 at 10:28:17 +, Daniel P. Berrangé wrote: > On Mon, Dec 04, 2023 at 03:38:30AM +, Duan, Zhenzhong wrote: > > > > > > >-Original Message- > > >From: Jonathon Jongsma > > >Sent: Saturday, December 2, 2023 6:30 AM > > >Subject: Re: [PATCH rfcv3 00/11] LIBVIRT: X8

[PATCH 0/2] qemu: migration fixes

2023-12-05 Thread Peter Krempa
Peter Krempa (2): qemu: migration: Validate migration XML virsh: migrate: Interlock '--copy-storage-all' and '--copy-storage-inc' src/qemu/qemu_migration.c | 9 +++-- tools/virsh-domain.c | 1 + 2 files changed, 4 insertions(+), 6 dele

[PATCH 1/2] qemu: migration: Validate migration XML

2023-12-05 Thread Peter Krempa
fixes problems such as if the user uses a relative path in the disk source or omits the source, as the disk migration code reasonably expects that all checks were performed. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --

[PATCH 2/2] virsh: migrate: Interlock '--copy-storage-all' and '--copy-storage-inc'

2023-12-05 Thread Peter Krempa
The API treats them as mutually exclusive and interlocks them at the library handler. Provide better error in virsh. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 66f933dead..afb8c401da

[RFC PATCH 1/5] [DO NOT PUSH] update qemu capabilities for 'backing-mask-protocol'

2023-12-05 Thread Peter Krempa
The feature is not yet in qemu and will not make it into 8.2. --- .../caps_8.2.0_x86_64.replies | 21 ++- .../caps_8.2.0_x86_64.xml | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x

[RFC PATCH 0/5] qemu: Stop using 'raw' driver when not needed

2023-12-05 Thread Peter Krempa
This patchset is RFC as it requires qemu patches to preserve format inside the 'backing file format' field, or we could break qcow2 images for older libvirt. The main rationale is documented in 5/5. Peter Krempa (5): [DO NOT PUSH] update qemu capabilities for 'backing-mask-p

[RFC PATCH 2/5] qemu: capabilities: Introduce QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL

2023-12-05 Thread Peter Krempa
lity of images after a block-commit or block-pull libvirt operation with older libvirt versions in case when we'll want to remove the unneded 'raw' format drivers from the block graph. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 5

[RFC PATCH 4/5] qemu: block: Always add extra 'raw' layer for storage slice

2023-12-05 Thread Peter Krempa
oved within the same release we can do it in steps. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 36 ++- .../disk-slices.x86_64-latest.args| 6 ++-- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_blo

[RFC PATCH 3/5] qemu: monitor: Use 'backing-mask-protocol' for blockjobs when available

2023-12-05 Thread Peter Krempa
Store whether qemu supports the appropriate option for block-stream and block-commit commands and always use it if available. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor_json.c | 10 ++ src/qemu/qemu_monitor_priv.h | 2 ++ 3 files changed

[PATCH] virsh: migrate: Fix logic bug in interlock of --copy-storage-synchronous-writes flag

2023-12-05 Thread Peter Krempa
As the error message states we want to check that one of '--copy-storage-all' or '--copy-storage-inc' is used, but the condition mentioned VIR_MIGRATE_NON_SHARED_DISK twice. Fixes: 1c2bd205edd Resolves: https://issues.redhat.com/browse/RHEL-17596 Signed-off-by: Peter Krem

Re: [PATCH] network: fix check in virNetworkLoadConfig

2023-12-06 Thread Peter Krempa
On Wed, Dec 06, 2023 at 21:30:59 +0300, Anastasia Belova wrote: > virFileLinkPointsTo return non-zero value on fail. This value > may be positive or negative, so check should be != 0. This statement is not true: #define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).s

[PATCH 0/3] nodedev: Storage device size fixes

2023-12-07 Thread Peter Krempa
Peter Krempa (3): virNodeDeviceCapStorageDefFormat: Don't check argument for virBufferEscapeString virNodeDeviceCapStorageDefFormat: Extract formatting of block size data virNodeDeviceCapStorageDefFormatBlocksize: Report sector size and count together src

[PATCH 1/3] virNodeDeviceCapStorageDefFormat: Don't check argument for virBufferEscapeString

2023-12-07 Thread Peter Krempa
virBufferEscapeString is specifically designed for formatting XMLs and thus skips the whole formatting if the singular string argument is NULL. Remove redundant conditions. Signed-off-by: Peter Krempa --- src/conf/node_device_conf.c | 29 - 1 file changed, 8

[PATCH 2/3] virNodeDeviceCapStorageDefFormat: Extract formatting of block size data

2023-12-07 Thread Peter Krempa
Unfortunately the XML is designed in a weird way, where based on whether media in the device is removable the sizing is either part of a subelement or placed directly on top level. The logic itself is identical so it can be extracted into a function to simplify the formatter. Signed-off-by: Peter

  1   2   3   4   5   6   7   8   9   10   >