Re: [PATCH] apparmor: Allow access to /sys/devices/system/node/*/cpumap for libnuma

2024-01-11 Thread Peter Krempa
On Thu, Jan 11, 2024 at 15:21:03 -0700, Jim Fehlig wrote: > On 1/11/24 14:17, Sergio Durigan Junior wrote: > > A QEMU change (10218ae6d006f76410804cc4dc690085b3d008b5) introduced > > some libnuma calls that require read access to > > /sys/devices/system/node/*/cpumap, which currently is forbidden

Re: [PATCH 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules

2024-01-11 Thread Thomas Huth
On 12/01/2024 05.57, Harsh Prateek Bora wrote: On 1/11/24 22:16, Thomas Huth wrote: The character "+" is now forbidden in QOM device names (see commit b447378e1217 - "Limit type names to alphanumerical and some few special characters"). For the "power5+" and "power7+" CPU names, there is

RE: [PATCH rfcv3 06/11] qemu: force special parameters enabled for TDX guest

2024-01-11 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Subject: Re: [PATCH rfcv3 06/11] qemu: force special parameters enabled for >TDX guest > >On Mon, Nov 27, 2023 at 04:55:16PM +0800, Zhenzhong Duan wrote: >> TDX guest requires some special parameters to boot, They are: >> >> "-machine

RE: [PATCH rfcv3 05/11] qemu: Add command line and validation for TDX type

2024-01-11 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Subject: Re: [PATCH rfcv3 05/11] qemu: Add command line and validation >for TDX type > >On Mon, Nov 27, 2023 at 04:55:15PM +0800, Zhenzhong Duan wrote: >> QEMU will provides 'tdx-guest' object which is used to launch encrypted >> VMs on

RE: [PATCH rfcv3 03/11] conf: expose TDX feature in domain capabilities

2024-01-11 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Subject: Re: [PATCH rfcv3 03/11] conf: expose TDX feature in domain >capabilities > >On Thu, Jan 11, 2024 at 03:43:34AM +, Duan, Zhenzhong wrote: >> >> >> >-Original Message- >> >From: Daniel P. Berrangé >> >Subject: Re: [PATCH

RE: [PATCH rfcv3 04/11] conf: add tdx as launch security type

2024-01-11 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Subject: Re: [PATCH rfcv3 04/11] conf: add tdx as launch security type > >On Mon, Nov 27, 2023 at 04:55:14PM +0800, Zhenzhong Duan wrote: >> When 'tdx' is used, the VM will launched with Intel TDX feature enabled. >> TDX feature supports

Re: [PATCH] apparmor: Allow access to /sys/devices/system/node/*/cpumap for libnuma

2024-01-11 Thread Jim Fehlig
On 1/11/24 14:17, Sergio Durigan Junior wrote: A QEMU change (10218ae6d006f76410804cc4dc690085b3d008b5) introduced some libnuma calls that require read access to /sys/devices/system/node/*/cpumap, which currently is forbidden by the standard apparmor profile. This commit allows read-only access

[PATCH] apparmor: Allow access to /sys/devices/system/node/*/cpumap for libnuma

2024-01-11 Thread Sergio Durigan Junior
A QEMU change (10218ae6d006f76410804cc4dc690085b3d008b5) introduced some libnuma calls that require read access to /sys/devices/system/node/*/cpumap, which currently is forbidden by the standard apparmor profile. This commit allows read-only access to the file specified above. Closes #515

Re: [PATCH v3 00/12] Improve versioned CPU support in libvirt

2024-01-11 Thread Jonathon Jongsma
polite ping On 12/15/23 4:11 PM, Jonathon Jongsma wrote: For SEV-SNP support we will need to be able to specify versioned CPU models that are not yet available in libvirt. Rather than just adding a versioned CPU or two that would satisfy that immediate need, I decided to try to add versioned

Re: [PATCH 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names

2024-01-11 Thread Cédric Le Goater
On 1/11/24 17:46, Thomas Huth wrote: For consistency we should drop the names with a "+" in it in the long run. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index

Re: [PATCH 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules

2024-01-11 Thread Cédric Le Goater
On 1/11/24 17:46, Thomas Huth wrote: The character "+" is now forbidden in QOM device names (see commit b447378e1217 - "Limit type names to alphanumerical and some few special characters"). For the "power5+" and "power7+" CPU names, there is currently a hack in type_name_is_valid() to still

Re: [PATCH] conf: domain_conf: cleanup def in case of errors

2024-01-11 Thread Jonathon Jongsma
On 1/11/24 6:57 AM, Shaleen Bathla wrote: Just like in rest of the function virDomainFSDefParseXML, use goto error so that def will be cleaned up in error cases. Signed-off-by: Shaleen Bathla --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names

2024-01-11 Thread Thomas Huth
For consistency we should drop the names with a "+" in it in the long run. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 2e15040246..7fdd2239b4 100644 ---

[PATCH 0/2] ppc: Rename power5+ and power7+ for the new QOM naming rules

2024-01-11 Thread Thomas Huth
We can get rid of the "power5+" / "power7+" hack in qom/object.c by using CPU aliases for those names instead (first patch). I think in the long run, we should get rid of the names with a "+" in it completely, so the second patch suggests to deprecate those, but I'd also be fine if we keep the

[PATCH 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules

2024-01-11 Thread Thomas Huth
The character "+" is now forbidden in QOM device names (see commit b447378e1217 - "Limit type names to alphanumerical and some few special characters"). For the "power5+" and "power7+" CPU names, there is currently a hack in type_name_is_valid() to still allow them for compatibility reasons.

Re: Re: [PATCH 02/11] conf: Report CPU clusters in capabilities XML

2024-01-11 Thread Andrea Bolognani
On Wed, Jan 10, 2024 at 12:57:41PM +0100, Peter Krempa wrote: > On Mon, Jan 08, 2024 at 20:26:01 +0100, Andrea Bolognani wrote: > > For machines that don't expose useful information through sysfs, > > the dummy ID 0 is used. > > I'm not a fan, as you won't be able to use the capabilities XML to >

[PATCH v2 05/11] qemu: Use CPU clusters for guests

2024-01-11 Thread Andrea Bolognani
https://issues.redhat.com/browse/RHEL-7043 Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/qemu/qemu_command.c | 5 - .../qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args | 2 +-

[PATCH v2 03/11] conf: Allow specifying CPU clusters

2024-01-11 Thread Andrea Bolognani
The default number of CPU clusters is 1, and values other than that one are currently rejected by all hypervisor drivers. Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/bhyve/bhyve_command.c| 5 + src/conf/cpu_conf.c

[PATCH v2 08/11] tests: Verify handling of CPU clusters in QMP data

2024-01-11 Thread Andrea Bolognani
Since aarch64 doesn't support CPU hotplug at the moment, we have to get a bit creative. While the 'query-cpus-fast' output is taken directly from a VM configured as 16 the 'query-hotpluggable-cpus' output is constructed by hand starting from the former and using the 'x86-dies' test

[PATCH v2 10/11] docs: Document CPU clusters

2024-01-11 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/formatcaps.rst | 24 +++- docs/formatdomain.rst | 18 ++ 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/docs/formatcaps.rst b/docs/formatcaps.rst index 60f8b7caca..d16cf182dc 100644 ---

[PATCH v2 11/11] news: Mention support for CPU clusters

2024-01-11 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9e538a8f57..7accddfbd7 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -24,6 +24,12 @@ v10.0.0 (unreleased) This should enable faster migration

[PATCH v2 01/11] tests: Add hostcpudata for machine with CPU clusters

2024-01-11 Thread Andrea Bolognani
The data is taken from an HPE Apollo 70 machine, which uses aarch64 CPUs. It is interesting for us because non-dummy information about CPU clusters is exposed through sysfs. In order to keep things reasonable, the data was manually modified so that only 8 of the original 224 CPUs are included.

[PATCH v2 09/11] docs: Improve documentation for CPU topology

2024-01-11 Thread Andrea Bolognani
On the guest configuration side, mention that support for the "dies" attribute was introduced in libvirt 6.1.0 and clarify that the ability to use non-default values is subject to architecuture and machine limitations. On the host capabilities side, the documentation was pretty much entirely

[PATCH v2 02/11] conf: Report CPU clusters in capabilities XML

2024-01-11 Thread Andrea Bolognani
For machines that don't expose useful information through sysfs, the dummy ID 0 is used. https://issues.redhat.com/browse/RHEL-7043 Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/conf/capabilities.c | 5 +- src/conf/capabilities.h

[PATCH v2 06/11] tests: Add test case for CPU clusters

2024-01-11 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- .../cpu-topology5.aarch64-latest.args | 31 +++ tests/qemuxml2argvdata/cpu-topology5.xml | 17 ++ tests/qemuxml2argvtest.c | 1 + .../cpu-topology5.aarch64-latest.xml | 29 +

[PATCH v2 07/11] qemu: Make monitor aware of CPU clusters

2024-01-11 Thread Andrea Bolognani
This makes it so libvirt can obtain accurate information about guest CPUs from QEMU, and should make it possible to correctly perform operations such as CPU hotplug. Of course this is mostly moot at the moment: only aarch64 can use CPU clusters, and CPU hotplug is not yet implemented on that

[PATCH v2 04/11] qemu: Introduce QEMU_CAPS_SMP_CLUSTERS

2024-01-11 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml

[PATCH v2 00/11] qemu: Add support for CPU clusters

2024-01-11 Thread Andrea Bolognani
Changes from [v1] * minimize amount of newly-introduced test data; * add documentation for CPU topology information in the host capabilities XML; * address other review comments. [v1]

[PATCH] conf: domain_conf: cleanup def in case of errors

2024-01-11 Thread Shaleen Bathla
Just like in rest of the function virDomainFSDefParseXML, use goto error so that def will be cleaned up in error cases. Signed-off-by: Shaleen Bathla --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [PATCH] virsh: Command completion, add comp-methods with zlib and zstd

2024-01-11 Thread Michal Prívozník
On 1/11/24 02:07, Yalei Li wrote: > Signed-off-by: Yalei Li > --- > tools/virsh-completer-domain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Michal Privoznik and since this is trivial patch and it is safe for freeze I've merged it. Michal

Re: [PATCH rfcv3 03/11] conf: expose TDX feature in domain capabilities

2024-01-11 Thread Daniel P . Berrangé
On Thu, Jan 11, 2024 at 03:43:34AM +, Duan, Zhenzhong wrote: > > > >-Original Message- > >From: Daniel P. Berrangé > >Subject: Re: [PATCH rfcv3 03/11] conf: expose TDX feature in domain > >capabilities > > > >On Mon, Nov 27, 2023 at 04:55:13PM +0800, Zhenzhong Duan wrote: > >>