Re: [PATCH 06/10] qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant value)

2024-03-12 Thread Zhao Liu
y: Markus Armbruster > --- > qapi/qobject-input-visitor.c | 32 ++++---- > qapi/string-input-visitor.c | 8 > qom/object.c | 12 > 3 files changed, 28 insertions(+), 24 deletions(-) Reviewed-by: Zhao Liu

Re: [PATCH 05/10] qapi: Inline and remove QERR_INVALID_PARAMETER definition

2024-03-12 Thread Zhao Liu
dé > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/qerror.h | 3 --- > qapi/opts-visitor.c | 2 +- > util/qemu-option.c| 10 +- > 3 files changed, 6 insertions(+), 9 deletions(-) Reviewed-by: Zhao Liu

Re: [PATCH 04/10] qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition

2024-03-12 Thread Zhao Liu
up. > > Signed-off-by: Philippe Mathieu-Daudé > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/qerror.h | 3 --- > hw/core/qdev.c| 4 ++-- > system/qdev-monitor.c | 2 +- > 3 files changed, 3 insertions(+), 6 deletions(-) Reviewed-by: Zhao Liu

Re: [PATCH 03/10] qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition

2024-03-12 Thread Zhao Liu
up. > > Signed-off-by: Philippe Mathieu-Daudé > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/qerror.h | 3 --- > block/snapshot.c | 7 --- > blockdev.c | 2 +- > 3 files changed, 5 insertions(+), 7 deletions(-) > Reviewed-by: Zhao Liu

Re: [PATCH 02/10] qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

2024-03-12 Thread Zhao Liu
t; > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Cédric Le Goater > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/qerror.h | 3 --- > hw/ppc/spapr_pci.c| 5 ++--- > system/qdev-monitor.c | 8 +--- > 3 files changed, 7 insertions(+), 9 deletions(-) > Reviewed-by: Zhao Liu

Re: [PATCH 01/10] error: Drop superfluous #include "qapi/qmp/qerror.h"

2024-03-12 Thread Zhao Liu
ends/iommufd.c | 1 - > chardev/char-fe.c | 1 - > system/rtc.c | 1 - > 3 files changed, 3 deletions(-) > Reviewed-by: Zhao Liu

Re: [PATCH v2 00/29] Cleanup up to fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Zhao Liu
On Tue, Mar 12, 2024 at 09:50:25AM +0100, Thomas Huth wrote: > Date: Tue, 12 Mar 2024 09:50:25 +0100 > From: Thomas Huth > Subject: Re: [PATCH v2 00/29] Cleanup up to fix missing ERRP_GUARD() for > error_prepend() > > On 12/03/2024 09.43, Zhao Liu wrote: > >

Re: [PATCH v9 02/21] hw/core/machine: Support modules in -smp

2024-03-12 Thread Zhao Liu
> > @@ -51,6 +51,10 @@ static char *cpu_hierarchy_to_string(MachineState *ms) > > g_string_append_printf(s, " * clusters (%u)", ms->smp.clusters); > > } > > +if (mc->smp_props.modules_supported) { > > +g_string_append_printf(s, " * modules (%u)", ms->smp.clusters); > > +

Re: [PATCH v9 11/21] i386/cpu: Decouple CPUID[0x1F] subleaf with specific topology level

2024-03-12 Thread Zhao Liu
On Mon, Mar 11, 2024 at 04:45:41PM +0800, Xiaoyao Li wrote: > Date: Mon, 11 Mar 2024 16:45:41 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH v9 11/21] i386/cpu: Decouple CPUID[0x1F] subleaf with > specific topology level > > On 2/27/2024 6:32 PM, Zhao Liu wrote: > > Fro

Re: [PATCH v9 06/21] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]

2024-03-12 Thread Zhao Liu
On Mon, Mar 11, 2024 at 05:03:02PM +0800, Xiaoyao Li wrote: > Date: Mon, 11 Mar 2024 17:03:02 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH v9 06/21] i386/cpu: Use APIC ID info to encode cache > topo in CPUID[4] > > On 3/10/2024 9:38 PM, Zhao Liu wro

Re: [PATCH v5] pc: q35: Bump max_cpus to 4096 vcpus

2024-03-12 Thread Zhao Liu
chael S. Tsirkin > Cc: Julia Suvorova > Cc: kra...@redhat.com > Reviewed-by: Daniel P. Berrangé > Reviewed-by: Igor Mammedov > Reviewed-by: Gerd Hoffmann > Signed-off-by: Ani Sinha > --- > hw/i386/pc_q35.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Zhao Liu

Re: [PATCH v2 00/29] Cleanup up to fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Zhao Liu
] Cleanup up to fix missing ERRP_GUARD() for > error_prepend() > > On 11/3/24 04:37, Zhao Liu wrote: > > > --- > > Zhao Liu (29): > > >hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend() > >hw/core/qdev-properties-system: Fix missing ERR

[PATCH] docs/about/deprecated.rst: Move SMP configurations item to system emulator section

2024-03-12 Thread Zhao Liu
From: Zhao Liu In the commit 54c4ea8f3ae6 ("hw/core/machine-smp: Deprecate unsupported 'parameter=1' SMP configurations"), the SMP related item is put under the section "User-mode emulator command line arguments" instead of "System emulator command line arg

Re: [PATCH v2 00/13] Cleanup on SMP and its test

2024-03-11 Thread Zhao Liu
Hi Philippe, On Sat, Mar 09, 2024 at 02:49:17PM +0100, Philippe Mathieu-Daudé wrote: > Date: Sat, 9 Mar 2024 14:49:17 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH v2 00/13] Cleanup on SMP and its test > > On 9/3/24 01:46, Zhao Liu wrote: > > Hi Philippe, >

[PATCH] error: Move ERRP_GUARD() to the beginning of the function

2024-03-11 Thread Zhao Liu
From: Zhao Liu Since the commit 05e385d2a9 ("error: Move ERRP_GUARD() to the beginning of the function"), there are new codes that don't put ERRP_GUARD() at the beginning of the functions. As stated in the commit 05e385d2a9: "include/qapi/error.h advises to put ERRP_

Re: [PATCH v3 1/3] hw/core: Cleanup unused included headers in cpu-common.c

2024-03-11 Thread Zhao Liu
> > Thanks for helpping me verify this!! > > > > EMM, but I'm still not understanding how this approach distinguishes > > whether hw/core/cpu-common.c needs the header (include/exec/cpu-common.h) > > directly or just include/exec/memory.h needs that header? For the latter, > > the header needn't b

Re: [PATCH v3 1/3] hw/core: Cleanup unused included headers in cpu-common.c

2024-03-11 Thread Zhao Liu
Hi Philippe, On Mon, Mar 11, 2024 at 12:40:23PM +0100, Philippe Mathieu-Daudé wrote: > Date: Mon, 11 Mar 2024 12:40:23 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH v3 1/3] hw/core: Cleanup unused included headers in > cpu-common.c > > On 11/3/24 08:56, Zhao L

Re: [PATCH v9 06/21] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]

2024-03-11 Thread Zhao Liu
Hi Xiaoyao, Did the following reason convince you? Could I take your r/b tag with current code? ;-) Thanks, Zhao On Sun, Mar 10, 2024 at 09:38:19PM +0800, Zhao Liu wrote: > Date: Sun, 10 Mar 2024 21:38:19 +0800 > From: Zhao Liu > Subject: Re: [PATCH v9 06/21] i386/cpu: Use APIC I

Re: [PATCH v9 09/21] i386/cpu: Introduce bitmap to cache available CPU topology levels

2024-03-11 Thread Zhao Liu
On Mon, Mar 11, 2024 at 02:28:17PM +0800, Xiaoyao Li wrote: > Date: Mon, 11 Mar 2024 14:28:17 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH v9 09/21] i386/cpu: Introduce bitmap to cache available > CPU topology levels > > On 2/27/2024 6:32 PM, Zhao Liu wrote:

[PATCH v3 2/3] hw/core: Cleanup unused included header in machine-qmp-cmds.c

2024-03-11 Thread Zhao Liu
From: Zhao Liu Remove unused header (qemu/main-loop.h) in machine-qmp-cmds.c. Tested by "./configure" and then "make". Signed-off-by: Zhao Liu --- hw/core/machine-qmp-cmds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/mach

[PATCH v3 0/3] hw/core: Cleanup and reorder headers

2024-03-11 Thread Zhao Liu
From: Zhao Liu Hi list, This is the v3 based on the commit 7489f7f3f81d ("Merge tag 'hw-misc- 20240309' of https://github.com/philmd/qemu into staging") This series identifies unused headers by manually checking item (of headers) calls in .c files, and is tested by full co

[PATCH v3 1/3] hw/core: Cleanup unused included headers in cpu-common.c

2024-03-11 Thread Zhao Liu
From: Zhao Liu Remove unused headers in cpu-common.c: * qemu/notify.h * exec/cpu-common.h * qemu/error-report.h * qemu/qemu-print.h Tested by "./configure" and then "make". Signed-off-by: Zhao Liu --- hw/core/cpu-common.c | 4 1 file changed, 4 deletions(-) diff

[PATCH v3 3/3] hw/core: Cleanup unused included headers in numa.c

2024-03-11 Thread Zhao Liu
From: Zhao Liu Remove unused header in numa.c: * qemu/bitmap.h * migration/vmstate.h Note: Though parse_numa_hmat_lb() has the variable named "bitmap_copy", it doesn't use the normal bitmap ops so that it's safe to exclude qemu/bitmap.h header. Tested by "./configure&

Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-10 Thread Zhao Liu
Hi Prasad (and also welcome folks correct me), > On Fri, 8 Mar 2024 at 20:50, Zhao Liu wrote: > > On Fri, Mar 08, 2024 at 02:20:45PM +0100, Thomas Huth wrote: > > > Can we always rely on that? ... or is this just by luck due to the current > > > implementation? In

Re: [PATCH v2 0/7] Cleanup and fix @errp dereference

2024-03-10 Thread Zhao Liu
Hi Michael & Philippe, Could this series catch the last train of next releases? ;-) Thanks, Zhao On Fri, Feb 23, 2024 at 04:56:46PM +0800, Zhao Liu wrote: > Date: Fri, 23 Feb 2024 16:56:46 +0800 > From: Zhao Liu > Subject: [PATCH v2 0/7] Cleanup and fix @errp dereference > X-

[PATCH v2 07/29] block/qcow2-bitmap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 15/29] hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 18/29] hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 29/29] target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 27/29] migration/option: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 20/29] hw/vfio/helpers: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 23/29] hw/vfio/pci: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 28/29] net/vhost-vdpa: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 16/29] hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 25/29] hw/virtio/vhost-vsock: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 11/29] block/vdi: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 21/29] hw/vfio/iommufd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 04/29] block/copy-before-write: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 09/29] block/qed: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 24/29] hw/vfio/platform: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 08/29] block/qcow2: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 26/29] hw/virtio/vhost: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 22/29] hw/vfio/pci-quirks: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 19/29] hw/vfio/container: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 10/29] block/snapshot: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 14/29] hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 13/29] block/virtio-blk: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 03/29] block: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 05/29] block/nbd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 02/29] backends/iommufd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or

[PATCH v2 00/29] Cleanup up to fix missing ERRP_GUARD() for error_prepend()

2024-03-10 Thread Zhao Liu
From: Zhao Liu Hi, This series is the v2 to add missing ERRP_GUARD() for error_prepend(), which collects the previous v1 part 1 [1] and v1 part 2 (and excludes the 4 patches that have already been merged). The @errp's second restriction (in qapi/error) said: * Without ERRP_GUARD(), use o

[PATCH v2 01/29] error: Add error_vprepend() in comment of ERRP_GUARD() rules

2024-03-10 Thread Zhao Liu
From: Zhao Liu The error_vprepend() should use ERRP_GUARD() just as the documentation of ERRP_GUARD() says: > It must be used when the function dereferences @errp or passes > @errp to error_prepend(), error_vprepend(), or error_append_hint(). Considering that error_vprepend() is also

Re: [PATCH v9 08/21] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2024-03-10 Thread Zhao Liu
Hi Xiaoyao, On Sat, Mar 09, 2024 at 09:48:34PM +0800, Xiaoyao Li wrote: > Date: Sat, 9 Mar 2024 21:48:34 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH v9 08/21] i386/cpu: Consolidate the use of topo_info in > cpu_x86_cpuid() > > On 2/27/2024 6:32 PM, Zhao Liu wrote:

Re: [PATCH v9 06/21] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]

2024-03-10 Thread Zhao Liu
Hi Xiaoyao, > > case 3: /* L3 cache info */ > > -die_offset = apicid_die_offset(&topo_info); > > if (cpu->enable_l3_cache) { > > +addressable_threads_width = > > apicid_die_offset(&topo_info); > > Please get rid of the local var

Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU

2024-03-10 Thread Zhao Liu
> I dropped this 4 patches in favor of "Cleanup on SMP and its test" > v2 > (https://lore.kernel.org/qemu-devel/20240308160148.3130837-1-zhao1@linux.intel.com/) > which seems more important, to get the "parameter=0" deprecation > in the next release. (Patch 2 diverged). > Thanks! This series

Re: [PATCH v2 00/13] Cleanup on SMP and its test

2024-03-10 Thread Zhao Liu
> Ah no, it is due to commit 01e449809b ("*-user: Deprecate and > disable -p pagesize"). > > No need to respin this series, I queued it in favor of the 4 other > patches. Thanks for your queuing! -Zhao

Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU

2024-03-08 Thread Zhao Liu
On Fri, Mar 08, 2024 at 05:36:38PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 8 Mar 2024 17:36:38 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU > > On 27/2/24 11:32, Zhao Liu wrote: > > > --- > >

Re: [PATCH v2 00/13] Cleanup on SMP and its test

2024-03-08 Thread Zhao Liu
Hi Philippe, > > Can you share your base commit please? > > Applying: hw/core/machine-smp: Remove deprecated "parameter=0" SMP > configurations > Applying: hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP > configurations > error: patch failed: docs/about/deprecated.rst:47 > error: d

[PATCH v2 06/13] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-08 Thread Zhao Liu
From: Zhao Liu The q35 machine is trying to support up to 4096 vCPUs [1], so it's necessary to bump max_cpus in test-smp-parse to 4096 to cover the topological needs of future machines. [1]: https://lore.kernel.org/qemu-devel/20240228143351.3967-1-anisi...@redhat.com/ Signed-off-by: Zha

[PATCH v2 11/13] tests/unit/test-smp-parse: Test the full 7-levels topology hierarchy

2024-03-08 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports up to 7-levels topology hierarchy: -drawers/books/sockets/dies/clusters/cores/threads. Though no machine supports all these 7 levels yet, these 7 levels have the strict containment relationship and together form the generic CPU topology representation

[PATCH v2 01/13] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-08 Thread Zhao Liu
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp pa

[PATCH v2 12/13] tests/unit/test-smp-parse: Test smp_props.has_clusters

2024-03-08 Thread Zhao Liu
From: Zhao Liu The smp_props.has_clusters in MachineClass is not a user configured field, and it indicates if user specifies "clusters" in -smp. After -smp parsing, other module could aware if the cluster level is configured by user. This is used when the machine has only 1 clu

[PATCH v2 03/13] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config()

2024-03-08 Thread Zhao Liu
From: Zhao Liu In machine_parse_smp_config(), the number of total CPUs is calculated by: drawers * books * sockets * dies * clusters * cores * threads To avoid missing the future new topology level, use a local variable to cache the calculation result so that total CPUs are only calculated

[PATCH v2 09/13] tests/unit/test-smp-parse: Test "drawers" parameter in -smp

2024-03-08 Thread Zhao Liu
From: Zhao Liu Although drawer was introduced to -smp along with book by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling

[PATCH v2 04/13] tests/unit/test-smp-parse: Drop the unsupported "dies=1" case

2024-03-08 Thread Zhao Liu
From: Zhao Liu Unsupported "parameter=1" SMP configurations is marked as deprecated, so drop the related test case. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth --- tests/unit/test-smp-parse.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/unit/test-smp-parse

[PATCH v2 10/13] tests/unit/test-smp-parse: Test "drawers" and "books" combination case

2024-03-08 Thread Zhao Liu
From: Zhao Liu Since s390 machine supports both "drawers" and "books" in -smp, add the "drawers" and "books" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth

[PATCH v2 05/13] tests/unit/test-smp-parse: Use CPU number macros in invalid topology case

2024-03-08 Thread Zhao Liu
From: Zhao Liu Use MAX_CPUS/MIN_CPUS macros in invalid topology case. This gives us the flexibility to change the maximum and minimum CPU limits. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth --- tests/unit/test-smp-parse.c | 22 ++ 1 file

[PATCH v2 08/13] tests/unit/test-smp-parse: Test "books" parameter in -smp

2024-03-08 Thread Zhao Liu
From: Zhao Liu Although book was introduced to -smp along with drawer by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling

[PATCH v2 13/13] tests/unit/test-smp-parse: Test "parameter=0" SMP configurations

2024-03-08 Thread Zhao Liu
From: Zhao Liu The support for "parameter=0" SMP configurations is removed, and QEMU returns error for those cases. So add the related test cases to ensure parameters can't accept 0. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth --- tests/unit/test-s

[PATCH v2 07/13] tests/unit/test-smp-parse: Make test cases aware of the book/drawer

2024-03-08 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports 2 more new levels: book and drawer. It is necessary to consider the effects of book and drawer in the test cases to ensure that the calculations are correct. This is also the preparation to add new book and drawer test cases. Signed-off-by: Zhao Liu

[PATCH v2 02/13] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-08 Thread Zhao Liu
From: Zhao Liu Currently, it was allowed for users to specify the unsupported topology parameter as "1". For example, x86 PC machine doesn't support drawer/book/cluster topology levels, but user could specify "-smp drawers=1,books=1,clusters=1". This is meaningless a

[PATCH v2 00/13] Cleanup on SMP and its test

2024-03-08 Thread Zhao Liu
From: Zhao Liu Hi, This is v2 to cleanup SMP and its test cases. Compared with v1, v2 have these changes: * Dropped the patch [2] about making default initialization based on SMPConfiguration members. (Thomas) * Fixed typos. (Thomas) This series includes: * [Patch 1] Remove deprecated

Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-08 Thread Zhao Liu
Hi Thomas, On Fri, Mar 08, 2024 at 02:20:45PM +0100, Thomas Huth wrote: > Date: Fri, 8 Mar 2024 14:20:45 +0100 > From: Thomas Huth > Subject: Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' > initialization in machine_parse_smp_config() > > On 06/03/202

Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU

2024-03-08 Thread Zhao Liu
Hi Paolo & Michael, Just a kindly ping, could you please take time to review this series when you're free? (This is also the foundation support of hybrid topology). Many thanks, Zhao On Tue, Feb 27, 2024 at 06:41:36PM +0800, Zhao Liu wrote: > Date: Tue, 27 Feb 2024 18:41:36 +0800

Re: [PATCH 05/17] hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Zhao Liu
Hi Thomas, (and also ping Markus) ;-) > > > > vfio_ap_unregister_irq_notifier(VFIOAPDevice *vapdev, > > > >     static void vfio_ap_realize(DeviceState *dev, Error **errp) > > > >   { > > > > +    ERRP_GUARD(); > > > >   int ret; > > > >   Error *err = NULL; > > > > > > Now this function

Re: [PATCH 03/16] block: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Zhao Liu
On Thu, Feb 29, 2024 at 01:51:16PM -0600, Eric Blake wrote: > Date: Thu, 29 Feb 2024 13:51:16 -0600 > From: Eric Blake > Subject: Re: [PATCH 03/16] block: Fix missing ERRP_GUARD() for > error_prepend() > > On Thu, Feb 29, 2024 at 12:37:10AM +0800, Zhao Liu wrote: > > Fro

Re: [PATCH 08/16] block/qcow2: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Zhao Liu
On Thu, Feb 29, 2024 at 02:48:44PM -0600, Eric Blake wrote: > Date: Thu, 29 Feb 2024 14:48:44 -0600 > From: Eric Blake > Subject: Re: [PATCH 08/16] block/qcow2: Fix missing ERRP_GUARD() for > error_prepend() > > On Thu, Feb 29, 2024 at 12:37:15AM +0800, Zhao Liu wrote:

Re: [PATCH 17/17] target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Zhao Liu
Hi Thomas, > > void s390_realize_cpu_model(CPUState *cs, Error **errp) > > { > > +ERRP_GUARD(); > > Error *err = NULL; > > I think that function could use an additional clean-up now: Remove the local > "err" variable and use "errp" only instead. > Since many cases check @err to det

Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc

2024-03-07 Thread Zhao Liu
> Hyper-V is a role you can enable in various Windows versions, both > server and client. When enabled, you get a hypervisor (which is called > 'Microsoft Hypervisor' as I was told) and your Windows becomes the root > partition (similar to Xen Dom0). In case you run this on KVM, Windows > becomes L

Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc

2024-03-07 Thread Zhao Liu
Hi Vitaly, On Tue, Mar 05, 2024 at 05:42:04PM +0100, Vitaly Kuznetsov wrote: > Date: Tue, 5 Mar 2024 17:42:04 +0100 > From: Vitaly Kuznetsov > Subject: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V > enlightenments doc > > While hyperv.rst already has all currently implemen

Re: [PATCH 00/14] Cleanup on SMP and its test

2024-03-06 Thread Zhao Liu
Hi Philippe, > In a previous community call, Zhao asked us how his work will scale > in the heterogeneous context. > > My first idea is CPUs must belong to a cluster. Thank you for considering this! At present, cluster is a arch-specific topology level used by ARM. So maybe we need call this ab

Re: [PATCH 02/14] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-06 Thread Zhao Liu
On Thu, Mar 07, 2024 at 07:22:10AM +0100, Thomas Huth wrote: > Date: Thu, 7 Mar 2024 07:22:10 +0100 > From: Thomas Huth > Subject: Re: [PATCH 02/14] hw/core/machine-smp: Deprecate unsupported > "parameter=1" SMP configurations > > On 06/03/2024 10.53, Zhao L

Re: [PATCH 07/14] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-06 Thread Zhao Liu
Hi Thomas, > > /* > > - * config: -smp 512 > > + * config: -smp 4096 > >* The test machine should tweak the supported max CPUs to > > - * 511 (MAX_CPUS - 1) for testing. > > + * 4095 (MAX_CPUS - 1) for testing. > >*/ > > -.c

Re: [PATCH-for-9.1 02/18] hw/usb/hcd-xhci: Enumerate xhci_flags setting values

2024-03-06 Thread Zhao Liu
Hi Philippe, On Tue, Mar 05, 2024 at 02:42:04PM +0100, Philippe Mathieu-Daudé wrote: > Date: Tue, 5 Mar 2024 14:42:04 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 02/18] hw/usb/hcd-xhci: Enumerate xhci_flags > setting values > X-Mailer: git-send-email 2.41.0 > > xhci_flags ar

[PATCH 01/14] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp pa

[PATCH 07/14] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-06 Thread Zhao Liu
From: Zhao Liu The q35 machine is trying to support up to 4096 vCPUs [1], so it's necessary to bump max_cpus in test-smp-parse to 4096 to cover the topological needs of future machines. [1]: https://lore.kernel.org/qemu-devel/20240228143351.3967-1-anisi...@redhat.com/ Signed-off-by: Zha

[PATCH 08/14] tests/unit/test-smp-parse: Make test cases aware of the book/drawer

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports 2 more new levels: book and drawer. It is necessary to consider the effects of book and drawer in the test cases to ensure that the calculations are correct. This is also the preparation to add new book and drawer test cases. Signed-off-by: Zhao Liu

[PATCH 09/14] tests/unit/test-smp-parse: Test "books" parameter in -smp

2024-03-06 Thread Zhao Liu
From: Zhao Liu Although book was introduced to -smp along with drawer by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling

[PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-06 Thread Zhao Liu
From: Zhao Liu SMPConfiguration initializes its int64_t members as 0 by default. Therefore, in machine_parse_smp_config(), initialize local topology variables with SMPConfiguration's members directly. Suggested-by: Prasad Pandit Signed-off-by: Zhao Liu --- hw/core/machine-smp.c

[PATCH 06/14] tests/unit/test-smp-parse: Use CPU number macros in invalid topology case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Use MAX_CPUS/MIN_CPUS macros in invalid topology case. This gives us the flexibility to change the maximum and minimum CPU limits. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth --- tests/unit/test-smp-parse.c | 22 ++ 1 file

[PATCH 04/14] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config()

2024-03-06 Thread Zhao Liu
From: Zhao Liu In machine_parse_smp_config(), the number of total CPUs is calculated by: drawers * books * sockets * dies * clusters * cores * threads To avoid missing the future new topology level, use a local variable to cache the calculation result so that total CPUs are only calculated

[PATCH 02/14] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currentlt, it was allowed for users to specify the unsupported topology parameter as "1". For example, x86 PC machine doesn't support drawer/book/cluster topology levels, but user could specify "-smp drawers=1,books=1,clusters=1". This is meaningless a

[PATCH 00/14] Cleanup on SMP and its test

2024-03-06 Thread Zhao Liu
From: Zhao Liu Hi all, To make review easier, I've merged my previous single SMP patch [1] and SMP test series [2] into this series as well. So this series includes: * [Patch 1] Remove deprecated "parameter=0" SMP configurations, which is marked as deprecated in v6

[PATCH 11/14] tests/unit/test-smp-parse: Test "drawers" and "books" combination case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Since s390 machine supports both "drawers" and "books" in -smp, add the "drawers" and "books" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song

[PATCH 13/14] tests/unit/test-smp-parse: Test smp_props.has_clusters

2024-03-06 Thread Zhao Liu
From: Zhao Liu The smp_props.has_clusters in MachineClass is not a user configured field, and it indicates if user specifies "clusters" in -smp. After -smp parsing, other module could aware if the cluster level is configured by user. This is used when the machine has only 1 clu

[PATCH 12/14] tests/unit/test-smp-parse: Test the full 7-levels topology hierarchy

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports up to 7-levels topology hierarchy: -drawers/books/sockets/dies/clusters/cores/threads. Though no machine supports all these 7 levels yet, these 7 levels have the strict containment relationship and together form the generic CPU topology representation

[PATCH 05/14] tests/unit/test-smp-parse: Drop the unsupported "dies=1" case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Unsupported "parameter=1" SMP configurations is marked as deprecated, so drop the related test case. Signed-off-by: Zhao Liu --- tests/unit/test-smp-parse.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-par

[PATCH 10/14] tests/unit/test-smp-parse: Test "drawers" parameter in -smp

2024-03-06 Thread Zhao Liu
From: Zhao Liu Although drawer was introduced to -smp along with book by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling

[PATCH 14/14] tests/unit/test-smp-parse: Test "parameter=0" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu The support for "parameter=0" SMP configurations is removed, and QEMU returns error for those cases. So add the related test cases to ensure parameters can't accept 0. Signed-off-by: Zhao Liu --- tests/unit/test-smp-parse.c | 92 ++

Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-05 Thread Zhao Liu
On Wed, Mar 06, 2024 at 10:19:41AM +0530, Prasad Pandit wrote: > Date: Wed, 6 Mar 2024 10:19:41 +0530 > From: Prasad Pandit > Subject: Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" > SMP configurations > > Hello Zhao, > > On Wed, 6

<    1   2   3   4   5   6   7   8   9   10   >