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
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.
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
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
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/
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
---
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 +
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
- 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
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(+),
'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
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
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
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
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/
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/
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
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
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
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 -
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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 +-
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
>
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
73 matches
Mail list logo