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

2024-03-12 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, > > > > > > > > Can you

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

2024-03-12 Thread Ani Sinha
> On 28-Feb-2024, at 20:03, Ani Sinha wrote: > > Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow > up to 4096 vCPUs") > Linux kernel can support upto a maximum number of 4096 vcpus when MAXSMP is > enabled in the kernel. At present, QEMU has been tested to

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

2024-03-12 Thread Markus Armbruster
Zhao Liu writes: > 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 >

[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 arguments". -smp is a system emulator

[PATCH v2 1/1] memory tier: acpi/hmat: create CPUless memory tiers after obtaining HMAT info

2024-03-12 Thread Ho-Ren (Jack) Chuang
The current implementation treats emulated memory devices, such as CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory (E820_TYPE_RAM). However, these emulated devices have different characteristics than traditional DRAM, making it important to distinguish them. Thus, we

[PATCH v2 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-12 Thread Ho-Ren (Jack) Chuang
When a memory device, such as CXL1.1 type3 memory, is emulated as normal memory (E820_TYPE_RAM), the memory device is indistinguishable from normal DRAM in terms of memory tiering with the current implementation. The current memory tiering assigns all detected normal memory nodes to the same DRAM

Re: [PATCH] spapr: avoid overhead of finding vhyp class in critical operations

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, One minor comment below: On 2/24/24 13:03, Nicholas Piggin wrote: PPC_VIRTUAL_HYPERVISOR_GET_CLASS is used in critical operations like interrupts and TLB misses and is quite costly. Running the kvm-unit-tests sieve program with radix MMU enabled thrashes the TCG TLB and spends a lot

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: * [1-4] already queued in migration-next. migration: Report error when shutdown fails migration: Remove SaveStateHandler and

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-12 Thread Pierrick Bouvier
On 3/11/24 14:08, Alex Bennée wrote: Pierrick Bouvier writes: Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-12 Thread Pierrick Bouvier
On 3/11/24 19:43, Alex Bennée wrote: Pierrick Bouvier writes: Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a

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

2024-03-12 Thread Thomas Huth
On 12/03/2024 07.46, Zhao Liu wrote: 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,

Re: [PATCH v3 08/20] qapi/schema: add type narrowing to lookup_type()

2024-03-12 Thread Markus Armbruster
John Snow writes: > On Mon, Mar 11, 2024 at 2:14 PM John Snow wrote: >> >> On Tue, Feb 20, 2024 at 5:39 AM Markus Armbruster wrote: >> > >> > John Snow writes: >> > >> > > This function is a bit hard to type as-is; mypy needs some assertions to >> > > assist with the type narrowing. >> > > >>

Re: [PATCH v3 09/20] qapi/schema: assert resolve_type has 'info' and 'what' args on error

2024-03-12 Thread Markus Armbruster
John Snow writes: > On Tue, Feb 20, 2024 at 5:48 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > resolve_type() is generally used to resolve configuration-provided type >> > names into type objects, and generally requires valid 'info' and 'what' >> > parameters. >> > >> > In some

Re: [RFC PATCH] contrib/plugins: control flow plugin (WIP!)

2024-03-12 Thread Pierrick Bouvier
On 3/11/24 19:34, Alex Bennée wrote: This is a simple control flow tracking plugin that uses the latest inline and conditional operations to detect and track control flow changes. It is currently an exercise at seeing how useful the changes are. Signed-off-by: Alex Bennée Based-on:

Re: [PATCH 08/13] ppc/pnv: Set POWER9, POWER10 ibm,pa-features bits

2024-03-12 Thread Cédric Le Goater
On 3/11/24 19:51, Nicholas Piggin wrote: Copy the pa-features arrays from spapr, adjusting slightly as described in comments. Cc: "Cédric Le Goater" Cc: "Frédéric Barrat" Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 67 --

[PATCH v2 2/2] hw/arm/sbsa-ref: Add cpu-map to device tree

2024-03-12 Thread Xiong Yining
From: xiongyining1480 Support CPU topology description through device tree. Signed-off-by: Xiong Yining Signed-off-by: Chen Baozi Reviewed-by: Marcin Juszkiewicz --- hw/arm/sbsa-ref.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/arm/sbsa-ref.c

[PATCH v2 1/2] hw/arm/sbsa-ref:Enable CPU cluster on ARM sbsa machine

2024-03-12 Thread Xiong Yining
From: xiongyining1480 Enable the CPU cluster on ARM sbsa machine, so user can configure the cluster hierarchy. Signed-off-by: Xiong Yining Signed-off-by: Chen Baozi Tested-by: Marcin Juszkiewicz --- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/sbsa-ref.c

Re: [PATCH] spapr: avoid overhead of finding vhyp class in critical operations

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 4:38 PM AEST, Harsh Prateek Bora wrote: > Hi Nick, > > One minor comment below: > > On 2/24/24 13:03, Nicholas Piggin wrote: > > PPC_VIRTUAL_HYPERVISOR_GET_CLASS is used in critical operations like > > interrupts and TLB misses and is quite costly. Running the > >

Re: [PATCH 04/13] ppc/spapr: Remove copy-paste from pa-features

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, On 3/12/24 00:21, Nicholas Piggin wrote: TCG does not support copy/paste instructions. Remove it from ibm,pa-features. This has never been implemented under TCG or s/or/nor ? practically usable under KVM, so it won't be missed. Signed-off-by: Nicholas Piggin --- hw/ppc/spapr.c

Re: [PATCH 02/13] target/ppc: POWER10 does not have transactional memory

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 6:10 PM AEST, Harsh Prateek Bora wrote: > Hi Nick, > > One query/comment below: > > On 3/12/24 00:21, Nicholas Piggin wrote: > > POWER10 hardware implements a degenerate transactional memory facility > > in POWER8/9 PCR compatibility modes to permit migration from older > >

Re: [PATCH 01/13] ppc: Drop support for POWER9 and POWER10 DD1 chips

2024-03-12 Thread Harsh Prateek Bora
On 3/12/24 14:29, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 2:55 PM AEST, Harsh Prateek Bora wrote: On 3/12/24 10:20, Harsh Prateek Bora wrote: On 3/12/24 00:21, Nicholas Piggin wrote: The POWER9 DD1 and POWER10 DD1 chips are not public and are no longer of any use in QEMU. Remove

Re: [PATCH v3] docs/system/ppc: Document running Linux on AmigaNG machines

2024-03-12 Thread Bernhard Beschow
Am 9. März 2024 11:34:56 UTC schrieb BALATON Zoltan : >On Thu, 29 Feb 2024, BALATON Zoltan wrote: >> On Wed, 21 Feb 2024, BALATON Zoltan wrote: >>> Documentation on how to run Linux on the amigaone, pegasos2 and >>> sam460ex machines is currently buried in the depths of the qemu-devel >>>

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

2024-03-12 Thread Thomas Huth
On 12/03/2024 11.26, Zhao Liu wrote: 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: Hi

Re: [PATCH v3 00/29] hw, target: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
On 29/01/2024 17.44, Philippe Mathieu-Daudé wrote: Patches missing review: 1, 2, 5, 6, 8, 11, 14, 15, 29 It will be simpler if I get the whole series via my hw-cpus tree once fully reviewed. Since v2: - Rebased - bsd/linux-user - Preliminary clean cpu_reset_hold - Add R-b Since v1: - Avoid

[PATCH] tests: Raise timeouts for bufferiszero and crypto-tlscredsx509

2024-03-12 Thread Peter Maydell
On our gcov CI job, the bufferiszero and crypto-tlscredsx509 tests time out occasionally, making the job flaky. Double the timeout on these two tests. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2221 Signed-off-by: Peter Maydell --- cc stable just because

Re: [PATCH v5 52/65] i386/tdx: Wire TDX_REPORT_FATAL_ERROR with GuestPanic facility

2024-03-12 Thread Xiaoyao Li
On 3/11/2024 3:29 PM, Markus Armbruster wrote: Xiaoyao Li writes: On 3/7/2024 9:51 PM, Markus Armbruster wrote: Xiaoyao Li writes: On 2/29/2024 4:51 PM, Markus Armbruster wrote: Xiaoyao Li writes: Integrate TDX's TDX_REPORT_FATAL_ERROR into QEMU GuestPanic facility Originated-from:

Re: [PATCH 02/13] target/ppc: POWER10 does not have transactional memory

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, One query/comment below: On 3/12/24 00:21, Nicholas Piggin wrote: POWER10 hardware implements a degenerate transactional memory facility in POWER8/9 PCR compatibility modes to permit migration from older CPUs, but POWER10 / ISA v3.1 mode does not support it so the CPU model should not

Re: [PATCH v3] hw: gpio: introduce pcf8574 driver

2024-03-12 Thread Philippe Mathieu-Daudé
On 11/3/24 10:58, Dmitriy Sharikhin wrote: NXP PCF8574 and compatible ICs are simple I2C GPIO expanders. PCF8574 incorporates quasi-bidirectional IO, and simple communication protocol, when IO read is I2C byte read, and IO write is I2C byte write. User can think of it as open-drain port, when

Re: [PATCH] meson.build: Always require an objc compiler on macos hosts

2024-03-12 Thread Philippe Mathieu-Daudé
On 11/3/24 14:33, Peter Maydell wrote: We currently only insist that an ObjectiveC compiler is present on macos hosts if we're building the Cocoa UI. However, since then we've added some other parts of QEMU which are also written in ObjC: the coreaudio audio backend, and the vmnet net backend.

[PULL 09/13] hw/core: Cleanup unused included header in machine-qmp-cmds.c

2024-03-12 Thread Philippe Mathieu-Daudé
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 Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240311075621.3224684-3-zhao1@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v2 00/14] libvhost-user: support more memslots and cleanup memslot handling code

2024-03-12 Thread David Hildenbrand
On 11.03.24 21:03, Mario Casquero wrote: This series has been successfully tested by QE. Start the qemu-storage-daemon in the background with a rhel 9.5 image and vhost-user-blk. After that, boot up a VM with virtio-mem and vhost-user-blk-pci. Check with the HMP command 'info mtree' that

[PATCH v2 0/2] ARM Sbsa-ref: Enable CPU cluster topology

2024-03-12 Thread Xiong Yining
Enable CPU cluster support on SbsaQemu platform, so that users can specify a 4-level CPU hierarchy sockets/clusters/cores/threads. And this topology can be passed to the firmware through DT cpu-map. Changes in v2: - put this code before sbsa_fdt_add_gic_node(). xiongyining1480 (2):

Re: [RFC 0/2] Add RISC-V Server Platform Reference Board

2024-03-12 Thread Wu, Fei
On 3/8/2024 6:15 AM, Marcin Juszkiewicz wrote: > W dniu 4.03.2024 o 11:25, Fei Wu pisze: > >> The RISC-V Server Platform specification[1] defines a standardized >> set of hardware and software capabilities, that portable system >> software, such as OS and hypervisors can rely on being present in

Re: [PATCH v2 1/1] memory tier: acpi/hmat: create CPUless memory tiers after obtaining HMAT info

2024-03-12 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > The current implementation treats emulated memory devices, such as > CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory > (E820_TYPE_RAM). However, these emulated devices have different > characteristics than traditional DRAM, making it

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 06/13] ppc/spapr: Add pa-features for POWER10 machines

2024-03-12 Thread BALATON Zoltan
On Tue, 12 Mar 2024, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 7:07 AM AEST, BALATON Zoltan wrote: On Mon, 11 Mar 2024, Philippe Mathieu-Daudé wrote: On 11/3/24 19:51, Nicholas Piggin wrote: From: Benjamin Gray Add POWER10 pa-features entry. Notably DEXCR and and [P]HASHST/[P]HASHCHK

RE: [PATCH v2 4/9] aspeed/smc: Add AST2700 support

2024-03-12 Thread Jamin Lin
> On 3/4/24 10:29, Jamin Lin wrote: > > AST2700 fmc/spi controller's address decoding unit is 64KB and only > > bits [31:16] are used for decoding. Introduce seg_to_reg and > > reg_to_seg handlers for ast2700 fmc/spi controller. > > In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init

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: > > Hi Thomas/Markus/Michael, > > > >

Re: [PATCH 06/13] ppc/spapr: Add pa-features for POWER10 machines

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 7:34 PM AEST, Harsh Prateek Bora wrote: > > > On 3/12/24 00:21, Nicholas Piggin wrote: > > From: Benjamin Gray > > > > Add POWER10 pa-features entry. > > > > Notably DEXCR and and [P]HASHST/[P]HASHCHK instruction support is > > s/and and/and > > > advertised. Each DEXCR

[PULL for 9.0 0/8] final maintainer updates (testing, gdbstub)

2024-03-12 Thread Alex Bennée
The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging (2024-03-09 20:12:21 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git

Re: [PATCH v3 14/29] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
On 30/01/2024 14.01, Igor Mammedov wrote: On Mon, 29 Jan 2024 17:44:56 +0100 Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. commenting here since, I'm not expert on coccinelle scripts. On negative

Re: [PATCH] virtio-blk: iothread-vq-mapping coroutine pool sizing

2024-03-12 Thread Kevin Wolf
Am 11.03.2024 um 21:14 hat Stefan Hajnoczi geschrieben: > It is possible to hit the sysctl vm.max_map_count limit when the > coroutine pool size becomes large. Each coroutine requires two mappings > (one for the stack and one for the guard page). QEMU can crash with > "failed to set up stack guard

Re: [PATCH v5 49/65] i386/tdx: handle TDG.VP.VMCALL

2024-03-12 Thread Xiaoyao Li
On 3/11/2024 5:27 PM, Daniel P. Berrangé wrote: On Thu, Feb 29, 2024 at 01:37:10AM -0500, Xiaoyao Li wrote: From: Isaku Yamahata Add property "quote-generation-socket" to tdx-guest, which is a property of type SocketAddress to specify Quote Generation Service(QGS). On request of GetQuote, it

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

2024-03-12 Thread Thomas Huth
On 11/03/2024 04.38, Zhao Liu wrote: 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

Re: [PATCH] sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space

2024-03-12 Thread Philippe Mathieu-Daudé
On 11/3/24 09:28, Philippe Mathieu-Daudé wrote: On 11/3/24 07:43, Mark Cave-Ayland wrote: During kernel startup OpenBSD accesses addresses mapped by BAR0 of the ebus device but at offsets where no IO devices exist. Before commit 4aa07e8649 ("hw/sparc64/ebus: Access memory regions via

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

2024-03-12 Thread Philippe Mathieu-Daudé
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 ERRP_GUARD() for error_prepend() hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend() I'm queuing these 3

[PULL 05/13] hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Philippe Mathieu-Daudé
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 *

[PULL 03/13] hw/ppc/sam460ex: Support short options for adding drives

2024-03-12 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan Having to use -drive if=none,... and -device ide-[cd,hd] is inconvenient. Add support for shorter convenience options such as -cdrom and -drive media=disk. Also adjust two nearby comments for code style. Signed-off-by: BALATON Zoltan Message-ID:

[PULL 12/13] meson.build: Always require an objc compiler on macos hosts

2024-03-12 Thread Philippe Mathieu-Daudé
From: Peter Maydell We currently only insist that an ObjectiveC compiler is present on macos hosts if we're building the Cocoa UI. However, since then we've added some other parts of QEMU which are also written in ObjC: the coreaudio audio backend, and the vmnet net backend. This means that if

[PULL 01/13] hw/ide/ahci: Rename ahci_internal.h to ahci-internal.h

2024-03-12 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan Other headers now use dash instead of underscore. Rename ahci_internal.h accordingly for consistency. Signed-off-by: BALATON Zoltan Reviewed-by: Markus Armbruster Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 10/13] hw/core: Cleanup unused included headers in numa.c

2024-03-12 Thread Philippe Mathieu-Daudé
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" and then "make".

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

2024-03-12 Thread Zhao Liu
Hi Thomas/Markus/Michael, For the remaing patches, could you please help me merge them next? Many thanks! Zhao On Tue, Mar 12, 2024 at 09:17:30AM +0100, Philippe Mathieu-Daudé wrote: > Date: Tue, 12 Mar 2024 09:17:30 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH v2 00/29] Cleanup

Re: [PATCH 03/13] ppc/spapr|pnv: Remove SAO from pa-features

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, One cosmetic comment, in case you are doing a re-spin: On 3/12/24 00:21, Nicholas Piggin wrote: SAO is a page table attribute that strengthens the memory ordering of accesses. QEMU with MTTCG does not implement this, so clear it in ibm,pa-features. This is an obscure feature that has

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

2024-03-12 Thread Zhao Liu
On Wed, Feb 28, 2024 at 08:03:51PM +0530, Ani Sinha wrote: > Date: Wed, 28 Feb 2024 20:03:51 +0530 > From: Ani Sinha > Subject: [PATCH v5] pc: q35: Bump max_cpus to 4096 vcpus > X-Mailer: git-send-email 2.42.0 > > Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow > up

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

2024-03-12 Thread Thomas Huth
On 11/03/2024 04.38, Zhao Liu wrote: 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

Re: [PATCH] spapr: avoid overhead of finding vhyp class in critical operations

2024-03-12 Thread Harsh Prateek Bora
On 3/12/24 14:18, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 4:38 PM AEST, Harsh Prateek Bora wrote: Hi Nick, One minor comment below: On 2/24/24 13:03, Nicholas Piggin wrote: PPC_VIRTUAL_HYPERVISOR_GET_CLASS is used in critical operations like interrupts and TLB misses and is quite

Re: [PATCH 08/13] ppc/pnv: Set POWER9, POWER10 ibm,pa-features bits

2024-03-12 Thread Cédric Le Goater
On 3/12/24 09:54, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 6:06 PM AEST, Cédric Le Goater wrote: On 3/11/24 19:51, Nicholas Piggin wrote: Copy the pa-features arrays from spapr, adjusting slightly as described in comments. Cc: "Cédric Le Goater" Cc: "Frédéric Barrat" Signed-off-by:

Re: [PATCH 1/2] io: Introduce qio_channel_file_new_dupfd

2024-03-12 Thread Daniel P . Berrangé
On Mon, Mar 11, 2024 at 08:33:34PM -0300, Fabiano Rosas wrote: > Add a new helper function for creating a QIOChannelFile channel with a > duplicated file descriptor. This saves the calling code from having to > do error checking on the dup() call. > > Suggested-by: Daniel P. Berrangé >

[PULL 2/8] tests/vm: ensure we build everything by default

2024-03-12 Thread Alex Bennée
The "check" target by itself is not enough to ensure we build the user mode binaries. While we can't test them with check-tcg we can at least include them in the build. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Cc: Richard Henderson Cc: Gustavo Romero diff --git

[PULL 3/8] gdbstub: Rename back gdb_handlesig

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to add a wrapper for gdb_handlesig and rename it when a new parameter is added. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id:

[PULL 4/8] linux-user: Move tswap_siginfo out of target code

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Move tswap_siginfo from target code to handle_pending_signal. This will allow some cleanups and having the siginfo ready to be used in gdbstub. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Message-Id:

[PULL 6/8] gdbstub: Add Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Add stub to handle Xfer:siginfo:read packet query that requests the machine's siginfo data. This is used when GDB user executes 'print $_siginfo' and when the machine stops due to a signal, for instance, on SIGSEGV. The information in siginfo allows GDB to determiner

[PULL 7/8] tests/tcg: Add multiarch test for Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Add multiarch test for testing if Xfer:siginfo:read query is properly handled by gdbstub. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240309030901.1726211-6-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée diff --git

[PULL 5/8] gdbstub: Save target's siginfo

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user mode. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson Message-Id:

[PULL 8/8] gdbstub: Fix double close() of the follow-fork-mode socket

2024-03-12 Thread Alex Bennée
From: Ilya Leoshkevich When the terminal GDB_FORK_ENABLED state is reached, the coordination socket is not needed anymore and is therefore closed. However, if there is a communication error between QEMU gdbstub and GDB, the generic error handling code attempts to close it again. Fix by closing

[PULL 1/8] gitlab: aggressively avoid extra GIT data

2024-03-12 Thread Alex Bennée
This avoids fetching blobs and tree references for branches we are not going to worry about. Also skip tag references which are similarly not useful and keep the default --prune. This keeps the .git data to around 100M rather than the ~400M even a shallow clone takes. So we can check the savings

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-12 Thread Pierrick Bouvier
On 3/12/24 10:03, Pierrick Bouvier wrote: On 3/11/24 19:43, Alex Bennée wrote: Pierrick Bouvier writes: Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb -

Re: [PATCH 07/13] ppc/pnv: Permit ibm,pa-features set per machine variant

2024-03-12 Thread Cédric Le Goater
On 3/11/24 19:51, Nicholas Piggin wrote: This allows different pa-features for powernv8/9/10. Cc: "Cédric Le Goater" Cc: "Frédéric Barrat" Signed-off-by: Nicholas Piggin The features could be a chip class attribute instead. Thanks, C. --- hw/ppc/pnv.c | 41

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

2024-03-12 Thread Thomas Huth
On 11/03/2024 04.38, Zhao Liu wrote: 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

[PULL 07/13] sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space

2024-03-12 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland During kernel startup OpenBSD accesses addresses mapped by BAR0 of the ebus device but at offsets where no IO devices exist. Before commit 4aa07e8649 ("hw/sparc64/ebus: Access memory regions via pci_address_space_io()") BAR0 was mapped to legacy IO space which allows

[PULL 04/13] hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Philippe Mathieu-Daudé
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 *

[PULL 02/13] hw/pci: add some convenient trace-events for pcie and shpc hotplug

2024-03-12 Thread Philippe Mathieu-Daudé
From: Vladimir Sementsov-Ogievskiy Add trace-events that may help to debug problems with hotplugging. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240301154146.761531-2-vsement...@yandex-team.ru> Signed-off-by: Philippe Mathieu-Daudé ---

[PULL 08/13] hw/core: Cleanup unused included headers in cpu-common.c

2024-03-12 Thread Philippe Mathieu-Daudé
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 Reviewed-by: Philippe Mathieu-Daudé Message-ID:

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

2024-03-12 Thread Thomas Huth
On 12/03/2024 09.43, Zhao Liu wrote: Hi Thomas/Markus/Michael, For the remaing patches, could you please help me merge them next? Many thanks! Yes, I'm currently reviewing the ones that don't have a Reviewed-by yet. I can pick up the remaining patches if the other maintainers won't pick

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 wrote: > > Hi Xiaoyao, > > > > > >

Re: [PATCH v4 20/24] replay: simple auto-snapshot mode for record

2024-03-12 Thread Pavel Dovgalyuk
On 11.03.2024 20:40, Nicholas Piggin wrote: record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a

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

2024-03-12 Thread Thomas Huth
On 11/03/2024 04.38, Zhao Liu wrote: 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

Re: [PATCH 06/13] ppc/spapr: Add pa-features for POWER10 machines

2024-03-12 Thread Harsh Prateek Bora
On 3/12/24 00:21, Nicholas Piggin wrote: From: Benjamin Gray Add POWER10 pa-features entry. Notably DEXCR and and [P]HASHST/[P]HASHCHK instruction support is s/and and/and advertised. Each DEXCR aspect is allocated a bit in the device tree, using the 68--71 byte range (inclusive). The

Re: [PATCH 10/13] spapr: set MSR[ME] and MSR[FP] on client entry

2024-03-12 Thread Harsh Prateek Bora
On 3/12/24 00:21, Nicholas Piggin wrote: The initial MSR state for PAPR specifies MSR[ME] and MSR[FP] are set. Signed-off-by: Nicholas Piggin It would be good to mention PAPR section numbers suggesting the same. Anyways, Reviewed-by: Harsh Prateek Bora --- hw/ppc/spapr_cpu_core.c |

Re: [PATCH v3] docs/system/ppc: Document running Linux on AmigaNG machines

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 7:28 PM AEST, Bernhard Beschow wrote: > > > Am 9. März 2024 11:34:56 UTC schrieb BALATON Zoltan : > >On Thu, 29 Feb 2024, BALATON Zoltan wrote: > >> On Wed, 21 Feb 2024, BALATON Zoltan wrote: > >>> Documentation on how to run Linux on the amigaone, pegasos2 and > >>>

Re: [PATCH] gdbstub: Fix double close() of the follow-fork-mode socket

2024-03-12 Thread Alex Bennée
Ilya Leoshkevich writes: > When the terminal GDB_FORK_ENABLED state is reached, the coordination > socket is not needed anymore and is therefore closed. However, if there > is a communication error between QEMU gdbstub and GDB, the generic > error handling code attempts to close it again. > >

Re: [PATCH v3 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-03-12 Thread Anthony Harivel
Hi Daniel, Paolo, Here my last questions before wrapping up and send v4, or maybe call off my attempt to add RAPL interface in QEMU. Daniel P. Berrangé, Jan 30, 2024 at 10:39: > > +rcu_register_thread(); > > + > > +/* Get QEMU PID*/ > > +pid = getpid(); > > + > > +/* Nb of

[PATCH v2 1/5] plugins: prepare introduction of new inline ops

2024-03-12 Thread Pierrick Bouvier
Until now, only add_u64 was available, and all functions assumed this or were named uniquely. Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 2 +- plugins/plugin.h | 1 + accel/tcg/plugin-gen.c | 77 +- plugins/api.c | 23

[PATCH v2 5/5] tests/plugin/inline: add test for condition callback

2024-03-12 Thread Pierrick Bouvier
Count number of tb and insn executed using a conditional callback. We ensure the callback has been called expected number of time (per vcpu). Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 89 +-- 1 file changed, 86 insertions(+), 3

[PATCH v2 3/5] tests/plugin/inline: add test for STORE_U64 inline op

2024-03-12 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/tests/plugin/inline.c b/tests/plugin/inline.c index 0163e9b51c5..30acc7a1838 100644 --- a/tests/plugin/inline.c +++

[PATCH v2 2/5] plugins: add new inline op STORE_U64

2024-03-12 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 + include/qemu/qemu-plugin.h | 4 +- accel/tcg/plugin-gen.c | 114 - plugins/api.c | 2 + plugins/core.c | 4 ++ 5 files changed, 120 insertions(+), 5

[PATCH v2 4/5] plugins: conditional callbacks

2024-03-12 Thread Pierrick Bouvier
Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an immediate (op2). Callback is

[PATCH v2 0/5] TCG plugins new inline operations

2024-03-12 Thread Pierrick Bouvier
This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a callback only when a given condition is true. The condition is evaluated inline. It's possible to mix various inline operations (add, store)

[PULL 11/13] hw/gpio: introduce pcf8574 driver

2024-03-12 Thread Philippe Mathieu-Daudé
From: Dmitriy Sharikhin NXP PCF8574 and compatible ICs are simple I2C GPIO expanders. PCF8574 incorporates quasi-bidirectional IO, and simple communication protocol, when IO read is I2C byte read, and IO write is I2C byte write. User can think of it as open-drain port, when line high state is

[PULL 00/13] Misc HW patches for 2024-03-12

2024-03-12 Thread Philippe Mathieu-Daudé
The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging (2024-03-09 20:12:21 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-20240312 for you

[PULL 06/13] hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Philippe Mathieu-Daudé
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 *

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

2024-03-12 Thread Philippe Mathieu-Daudé
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 arguments". -smp is a system emulator

Re: [PATCH 08/13] ppc/pnv: Set POWER9, POWER10 ibm,pa-features bits

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 6:06 PM AEST, Cédric Le Goater wrote: > On 3/11/24 19:51, Nicholas Piggin wrote: > > Copy the pa-features arrays from spapr, adjusting slightly as > > described in comments. > > > > Cc: "Cédric Le Goater" > > Cc: "Frédéric Barrat" > > Signed-off-by: Nicholas Piggin > >

Re: [PATCH v4 11/24] net: Use virtual time for net announce

2024-03-12 Thread Pavel Dovgalyuk
This won't work, as needed. Announce timer can't be enabled, because it is set in post_load function. Therefore announce callbacks break the replay, when virtio-net is used with snapshots. On 11.03.2024 20:40, Nicholas Piggin wrote: Using virtual time for announce ensures that guest visible

Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Daniel P . Berrangé
On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > The file migration code was allowing a possible -1 from a failed call > to dup() to propagate into the new QIOFileChannel::fd before checking > for validity. Coverity doesn't like that, possibly due to the the > lseek(-1, ...) call

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: > > From: Zhao Liu > > > > At

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/12/24 08:16, Cédric Le Goater wrote: On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: * [1-4] already queued in migration-next.    migration: Report error when shutdown fails   

Re: [PATCH v4 20/24] replay: simple auto-snapshot mode for record

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 7:00 PM AEST, Pavel Dovgalyuk wrote: > On 11.03.2024 20:40, Nicholas Piggin wrote: > > record makes an initial snapshot when the machine is created, to enable > > reverse-debugging. Often the issue being debugged appears near the end of > > the trace, so it is important for

Re: [PATCH] disas/riscv: Further correction to LUI disassembly

2024-03-12 Thread Andrew Jones
On Mon, Mar 11, 2024 at 11:56:42AM -0700, Richard Bagley wrote: > I have realized that *the patch is indeed a fix*, not a workaround. > > In fact, the argument to LUI and AUIPC in assembly *must* be a number > between [0x0, 0xf]. > RISC-V Assembly Programmer's Manual : Load Upper Immediate's

Re: [PATCH] tests: Raise timeouts for bufferiszero and crypto-tlscredsx509

2024-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2024 at 11:08:15AM +, Peter Maydell wrote: > On our gcov CI job, the bufferiszero and crypto-tlscredsx509 > tests time out occasionally, making the job flaky. Double the > timeout on these two tests. > > Cc: qemu-sta...@nongnu.org > Resolves:

  1   2   3   4   5   6   7   >