Re: [PATCH 17/31] util: virPCIVPDResourceUpdateKeyword: Remove impossible checks

2024-01-30 Thread Ján Tomko
On a Tuesday in 2024, Peter Krempa wrote: All callers satisfy these callers as they are just for programming s/callers/checks/? or conditions? errors. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 19 --- 1 file changed, 19 deletions(-) Reviewed-by: Ján Tomko Ja

Re: [PATCH 07/31] Don't overwrite error message from 'virXPathNodeSet'

2024-01-30 Thread Ján Tomko
On a Tuesday in 2024, Peter Krempa wrote: 'virXPathNodeSet' returns -1 only when 'ctxt' or 'xpath' are NULL or when the 'xpath' string is invalid. Both are programmign errors. It *programming doesn't make sense for the code to overwrite the error message for anything supposedly more relevant.

Re: [PATCH v2] meson: Adjust -fstack-protector use

2024-01-30 Thread Ján Tomko
On a Tuesday in 2024, Andrea Bolognani wrote: Back in 2014, -fstack-protector was reported not to work on aarch64, so fe881ae086ec disabled it on that target. OS-wise, its use is currently limited to just Linux, FreeBSD and Windows. Looking at the situation today, it seems that whatever issue wa

Re: [libvirt PATCH V2 0/4] add loongarch support for libvirt

2024-01-30 Thread lixianglai
Hi Philippe:     When developing libvirt on loongarch, we encountered some problems related to pflash. libvirt and qemu met some difficulties in the coordination of UEFI loading. I think we need your suggestions and opinions on the solution. Anyway, I fetched and installed this. The firmwa

Re: [PATCH] apparmor: Add user session path for PID and socket files used by passt

2024-01-30 Thread Jim Fehlig
On 1/30/24 11:55, Andrea Bolognani wrote: On Tue, Jan 30, 2024 at 10:47:54AM -0800, Andrea Bolognani wrote: On Tue, Jan 30, 2024 at 07:15:51PM +0100, Stefano Brivio wrote: Commit 7a39b04d683f ("apparmor: Enable passt support") grants passt(1) read-write access to /{,var/}run/libvirt/qemu/passt/

[PATCH 2/2] ch: Check for hypervisor while starting guests

2024-01-30 Thread Praveen K Paladugu
While initializing ch driver, confirm either /dev/kvm or /dev/mshv device is present. Before starting domains, validate the requested hypervisor device exists on the host. Users can specify hypervisor in ch guests's domain definitions like below: _or_ Signed-off-by: Praveen K Paladugu ---

[PATCH 0/2] Introduce mshv Hypervisor type.

2024-01-30 Thread Praveen K Paladugu
These patches introduce 'mshv' hypervisor type and check for the hypervisor device on host while starting ch guests. Praveen K Paladugu (2): conf: Introduce mshv hypervisor type ch: Check for hypervisor while starting guests src/ch/ch_conf.c| 2 ++ src/ch/ch_driver.c | 7 +

[PATCH 1/2] conf: Introduce mshv hypervisor type

2024-01-30 Thread Praveen K Paladugu
This hypervisor type is available on a host running Microsoft Hypervisor and Linux as the Dom0. The Dom0 should load "mshv" drivers to expose the hypervisor device to userspace. Cloud-Hypervisor supports running guests on Linux Hosts with mshv as the hypervisor. Signed-off-by: Praveen K Paladugu

Re: Re: [PATCH] apparmor: Add user session path for PID and socket files used by passt

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 10:47:54AM -0800, Andrea Bolognani wrote: > On Tue, Jan 30, 2024 at 07:15:51PM +0100, Stefano Brivio wrote: > > Commit 7a39b04d683f ("apparmor: Enable passt support") grants > > passt(1) read-write access to /{,var/}run/libvirt/qemu/passt/* if > > started by the libvirt daem

Re: Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 06:31:11PM +0100, Michal Prívozník wrote: > On 1/30/24 18:04, Andrea Bolognani wrote: > > On Tue, Jan 30, 2024 at 05:36:03PM +0100, Peter Krempa wrote: > >> On Tue, Jan 30, 2024 at 07:42:10 -0800, Andrea Bolognani wrote: > >>> Any chance either of you could look at the other

[PATCH v2] meson: Adjust -fstack-protector use

2024-01-30 Thread Andrea Bolognani
Back in 2014, -fstack-protector was reported not to work on aarch64, so fe881ae086ec disabled it on that target. OS-wise, its use is currently limited to just Linux, FreeBSD and Windows. Looking at the situation today, it seems that whatever issue was affecting aarch64 a decade ago has been resolv

Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Michal Prívozník
On 1/30/24 18:04, Andrea Bolognani wrote: > On Tue, Jan 30, 2024 at 05:36:03PM +0100, Peter Krempa wrote: >> On Tue, Jan 30, 2024 at 07:42:10 -0800, Andrea Bolognani wrote: >>> Any chance either of you could look at the other patch[1] as well? >>> The connection to alpha is sort of tangential in th

Re: [PATCH v2 5/5] ch: Enable ETHERNET Network mode support

2024-01-30 Thread Michal Prívozník
On 1/16/24 22:25, Praveen K Paladugu wrote: > enable VIR_DOMAIN_NET_TYPE_ETHERNET network support for ch guests. > > Tested with following interface config: > > > > > > > > Signed-off-by: Praveen K Paladugu > --- > po/POTFILES | 1 + > src/ch/ch_conf.

Re: [PATCH v2 3/5] util: Add util methods required by ch networking

2024-01-30 Thread Michal Prívozník
On 1/16/24 22:25, Praveen K Paladugu wrote: > virSocketSendMsgWithFDs method send fds along with payload using > SCM_RIGHTS. virSocketRecv method polls, receives and sends the response > to callers. > > These methods are required to add network suppport in ch driver. > > Signed-off-by: Praveen K

Re: [PATCH v2 0/5] Initial network support in ch driver.

2024-01-30 Thread Michal Prívozník
On 1/16/24 22:25, Praveen K Paladugu wrote: > v2: > * Refactor virSocketRecvHttpResponse to return responses without parsing http > responses. > * Use errno to report errors in virsocket.c > * Address WIN32 build failure in virsocket.c > * Fix code indentations > > Praveen K Paladugu (5): > co

[PATCH 31/31] virPCIVPDParse: Do reasonable error reporting

2024-01-30 Thread Peter Krempa
Remove the wannabe error reporting via 'VIR_DEBUG/VIR_INFO' in favor of proper errors. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index

[PATCH 30/31] virPCIVPDParseVPDLargeResourceFields: Report proper errors

2024-01-30 Thread Peter Krempa
The code abused 'VIR_INFO' as an attempt at error reporting. Rework the code to return the usual 0/-1 and raise proper errors. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 67 +++- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/s

[PATCH 24/31] virPCIVPDReadVPDBytes: Refactor error handling

2024-01-30 Thread Peter Krempa
Each caller was checking that the function read as many bytes as it expected. Move the check inside virPCIVPDReadVPDBytes and make it report a proper error rather than just a combination of VIR_DEBUG inside the function and a random VIR_INFO in the caller. Signed-off-by: Peter Krempa --- src/uti

[PATCH 29/31] virPCIVPDParseVPDLargeResourceFields: Refactor return logic

2024-01-30 Thread Peter Krempa
Rewrite the conditions after exiting the parser so that they are easier to understand. This partially decreases the granularity of "error" messages as they are not strictly necessary albeit for debugging. As it was already observed in this code the logic itself often does something else than the c

[PATCH 27/31] virPCIVPDParseVPDLargeResourceFields: Remove impossible 'default' swithch case

2024-01-30 Thread Peter Krempa
The 'fieldFormat' variable is guaranteed to have only the proper enum values by virPCIVPDResourceGetFieldValueFormat. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index ba05014e40..25c4c2c5e

[PATCH 28/31] virPCIVPDParseVPDLargeResourceFields: Refactor processing of read data

2024-01-30 Thread Peter Krempa
Use a 'switch' statement instead of a bunch of if/elseif statements. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 66 +--- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index 25c4c2c5e

[PATCH 26/31] virPCIVPDParseVPDLargeResourceFields: Merge logic conditions

2024-01-30 Thread Peter Krempa
Merge the pre-checks with the 'switch' statement which is operating on the same values to simplify further refactoring. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/util/virpcivpd.c b/src/u

[PATCH 25/31] virPCIVPDParseVPDLargeResourceString: Properly report errors

2024-01-30 Thread Peter Krempa
Replace VIR_INFO being used as form of error reporting with proper virReportError and the usual return values. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd

[PATCH 20/31] util: virpcivpd: Remove return value from virPCIVPDResourceUpdateKeyword

2024-01-30 Thread Peter Krempa
The function always succeeded and after the removal of programing error checks doesn't even have a 'return false' case. Additionally one of the tests in 'virpcivpdtest' tested that this function never failed on wrong data. Embrace this logic and remove the return value and adjust logging to VIR_DEB

[PATCH 23/31] virPCIDeviceGetVPD: Handle errors in callers

2024-01-30 Thread Peter Krempa
Until now 'virPCIDeviceGetVPD' couldn't reallistically raise an error, but that will change. Handle the errors by either resetting it if we'd be ignoring it or forward it. Signed-off-by: Peter Krempa --- src/conf/node_device_conf.c | 2 ++ tests/virpcitest.c | 3 ++- 2 files changed, 4

[PATCH 22/31] virPCIDeviceGetVPD: Fix multiple error handling bugs

2024-01-30 Thread Peter Krempa
- fix passing of 'errno' to 'virReportSystemError' The 'open' syscall returns '-1' and sets 'errno' on failure. The code passed '-fd' as 'errno' rather than errno itself, thus always reporting EPERM. - don't overwrite errors when closing FD Use VIR_AUTOCLOSE to avoid overwriting the errors f

[PATCH 21/31] virPCIDeviceHasVPD: Refactor "debug" messages

2024-01-30 Thread Peter Krempa
A checker function should not raise VIR_INFO or VIR_WARN messages especially if they contain information useful only for debugging. Turn the message into a VIR_DEBUG with universal meaning. Signed-off-by: Peter Krempa --- src/util/virpci.c | 15 +-- 1 file changed, 5 insertions(+),

[PATCH 07/31] Don't overwrite error message from 'virXPathNodeSet'

2024-01-30 Thread Peter Krempa
'virXPathNodeSet' returns -1 only when 'ctxt' or 'xpath' are NULL or when the 'xpath' string is invalid. Both are programmign errors. It doesn't make sense for the code to overwrite the error message for anything supposedly more relevant. The majority of calls to 'virXPathNodeSet' already didn't d

[PATCH 18/31] conf: node_device: Refactor 'virNodeDeviceCapVPDParseCustomFields' to fix error reporting

2024-01-30 Thread Peter Krempa
The errors raised in virNodeDeviceCapVPDParseCustomFields were actually ignored by continuing the parse rather than raised. Rather than just replace 'continue' by 'return -1' this patch refactors the whole parser to simplify it as well as report reasonable errors. Parsing of individual fields is

[PATCH 19/31] virNodeDeviceCapVPDParseXML: Fix error reporting

2024-01-30 Thread Peter Krempa
Don't overwrite already reported errors and improve parsing of attributes. Signed-off-by: Peter Krempa --- src/conf/node_device_conf.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 0f2c3

[PATCH 17/31] util: virPCIVPDResourceUpdateKeyword: Remove impossible checks

2024-01-30 Thread Peter Krempa
All callers satisfy these callers as they are just for programming errors. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index f198faaf42..3beb405252 100644 --- a/src/util/v

[PATCH 16/31] virpcivpdtest: testPCIVPDResourceBasic: Remove tests for uninitialized 'ro'/'rw' section

2024-01-30 Thread Peter Krempa
This is a synthetic case which tests the behaviour if the 'ro' or 'rw' struct members are uninitialized, basically excercising only a pointless programming-error NULL check in 'virPCIVPDResourceUpdateKeyword' as real usage does always pass a proper pointer. Signed-off-by: Peter Krempa --- tests/

[PATCH 15/31] conf: virNodeDeviceCapVPDParse*: Remove pointless NULL checks

2024-01-30 Thread Peter Krempa
The function are never called with NULL argument so the checks can be removed. Signed-off-by: Peter Krempa --- src/conf/node_device_conf.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index dd174d3020..d7e1a23034 100644 --- a/

[PATCH 14/31] util: virpcivpd: Remove return value from virPCIVPDResourceCustomUpsertValue

2024-01-30 Thread Peter Krempa
None of the callers pass NULL, so the NULL check is pointless. Remove it an remove the return value. The function is exported only for use in 'virpcivpdtest' thus marking the arguments as NONNULL is unnecessary. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 18 -- s

[PATCH 12/31] util: virpcivpd: Unexport 'virPCIVPDParseVPDLargeResourceString'

2024-01-30 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virpcivpd.c | 14 +- src/util/virpcivpdpriv.h | 3 --- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 89b0d01de6..035f8c7b5d 100644

[PATCH 13/31] virPCIVPDResourceGetKeywordPrefix: Fix logging

2024-01-30 Thread Peter Krempa
Use VIR_DEBUG instead of VIR_INFO as that's more appropriate and report relevant information for debugging. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index

[PATCH 11/31] tests: virpcivpd: Remove 'testVirPCIVPDParseVPDStringResource' case

2024-01-30 Thread Peter Krempa
The test case excercises 'virPCIVPDParseVPDLargeResourceString' which is also tested by other cases which parse the whole VPD block. Remove the specific test case as it's not adding any additional value. Signed-off-by: Peter Krempa --- tests/virpcivpdtest.c | 38 -

[PATCH 10/31] util: pcivpd: Unexport virPCIVPDParseVPDLargeResourceFields

2024-01-30 Thread Peter Krempa
The function is not used in other files. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virpcivpd.c | 15 +-- src/util/virpcivpdpriv.h | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_privat

[PATCH 09/31] util: virpcivpd: Unexport 'virPCIVPDReadVPDBytes'

2024-01-30 Thread Peter Krempa
The function is no longer used outside of virpcivpd.c Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virpcivpd.c | 14 +- src/util/virpcivpdpriv.h | 3 --- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/libvirt_private.syms b/src/li

[PATCH 08/31] tests: virpcivpdtest: Remove 'testVirPCIVPDReadVPDBytes' case

2024-01-30 Thread Peter Krempa
The case checks only the 'virPCIVPDReadVPDBytes' which is also tested multiple times via 'virPCIVPDParse' as it's used to read the data, thus having a special case for this is pointless. Signed-off-by: Peter Krempa --- tests/virpcivpdtest.c | 41 - 1 file

[PATCH 06/31] tests: Test the previously mishandled PCI VPD characters

2024-01-30 Thread Peter Krempa
Modify the test data to validate '<>' and other characters. Unfortunately the test suite doesn't have a proper end-to-end test, thus we just add a XML->XML variant and also add data to the binary parser. Signed-off-by: Peter Krempa --- tests/nodedevschemadata/pci__42_00_0_vpd.xml | 4 ++-- t

[PATCH 05/31] schema: nodedev: Adjust allowed characters in 'vpdFieldValueFormat'

2024-01-30 Thread Peter Krempa
The check in 'virPCIVPDResourceIsValidTextValue' allows any printable characters, thus the XML schema should do the same. Signed-off-by: Peter Krempa --- src/conf/schemas/nodedev.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/schemas/nodedev.rng b/src/conf/schem

[PATCH 04/31] virNodeDeviceCapVPDFormat: Properly escape system-originated strings

2024-01-30 Thread Peter Krempa
Similarly to previous commit other specific fields which come from the system data and aren't sanitized enough to be safe for XML were also formatted via virBufferAsprintf. Other static and safe strings used virBufferEscapeString instead of virBufferAddLit. Signed-off-by: Peter Krempa --- src/c

[PATCH 03/31] virNodeDeviceCapVPDFormatCustom*: Escape unsanitized strings

2024-01-30 Thread Peter Krempa
The custom field data is taken from PCI device data which can contain any printable characters, and thus must be escaped when putting into XML. Originally, based on the comment and XML schema which was fixed in previous commits the idea seemed to be that the parser would validate that only charact

[PATCH 02/31] util: pcivpd: Refactor virPCIVPDResourceIsValidTextValue

2024-01-30 Thread Peter Krempa
The function is never called with NULL argument. Remove the check and refactor the rest including the debug statement. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util

[PATCH 01/31] virPCIVPDResourceIsValidTextValue: Adjust comment to reflect actual code

2024-01-30 Thread Peter Krempa
The function does not reject '&', '<', '>' contrary to what it actually states. Move and adjust the comment. Signed-off-by: Peter Krempa --- src/util/virpcivpd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/virpcivpd.c b/src/util/virpcivpd.c index 395

[PATCH 00/31] pci vpd: Fix broken XML formatter and refactor questionable error reporting

2024-01-30 Thread Peter Krempa
The first part of the series fixes the XML formatter of nodedevs to not generate invalid XML if a PCI device custom field contains '>' which would be printed unescaped The rest fixes questionable and broken error reporting from the pci vpd device code which actually parses the above data. https:

Re: Re: Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 05:36:03PM +0100, Peter Krempa wrote: > On Tue, Jan 30, 2024 at 07:42:10 -0800, Andrea Bolognani wrote: > > Any chance either of you could look at the other patch[1] as well? > > The connection to alpha is sort of tangential in that case, what's > > more important is that we

[PATCH 1/3] tests: Add controller-scsi-auto

2024-01-30 Thread Andrea Bolognani
The "auto" SCSI controller model was introduced for use in the ESX driver, but the QEMU driver doesn't reject the value. Add a test case showing the behavior when such a configuration is encountered. Signed-off-by: Andrea Bolognani --- .../controller-scsi-auto.x86_64-latest.args | 32

[PATCH 3/3] qemu: Use virDomainControllerDefNew() more

2024-01-30 Thread Andrea Bolognani
Instead of open-coding a partial version of it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 137904034d..0f7ffb6506 100644 --- a/src/qemu/qemu_hotplug.c

[PATCH 2/3] qemu: Handle MODEL_SCSI_{AUTO,DEFAULT} appropriately

2024-01-30 Thread Andrea Bolognani
The qemuDomainGetSCSIControllerModel() function, which is responsible for choosing a model for a SCSI controller that didn't have one provided by the user, considers values >0 to mean "model has been set". Since MODEL_SCSI_AUTO == 0, this means that such a value is considered the same as MODEL_SCS

[PATCH 0/3] qemu: Improvements related to MODEL_SCSI_AUTO

2024-01-30 Thread Andrea Bolognani
Andrea Bolognani (3): tests: Add controller-scsi-auto qemu: Handle MODEL_SCSI_{AUTO,DEFAULT} appropriately qemu: Use virDomainControllerDefNew() more src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_domain_address.c| 4 +-- src/qemu/qemu_hotplug.c

Re: Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Peter Krempa
On Tue, Jan 30, 2024 at 07:42:10 -0800, Andrea Bolognani wrote: > On Tue, Jan 30, 2024 at 12:18:43PM +, Daniel P. Berrangé wrote: > > On Tue, Jan 30, 2024 at 12:39:29PM +0100, Michal Prívozník wrote: > > > On 1/26/24 11:21, Andrea Bolognani wrote: > > > > Can you please take another look at thi

Re: Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 12:18:43PM +, Daniel P. Berrangé wrote: > On Tue, Jan 30, 2024 at 12:39:29PM +0100, Michal Prívozník wrote: > > On 1/26/24 11:21, Andrea Bolognani wrote: > > > Can you please take another look at this patch (as well as the other > > > one that contains alpha-specific cha

Re: [PATCH v2 0/5] Initial network support in ch driver.

2024-01-30 Thread Praveen K Paladugu
Ping.. for some reviews on this patchset. -- Regards, Praveen ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [libvirt PATCH 2/2] qemu_snapshot: create: don't require disk-only flag for offline external snapshot

2024-01-30 Thread Peter Krempa
On Tue, Jan 30, 2024 at 12:33:51 +0100, Pavel Hrdina wrote: > Historically creating offline external snapshot required disk-only flag > as well. Now when user requests new snapshot for offline VM and at least > one disk is specified to use external snapshot we will no longer require > disk-only fla

Re: [libvirt PATCH 1/2] qemu_snapshot: create: refactor external snapshot detection

2024-01-30 Thread Peter Krempa
On Tue, Jan 30, 2024 at 12:33:50 +0100, Pavel Hrdina wrote: > Introduce new function qemuSnapshotCreateUseExternal() that will return > true if we will use external snapshots as default location. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_snapshot.c | 34 +-

Re: [libvirt PATCH] qemu_snapshot: fix detection if non-leaf snapshot isn't in active chain

2024-01-30 Thread Peter Krempa
On Tue, Jan 30, 2024 at 13:15:50 +0100, Pavel Hrdina wrote: > The condition was completely wrong. As per the comment for function > virDomainMomentIsAncestor() it checks that the first argument is > descendant of the second argument. > > Consider the following snapshot tree for VM: > > s1 >

Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 12:39:29PM +0100, Michal Prívozník wrote: > On 1/26/24 11:21, Andrea Bolognani wrote: > > On Mon, Jan 22, 2024 at 01:24:41AM -0800, Andrea Bolognani wrote: > > >> Please reconsider :) > > > > Can you please take another look at this patch (as well as the other > > one that

[libvirt PATCH] qemu_snapshot: fix detection if non-leaf snapshot isn't in active chain

2024-01-30 Thread Pavel Hrdina
The condition was completely wrong. As per the comment for function virDomainMomentIsAncestor() it checks that the first argument is descendant of the second argument. Consider the following snapshot tree for VM: s1 | +- s2 | | | +- s3 | +- s4 | +- s5

Re: [PATCH] scripts: Make check-symfile.py work on alpha

2024-01-30 Thread Michal Prívozník
On 1/26/24 11:21, Andrea Bolognani wrote: > On Mon, Jan 22, 2024 at 01:24:41AM -0800, Andrea Bolognani wrote: >> Please reconsider :) > > Can you please take another look at this patch (as well as the other > one that contains alpha-specific changes) in light of the arguments > that I've provided

[libvirt PATCH 2/2] qemu_snapshot: create: don't require disk-only flag for offline external snapshot

2024-01-30 Thread Pavel Hrdina
Historically creating offline external snapshot required disk-only flag as well. Now when user requests new snapshot for offline VM and at least one disk is specified to use external snapshot we will no longer require disk-only flag as all other not specified disk will use external snapshots as wel

[libvirt PATCH 1/2] qemu_snapshot: create: refactor external snapshot detection

2024-01-30 Thread Pavel Hrdina
Introduce new function qemuSnapshotCreateUseExternal() that will return true if we will use external snapshots as default location. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src

[libvirt PATCH 0/2] don't require disk-only flag when creating external snapshots

2024-01-30 Thread Pavel Hrdina
Pavel Hrdina (2): qemu_snapshot: create: refactor external snapshot detection qemu_snapshot: create: don't require disk-only flag for offline external snapshot src/qemu/qemu_snapshot.c | 44 1 file changed, 35 insertions(+), 9 deletions(-) -- 2.4

Re: [PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()

2024-01-30 Thread Michal Prívozník
On 1/29/24 13:38, Purna Pavan Chandra Aekkaladevi wrote: > Rectify the condition to remove a domain only if it is not persistent. > > Signed-off-by: Purna Pavan Chandra Aekkaladevi > > --- > src/ch/ch_domain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ch/ch_d

Re: Re: [libvirt PATCH V2 0/4] add loongarch support for libvirt

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 04:59:53PM +0800, lixianglai wrote: > Hi Andrea: > >     I'm sorry for taking so long to reply you! No worries. In the meantime, I've been busy working on some of the enhancements the the libvirt code structure that I've mentioned during the previous round of review, and th

Re: Re: [libvirt PATCH V2 4/4] Add test script for loongarch

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 05:03:34PM +0800, lixianglai wrote: > > I see that virtio-vga is used here. It seems to work fine, but > > regular VGA doesn't, at least from a quick test. I'm just wondering > > if that's likely to be just an issue with the specific guest OS I'm > > using... aarch64 has som

Re: Re: [libvirt PATCH V2 1/4] Add loongarch cpu support

2024-01-30 Thread Andrea Bolognani
On Tue, Jan 30, 2024 at 05:00:43PM +0800, lixianglai wrote: > > > +static int > > > +virCPULoongArchUpdate(virCPUDef *guest, > > > + const virCPUDef *host ATTRIBUTE_UNUSED, > > > > G_GNUC_UNUSED > > OK! Please feel free to *not* explicitly acknowledge every single review comme

Re: [libvirt PATCH V2 4/4] Add test script for loongarch

2024-01-30 Thread lixianglai
Hi  Andrea : On Wed, Jan 10, 2024 at 11:07:49AM +0800, Xianglai Li wrote: diff --git a/src/conf/schemas/basictypes.rng b/src/conf/schemas/basictypes.rng index 26eb538077..f117f19d33 100644 --- a/src/conf/schemas/basictypes.rng +++ b/src/conf/schemas/basictypes.rng @@ -444,6 +444,7 @@ i68

Re: [libvirt PATCH V2 3/4] Implement the method of getting host info for loongarch

2024-01-30 Thread lixianglai
Hi Andrea : On Wed, Jan 10, 2024 at 11:07:48AM +0800, Xianglai Li wrote: diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 4027547e1e..c809fc0d7a 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -1650,7 +1652,8 @@ virHostCPUGetPhysAddrSize(const virArch hostArch,

Re: [libvirt PATCH V2 2/4] Config some capabilities for loongarch virt machine

2024-01-30 Thread lixianglai
Hi  Andrea : On Wed, Jan 10, 2024 at 11:07:47AM +0800, Xianglai Li wrote: Config some capabilities for loongarch virt machine Config some capabilities for loongarch virt machine such as PCI multi bus. I would just say that you're implementing support for loongarch64 in the QEMU driver, becaus

Re: [libvirt PATCH V2 1/4] Add loongarch cpu support

2024-01-30 Thread lixianglai
Hi Andrea : On Wed, Jan 10, 2024 at 11:07:46AM +0800, Xianglai Li wrote: From: xianglai li Please consider adjusting your git configuration so that the authorship information matches your Signed-off-by and the email's From header. OK, I will fix it in the next version. Add loongarch cpu

Re: [libvirt PATCH V2 0/4] add loongarch support for libvirt

2024-01-30 Thread lixianglai
Hi Andrea:     I'm sorry for taking so long to reply you! Hi Philippe:     When developing libvirt on loongarch, we encountered some problems related to pflash. libvirt and qemu met some difficulties in the coordination of UEFI loading. I think we need your suggestions and opinions on the s