Re: [libvirt PATCH v3] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread Shiva
On 4/6/23 20:43, Shiva wrote: Now, earlier in this loop (not visible in this limited context though) there's a check for VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK type. I don't think it is special so we have two options:    a) move it into virDomainGraphicsListenDefValidate(), or    b) move

Re: [libvirt PATCH v4] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread K Shiva
In an effort to separate the validation steps from the Parse stage, a few validation checks of virDomainGraphicsListenDef have been moved from virDomainGraphicsListenDefParseXML() in domain_conf.c to virDomainGraphicsDefListensValidate() in domain_validate.c Signed-off-by: Koninty Shiva Kiran

Re: [libvirt PATCH v3] Conf: Move validation of virDomainGraphicsListenDef out of Parser virDomainGraphicsListenDef out of Parser

2023-04-06 Thread K Shiva
In an effort to separate the validation steps from the Parse stage, a few validation checks of virDomainGraphicsListenDef have been moved from virDomainGraphicsListenDefParseXML() in domain_conf.c to virDomainGraphicsDefListensValidate() in domain_validate.c Signed-off-by: Koninty Shiva Kiran

[libvirt PATCH v4] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread K Shiva
From: K Shiva Kiran In an effort to separate the validation steps from the Parse stage, a few validation checks of virDomainGraphicsListenDef have been moved from virDomainGraphicsListenDefParseXML() in domain_conf.c to virDomainGraphicsDefListensValidate() in domain_validate.c Signed-off-by: K

[libvirt PATCH 3/3] rpc/ssh: ssh_userauth_agent() is not supported on win32

2023-04-06 Thread marcandre . lureau
From: Marc-André Lureau The function does not exist on win32. Signed-off-by: Marc-André Lureau --- src/rpc/virnetlibsshsession.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index

[libvirt PATCH 2/3] meson: drop explicit python interpreter

2023-04-06 Thread marcandre . lureau
From: Marc-André Lureau meson wraps python scripts already on win32, so we end up with these failing commands: [1/359] "C:/msys64/ucrt64/bin/meson" "--internal" "exe" "--capture" "src/util/virkeycodetable_atset1.h" "--" "sh" "C:/msys64/home/marca/src/libvirt/scripts/meson-python.sh"

[libvirt PATCH 1/3] meson: don't look for unix paths on win32

2023-04-06 Thread marcandre . lureau
From: Marc-André Lureau Or meson will complain with: ../meson.build:770:2: ERROR: Search directory /sbin is not an absolute path. Signed-off-by: Marc-André Lureau --- meson.build | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index

[libvirt PATCH 0/3] RFC: fix compilation on msys2

2023-04-06 Thread marcandre . lureau
From: Marc-André Lureau Hi, libvirt fails to compile on msys2/win32. Here is a few patches that solve it, but the way python scripts are being handled in general is a bit odd, so this is RFC. (fwiw, a lot of tests fail though, I can send the log if anyone is interested - or attach it to a

Re: [libvirt PATCH v3] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread Shiva
Now, earlier in this loop (not visible in this limited context though) there's a check for VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK type. I don't think it is special so we have two options: a) move it into virDomainGraphicsListenDefValidate(), or b) move those checks out of

Re: [libvirt PATCH v3] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread Michal Prívozník
On 4/6/23 14:51, K Shiva wrote: > In an effort to separate the validation steps from the Parse stage, a > part of the validation of virDomainGraphicsListenDef has been moved to > domain_validate.h. > > Signed-off-by: K Shiva Sorry for not raising this earlier, but we tend to use legal names

Re: Improve default machine type selection

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 06:10:11AM -0700, Andrea Bolognani wrote: > In conclusion, there currently doesn't seem to exist a way to define > a useful integratorcp-based VM in libvirt, which IMO means we can > safely change the default machine type for Arm architectures without > any concerns about

[libvirt PATCH] util: acpi: include unistd.h

2023-04-06 Thread Ján Tomko
For lseek. Signed-off-by: Ján Tomko --- Pushed as a build breaker fix. src/util/viracpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/viracpi.c b/src/util/viracpi.c index e66df99f03..c96b7c296b 100644 --- a/src/util/viracpi.c +++ b/src/util/viracpi.c @@ -22,6 +22,7 @@

Re: [PATCH] qemu: snapshot: Allow inactive internal snapshots with uefi

2023-04-06 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Historically the snapshot code attempted to forbid internal snapshots with UEFI both in active and inactive case. Unfortunately due to the intricacies of UEFI probing this didn't really work for inactive VMs which made users rely on the feature. Now

[PATCH] qemu: snapshot: Allow inactive internal snapshots with uefi

2023-04-06 Thread Peter Krempa
Historically the snapshot code attempted to forbid internal snapshots with UEFI both in active and inactive case. Unfortunately due to the intricacies of UEFI probing this didn't really work for inactive VMs which made users rely on the feature. Now with the changes to store detected UEFI

Re: Improve default machine type selection

2023-04-06 Thread Peter Krempa
On Thu, Apr 06, 2023 at 06:32:30 -0700, Andrea Bolognani wrote: > On Thu, Apr 06, 2023 at 09:32:28AM +0200, Peter Krempa wrote: > > On Wed, Apr 05, 2023 at 15:19:07 -0600, Jim Fehlig wrote: > > > # virsh create test.xml > > > error: Failed to create domain from test.xml > > > error: internal

Re: Improve default machine type selection

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 09:32:28AM +0200, Peter Krempa wrote: > On Wed, Apr 05, 2023 at 15:19:07 -0600, Jim Fehlig wrote: > > # virsh create test.xml > > error: Failed to create domain from test.xml > > error: internal error: process exited while connecting to monitor: > >

Re: Improve default machine type selection

2023-04-06 Thread Andrea Bolognani
On Wed, Apr 05, 2023 at 03:19:07PM -0600, Jim Fehlig wrote: > On 3/16/23 11:56, Jim Fehlig wrote: > > I just did a quick check with libvirt 9.1.0 (qemu is a bit older, at 7.1.0): > > > > # cat test.xml > > > >   test > >   2097152 > >   1 > >   > >     hvm > >     >

[PATCH] viracpi: Fir error format string in virAcpiParseIORTNodeHeader()

2023-04-06 Thread Michal Privoznik
Inside of virAcpiParseIORTNodeHeader() there's an virReportError() which reports size of a structure using sizeof() operator. Well, it's not well documented but the returned type of sizeof() is apparently size_t but the format string uses %lu. Signed-off-by: Michal Privoznik --- Pushed under

[libvirt PATCH v3] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread K Shiva
In an effort to separate the validation steps from the Parse stage, a part of the validation of virDomainGraphicsListenDef has been moved to domain_validate.h. Signed-off-by: K Shiva --- This is a v3 of: https://listman.redhat.com/archives/libvir-list/2023-April/239265.html diff to v2: -

Re: [PATCH v2] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread Michal Prívozník
On 4/5/23 19:28, K Shiva wrote: > From: skran > > In an effort to separate the validation steps from the Parse stage, a > part of the validation of virDomainGraphicsListenDef has been moved to > domain_validate.h. > > Signed-off-by: K Shiva Now, this is perfect! This message tells you what

Re: [PATCH v2] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-06 Thread Michal Prívozník
On 4/5/23 19:56, Shiva wrote: > Greetings Sir > > My apologies for the incorrect formats as I am a beginner to git. Thank > you very much for your corrections. That's okay and GSoC was invented specifically for this reason. To attract students into Open Source and its development. But at the

Re: [PATCH v2 1/3] util: Introduce virAcpi module

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 10:57:02AM +0200, Michal Privoznik wrote: > +++ b/src/util/viracpi.c > +/* Basic sanity check. While there's a type specific data > + * that follows the node header, the node length should be at > + * least size of header itself. */ > +if (nodeHeader->len <

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 12:02:01PM +0200, Michal Prívozník wrote: > On 4/6/23 11:20, Andrea Bolognani wrote: > > On Thu, Apr 06, 2023 at 10:20:46AM +0200, Michal Prívozník wrote: > +typedef enum { > +VIR_IORT_NODE_TYPE_UNKNOWN = -1, > >>> > >>> Do we need this? virIORTNodeHeader.type

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-06 Thread Michal Prívozník
On 4/6/23 11:20, Andrea Bolognani wrote: > On Thu, Apr 06, 2023 at 10:20:46AM +0200, Michal Prívozník wrote: >> On 4/5/23 19:21, Andrea Bolognani wrote: >>> On Wed, Apr 05, 2023 at 01:30:17PM +0200, Michal Privoznik wrote: +if (nodeHeader->len < sizeof(*nodeHeader)) { +

Re: [PATCH 2/3] tests: Introduce viracpitest

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 10:41:01AM +0200, Michal Prívozník wrote: > On 4/5/23 19:24, Andrea Bolognani wrote: > > With those typos fixed, > > > > Signed-off-by: Andrea Bolognani > > I believe you meant Reviewed-by, correct? ;-) Oops! Of course O:-) -- Andrea Bolognani / Red Hat /

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-06 Thread Andrea Bolognani
On Thu, Apr 06, 2023 at 10:20:46AM +0200, Michal Prívozník wrote: > On 4/5/23 19:21, Andrea Bolognani wrote: > > On Wed, Apr 05, 2023 at 01:30:17PM +0200, Michal Privoznik wrote: > >> +if (nodeHeader->len < sizeof(*nodeHeader)) { > >> +virReportError(VIR_ERR_INTERNAL_ERROR, > >> +

[PATCH v2 2/3] tests: Introduce viracpitest

2023-04-06 Thread Michal Privoznik
Introduce a test that checks newly introduced virAcpi module. There are three IORT tables from a real HW (IORT_ampere, IORT_gigabyte and IORT_qualcomm), then there's one from a VM (IORT_virt_aarch64) and one that I handcrafted to be empty (IORT_empty). Signed-off-by: Michal Privoznik

[PATCH v2 3/3] virt-host-validate: Detect SMMU presence on ARMs by parsing IORT table

2023-04-06 Thread Michal Privoznik
In my previous commit v9.2.0-rc1~3 I've made virt-host-validate to report host IOMMU check pass if IORT table is present. This is not sufficient though, because IORT describes much more than just IOMMU (well, it's called SMMU in ARM world). In fact, this can be seen in previous commit which adds

[PATCH v2 1/3] util: Introduce virAcpi module

2023-04-06 Thread Michal Privoznik
The aim of this new module is to contain code that's parsing ACPI tables. For now, only parsing of IORT table is implemented (it's ARM specific table). And since we only need to check whether the table contains SMMU record, the code is very simplified. I've followed the specification published

[PATCH v2 0/3] virt-host-validate: Detect SMMU presence on ARMs by parsing IORT table

2023-04-06 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2023-April/239251.html diff to v1: - Renamed couple of enum values, - fixed their string translations, - Other small nits pointed out by Andrea Michal Prívozník (3): util: Introduce virAcpi module tests: Introduce viracpitest

Re: [PATCH 2/3] tests: Introduce viracpitest

2023-04-06 Thread Michal Prívozník
On 4/5/23 19:24, Andrea Bolognani wrote: > On Wed, Apr 05, 2023 at 01:30:18PM +0200, Michal Privoznik wrote: >> > > With those typos fixed, > > Signed-off-by: Andrea Bolognani > I believe you meant Reviewed-by, correct? ;-) Michal

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-06 Thread Michal Prívozník
On 4/5/23 19:21, Andrea Bolognani wrote: > On Wed, Apr 05, 2023 at 01:30:17PM +0200, Michal Privoznik wrote: >> +++ b/src/util/viracpi.c >> +VIR_ENUM_IMPL(virIORTNodeType, >> + VIR_IORT_NODE_TYPE_LAST, >> + "ITS Group", >> + "Named Component", >> +

Re: [PATCH 3/3] virt-host-validate: Detect SMMU presence on ARMs by parsing IORT table

2023-04-06 Thread Michal Prívozník
On 4/5/23 19:31, Andrea Bolognani wrote: > On Wed, Apr 05, 2023 at 01:30:19PM +0200, Michal Privoznik wrote: >> In my previous commit v9.2.0-rc1~3 I've made virt-host-validate > > You're including the commit hash below in the Fixes: pseudo-header, > so mentioning it here again feels unnecessary.

Re: Improve default machine type selection

2023-04-06 Thread Peter Krempa
On Thu, Apr 06, 2023 at 09:32:28 +0200, Peter Krempa wrote: > On Wed, Apr 05, 2023 at 15:19:07 -0600, Jim Fehlig wrote: > > On 3/16/23 11:56, Jim Fehlig wrote: [...] > > error: Failed to create domain from test.xml > > error: internal error: process exited while connecting to monitor: > >

Re: Improve default machine type selection

2023-04-06 Thread Peter Krempa
On Wed, Apr 05, 2023 at 15:19:07 -0600, Jim Fehlig wrote: > On 3/16/23 11:56, Jim Fehlig wrote: > > On 3/15/23 08:40, Ján Tomko wrote: > > > On a Monday in 2023, Jim Fehlig wrote: > > > > If an explicit machine type is not specified in the VM config, > > > > the qemu driver will select the first