Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs

2025-01-13 Thread Igor Mammedov
On Sun, 12 Jan 2025 23:16:40 +0100 Philippe Mathieu-Daudé wrote: > QDev objects created with object_new() need to manually add > their parent relationship with object_property_add_child(). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Zhao Liu > Message-Id: <20240216110313.17039-22-

Re: [PATCH v2 0/3] Change default pointer authentication algorithm on aarch64 to impdef

2025-01-13 Thread Peter Maydell
On Fri, 10 Jan 2025 at 16:28, Peter Maydell wrote: > > On Thu, 19 Dec 2024 at 18:32, Pierrick Bouvier > wrote: > > > > qemu-system-aarch64 default pointer authentication (QARMA5) is expensive, we > > spent up to 50% of the emulation time running it (when using TCG). > > > > Switching to pauth-imp

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-13 Thread Xu Yilun
On Mon, Jan 13, 2025 at 11:34:44AM +0800, Chenyi Qiang wrote: > > > On 1/10/2025 5:50 AM, Xu Yilun wrote: > > On Fri, Jan 10, 2025 at 05:00:22AM +0800, Xu Yilun wrote: > > https://github.com/aik/qemu/commit/3663f889883d4aebbeb0e4422f7be5e357e2ee46 > > but I am not sure if this

Re: [PATCH v3 0/8] qapi-go: add generator for Golang interfaces

2025-01-13 Thread Markus Armbruster
Victor Toso writes: > This patch series intent is to introduce a generator that produces a Go > module for Go applications to interact over QMP with QEMU. > > The initial Goal is to have a Go module that works as intended and can > be improved upon. I'd consider initial releases to be alpha while

Re: [PATCH] migration/multifd: Fix compile error caused by page_size usage

2025-01-13 Thread Fabiano Rosas
Michael Tokarev writes: > 03.12.2024 15:49, Shameer Kolothum via wrote: >> From Commit 90fa121c6c07 ("migration/multifd: Inline page_size and >> page_count") onwards page_size is not part of MutiFD*Params but uses >> an inline constant instead. >> >> However, it missed updating an old usage, ca

Re: [PATCH v5 0/6] hw/core: Unify hotplug decision logic

2025-01-13 Thread Igor Mammedov
On Fri, 10 Jan 2025 10:19:02 +0100 Philippe Mathieu-Daudé wrote: > Akihiko's v4 patch was doing too many things at once to > my taste, so I split it to follow dumbly each steps. > https://lore.kernel.org/qemu-devel/20250104-bus-v4-1-244cf1c6e...@daynix.com/ refactoring in some cases would lead t

Re: [PATCH v2 0/2] block: Fix leak in send_qmp_error_event

2025-01-13 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > Respin of Fabiano patch using g_autofree, > and clarifying method docstrings. > > Fabiano Rosas (1): > block: Fix leak in send_qmp_error_event > > Philippe Mathieu-Daudé (1): > block: Improve blk_get_attached_dev_id() docstring > > include/sysemu/block-backen

Re: [PATCH 6/7] RAMBlock: make guest_memfd require coordinate discard

2025-01-13 Thread Chenyi Qiang
On 1/13/2025 6:56 PM, David Hildenbrand wrote: > On 13.12.24 08:08, Chenyi Qiang wrote: >> As guest_memfd is now managed by guest_memfd_manager with >> RamDiscardManager, only block uncoordinated discard. >> >> Signed-off-by: Chenyi Qiang >> --- >>   system/physmem.c | 2 +- >>   1 file changed,

Re: [PATCH v8 0/9] target/riscv: Add support for Smdbltrp and Ssdbltrp extensions

2025-01-13 Thread Alistair Francis
On Fri, Jan 10, 2025 at 10:55 PM Clément Léger wrote: > > A double trap typically arises during a sensitive phase in trap handling > operations — when an exception or interrupt occurs while the trap > handler (the component responsible for managing these events) is in a > non-reentrant state. This

Re: CXL emulation on aarch64

2025-01-13 Thread Itaru Kitayama
Hi Jonathan, > On Jan 10, 2025, at 21:31, Jonathan Cameron > wrote: > > On Fri, 10 Jan 2025 09:20:54 + > "Zhijian Li (Fujitsu)" via wrote: > >> On 10/01/2025 13:29, Itaru Kitayama wrote: >>> Hi, >>> Is anybody working on the CXL emulation on aarch64? >> >> I'm not currently working on

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-01-13 Thread Alex Bennée
Pierrick Bouvier writes: > On 1/12/25 22:26, Thomas Huth wrote: >> On 11/01/2025 16.47, Philippe Mathieu-Daudé wrote: >>> On 10/1/25 21:37, Pierrick Bouvier wrote: On 1/10/25 12:33, Pierrick Bouvier wrote: > For now, it was only possible to build plugins using GCC on Windows. > Howev

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-01-13 Thread Pierrick Bouvier
On 1/13/25 13:19, Alex Bennée wrote: Pierrick Bouvier writes: On 1/12/25 22:26, Thomas Huth wrote: On 11/01/2025 16.47, Philippe Mathieu-Daudé wrote: On 10/1/25 21:37, Pierrick Bouvier wrote: On 1/10/25 12:33, Pierrick Bouvier wrote: For now, it was only possible to build plugins using GCC

[RFC PATCH] tests/qtest/migration: Add cpu hotplug test

2025-01-13 Thread Fabiano Rosas
Bug #2594 is about a failure during migration after a cpu hotplug. Add a test that covers that scenario. Start the source with -smp 2 and destination with -smp 3, plug one extra cpu to match and migrate. The issue seems to be a mismatch in the number of virtqueues between the source and destinatio

Re: [PATCH v2 0/3] Change default pointer authentication algorithm on aarch64 to impdef

2025-01-13 Thread Alex Bennée
Peter Maydell writes: > On Fri, 10 Jan 2025 at 16:28, Peter Maydell wrote: >> >> On Thu, 19 Dec 2024 at 18:32, Pierrick Bouvier >> wrote: >> > >> > qemu-system-aarch64 default pointer authentication (QARMA5) is expensive, >> > we >> > spent up to 50% of the emulation time running it (when usin

Re: [PATCH v4 0/6] Enhance documentation for new developers

2025-01-13 Thread Pierrick Bouvier
On 12/9/24 10:30, Pierrick Bouvier wrote: This series extends our documentation with new pages to help developers onboarding on QEMU. It focuses on providing a big picture of QEMU (to a modest extend). As such, it was written to be simple, short, easy to understand, and pointing to more details.

Re: [PATCH 11/23] docs/qapidoc: add preamble() method

2025-01-13 Thread John Snow
On Fri, Jan 10, 2025 at 7:19 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Jan 9, 2025, 5:34 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > On Fri, Dec 20, 2024 at 9:15 AM Markus Armbruster > wrote: > >> > > >> >> John Snow writes: > >> >> > >> >> > This

Re: [PATCH v4 4/5] virtio-gpu: Support asynchronous fencing

2025-01-13 Thread Alex Bennée
Dmitry Osipenko writes: > Support asynchronous fencing feature of virglrenderer. It allows Qemu to > handle fence as soon as it's signalled instead of periodically polling > the fence status. This feature is required for enabling DRM context > support in Qemu because legacy fencing mode isn't sup

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-13 Thread Chenyi Qiang
Thanks David for your review! On 1/13/2025 6:54 PM, David Hildenbrand wrote: > On 08.01.25 11:56, Chenyi Qiang wrote: >> >> >> On 1/8/2025 12:48 PM, Alexey Kardashevskiy wrote: >>> On 13/12/24 18:08, Chenyi Qiang wrote: As the commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoor

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-13 Thread Chenyi Qiang
On 1/13/2025 6:23 AM, Xu Yilun wrote: > On Mon, Jan 13, 2025 at 11:34:44AM +0800, Chenyi Qiang wrote: >> >> >> On 1/10/2025 5:50 AM, Xu Yilun wrote: >>> On Fri, Jan 10, 2025 at 05:00:22AM +0800, Xu Yilun wrote: >> >> https://github.com/aik/qemu/commit/3663f889883d4aebbeb0e4422f7be5e357e2

Re: [PATCH v2] target/riscv: Support Supm and Sspm as part of Zjpm v1.0

2025-01-13 Thread Alistair Francis
On Tue, Jan 14, 2025 at 5:45 AM wrote: > > From: Alexey Baturo > > Rebased against alistair/riscv-to-apply.next > > [v1]: I removed the lines above, as we don't want to include the changelog or rebase notes in the commit message > The Zjpm v1.0 spec states there should be Supm and Sspm extensio

[PATCH v2] tests/functional: Convert the kvm_xen_guest avocado test

2025-01-13 Thread Thomas Huth
Use the serial console to execute the commands in the guest instead of using ssh since we don't have ssh support in the functional framework yet. Acked-by: David Woodhouse Signed-off-by: Thomas Huth --- v2: Add "quiet" to KERNEL_DEFAULT to avoid races on the serial console MAINTAINERS

[PATCH 1/5] target/loongarch: Add dynamic function access with CSR register

2025-01-13 Thread Bibo Mao
With CSR register, dynamic function access is used for CSR register access in TCG mode, so that csr info can be used by other modules. Signed-off-by: Bibo Mao --- .../tcg/insn_trans/trans_privileged.c.inc | 37 +-- target/loongarch/tcg/tcg_loongarch.h | 12 ++ ta

[PATCH 2/5] target/loongarch: Remove static CSR function setting

2025-01-13 Thread Bibo Mao
Since CSR function setting is done dynamically in TCG mode, remove static CSR function setting here. Signed-off-by: Bibo Mao --- .../tcg/insn_trans/trans_privileged.c.inc| 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/loongarch/tcg/insn_trans/t

[PATCH 0/5] Dump all generic CSR registers

2025-01-13 Thread Bibo Mao
CSR registers is import system control registers, it had better to dump all CSR registers when VM is running in system mode, rather than dump part of those, since guest OS uses these CSR registers. And it is very useful to debug guest OS. Bibo Mao (5): target/loongarch: Add dynamic function acce

[PATCH 5/5] target/loongarch: Dump all generic CSR registers

2025-01-13 Thread Bibo Mao
CSR registers is import system control registers, it had better dump all CSR registers when VM is running in system mode. Here is dump output example of CSR registers: CSR000: CRMD b4 PRMD 4 EUEN 0 MISC 0 CSR004: ECFG 71c3d ESTAT 0 ERA 92e214c0 BADV 7361401c CSR008: BADI 2b CSR

[PATCH 4/5] target/loongarch: Add common source file for CSR register

2025-01-13 Thread Bibo Mao
Common source file csr.c is added here, it can be used by both TCG mode and kvm mode. The common code is removed from file tcg/insn_trans/trans_privileged.c.inc to csrc.c Signed-off-by: Bibo Mao --- target/loongarch/csr.c| 114 ++ target/loongarch/csr.h

Re: [PATCH 3/3] hw/arm/v7m: Remove use of &first_cpu in machine_init()

2025-01-13 Thread Samuel Tardieu
Philippe Mathieu-Daudé writes: > When instanciating the machine model, the machine_init() > implementations usually create the CPUs, so have access > to its first CPU. Use that rather then the &first_cpu > global. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Samuel Tardieu

[PATCH 3/5] target/loongarch: Add common header file for CSR register

2025-01-13 Thread Bibo Mao
Common header file csr.h is added here, it can be used by both TCG mode and kvm mode. Macro CONFIG_TCG is used for TCG specific CSR function because of function parameter such as TCGv and TCGv_ptr. Signed-off-by: Bibo Mao --- target/loongarch/csr.h| 35 +

Re: [PATCH 0/2] Clean up and enhance of feature_word_description()

2025-01-13 Thread Xiaoyao Li
On 12/17/2024 8:39 PM, Xiaoyao Li wrote: This series grabs two patches related to feature_word_description() from two different old threads, they are simple and straightforward. Patch 1 is grabbed from [1] while patch 2 is grabbed from [2]. Ping... [1]: https://lore.kernel.org/qemu-devel/20

Re: [PATCH v3 3/7] migration: Fix parsing of s390 stream

2025-01-13 Thread Thomas Huth
On 13/01/2025 08.51, Michael Tokarev wrote: 13.01.2025 09:39, Thomas Huth wrote: On 12/01/2025 15.29, Michael Tokarev wrote: # starting QEMU: exec ./qemu-system-s390x -qtest unix:/tmp/ qtest-1137270.sock -qtest-log /dev/null -chardev socket,path=/tmp/ qtest-1137270.qmp,id=char0 -mon chardev=

Re: [PATCH v3 3/7] migration: Fix parsing of s390 stream

2025-01-13 Thread Michael Tokarev
13.01.2025 11:19, Thomas Huth wrote: On 13/01/2025 08.51, Michael Tokarev wrote: Picked up:   1/7 migration: Add more error handling to analyze-migration.py   3/7 migration: Fix parsing of s390 stream   7/7 s390x: Fix CSS migration but still getting the same error:   https://gitlab.com/mjt0

Re: [PATCH 6/7] RAMBlock: make guest_memfd require coordinate discard

2025-01-13 Thread David Hildenbrand
On 13.12.24 08:08, Chenyi Qiang wrote: As guest_memfd is now managed by guest_memfd_manager with RamDiscardManager, only block uncoordinated discard. Signed-off-by: Chenyi Qiang --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c b/system

Re: [PULL v2 00/32] testing updates for 10.0 (tuxrun, libvirt, dockerfiles, misc)

2025-01-13 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]

2025-01-13 Thread Alex Bennée
Michael Tokarev writes: > Ghrm. 46 recipients seems to be quite a bit too aggressive.. I think git-publish just accumulates Cc's from each run for a given branch. While I can reset the version counter I'm not sure where I can reset the Cc list from. > 08.01.2025 15:10, Alex Bennée wrote: >> Tim

Re: [RFC PATCH] Fix race in live migration failure path

2025-01-13 Thread Peter Xu
On Fri, Jan 10, 2025 at 10:09:38AM -0300, Fabiano Rosas wrote: > Shivam Kumar writes: > > > Even if a live migration fails due to some reason, migration status > > should not be set to MIGRATION_STATUS_FAILED until migrate fd cleanup > > is done, else the client can trigger another instance of mi

Re: [PATCH] target/riscv: Support Supm and Sspm as part of Zjpm v1.0

2025-01-13 Thread Daniel Henrique Barboza
Hi Alexey, On 1/11/25 10:06 AM, baturo.ale...@gmail.com wrote: From: Alexey Baturo The Zjpm v1.0 spec states there should be Supm and Sspm extensions that are used in profile specification. Enabling Supm extension enables both Ssnpm and Smnpm, while Sspm enables only Smnpm. Signed-off-by: A

[PATCH v2 17/19] hw/mips/bootloader: Propagate CPU env to bl_gen_nop()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_nop() function. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index e57d5c3278f..a54af8160ef 1

Re: [PATCH 10/23] docs/qapidoc: add visit_freeform() method

2025-01-13 Thread John Snow
On Fri, Dec 20, 2024 at 8:25 AM Markus Armbruster wrote: > John Snow writes: > > > Signed-off-by: John Snow > > --- > > docs/sphinx/qapidoc.py | 47 ++ > > 1 file changed, 47 insertions(+) > > > > diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc

Re: [PATCH v4 0/3] Enable clang build on Windows

2025-01-13 Thread Pierrick Bouvier
On 1/12/25 22:26, Thomas Huth wrote: On 11/01/2025 16.47, Philippe Mathieu-Daudé wrote: On 10/1/25 21:37, Pierrick Bouvier wrote: On 1/10/25 12:33, Pierrick Bouvier wrote: For now, it was only possible to build plugins using GCC on Windows. However, windows-aarch64 only supports Clang. This bi

Re: [PATCH v4 1/3] win32: remove usage of attribute gcc_struct

2025-01-13 Thread Michael S. Tsirkin
On Fri, Jan 10, 2025 at 12:33:59PM -0800, Pierrick Bouvier wrote: > This attribute is not recognized by clang. > > An investigation has been performed to ensure this attribute has no > effect on layout of structures we use in QEMU [1], so it's safe to > remove now. > > In the future, we'll forbid

qemu-devel@nongnu.org

2025-01-13 Thread Jiaxun Yang
在2025年1月13日一月 下午7:55,Philippe Mathieu-Daudé写道: > v2: > - Add documentation > - Reorder propagation to reduce code churn around &first_cpu > > v1: > - Keep references to vCPUs in CPS and MaltaState, > - Refactor the MIPS Bootloader API to take CPU argument > - Access first CPU propagate from mach

qemu-devel@nongnu.org

2025-01-13 Thread Philippe Mathieu-Daudé
On 13/1/25 01:47, Philippe Mathieu-Daudé wrote: - Refactor the MIPS Bootloader API to take CPU argument Philippe Mathieu-Daudé (23): hw/mips/bootloader: Propagate CPU env to bootcpu_supports_isa() hw/mips/bootloader: Propagate CPU env to bl_gen_nop() hw/mips/bootloader: Propagate C

[PATCH v2 03/19] hw/mips/malta: Keep reference of vCPUs in MaltaState

2025-01-13 Thread Philippe Mathieu-Daudé
When a QOM object create children with object_new(), it is better to keep reference to them for further use. This will be helpful to remove &first_cpu uses in few commits. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-)

[PATCH v2 12/19] hw/mips/bootloader: Propagate CPU env to bl_gen_load_ulong()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_load_ulong() function. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootlo

[PATCH v2 09/19] hw/mips/bootloader: Document public API

2025-01-13 Thread Philippe Mathieu-Daudé
Document bl_gen_write_u[32,64,long]() and bl_gen_jump_[to,kernel]() prototypes. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/bootloader.h | 50 1 file changed, 50 insertions(+) diff --git a/include/hw/mips/bootloader.h b/include/hw/mips/bootload

[PATCH v2 06/19] hw/mips/boston: Replace bl_gen_write_ulong() -> bl_gen_write_u64()

2025-01-13 Thread Philippe Mathieu-Daudé
"exec/hwaddr.h" defines: typedef uint64_t hwaddr; typedef struct MemMapEntry { hwaddr base; hwaddr size; } MemMapEntry; Since MemMapEntry::base is always of type uint64_t, we can directly use bl_gen_write_u64(). Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 12

[PATCH v2 15/19] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_jalr() function. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index 288dccce473..a0fc840e89f

[PATCH v2 05/19] hw/mips/malta: Propagate MaltaState to bl_setup_gt64120_jump_kernel()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate MaltaState to bl_setup_gt64120_jump_kernel() so it can access the MaltaState::cpus[] array. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index ec8fd954b4b..f7eb990c

[PATCH v2 11/19] hw/mips/bootloader: Propagate CPU to bl_gen_jump_[to, kernel]()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target agnostic CPU pointer to the publicly declared bl_gen_jump_to() and bl_gen_jump_kernel() functions. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/bootloader.h | 6 -- hw/mips/bootloader.c | 6 +++--- hw/mips/boston.c | 2 +- hw/mips/fuloong

[PATCH v2 01/19] hw/mips/cps: Keep reference of vCPUs in MIPSCPSState

2025-01-13 Thread Philippe Mathieu-Daudé
When a QOM object create children with object_new(), it is better to keep reference to them for further use. In particular, this allow to remove one global &first_cpu use. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/cps.h | 1 + hw/mips/cps.c | 4 +++- 2 files changed, 4 in

[PATCH v2 04/19] hw/mips/malta: Propagate MaltaState to write_bootloader()

2025-01-13 Thread Philippe Mathieu-Daudé
Pass MaltaState as argument to write_bootloader() so next commit can propagate it to bl_setup_gt64120_jump_kernel(). Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 09

qemu-devel@nongnu.org

2025-01-13 Thread Philippe Mathieu-Daudé
v2: - Add documentation - Reorder propagation to reduce code churn around &first_cpu v1: - Keep references to vCPUs in CPS and MaltaState, - Refactor the MIPS Bootloader API to take CPU argument - Access first CPU propagate from machine_init() Based-on: <20250112215835.29320-1-phi...@linaro.org>

[PATCH v2 08/19] hw/mips/fuloong: Propagate CPU to write_bootloader()

2025-01-13 Thread Philippe Mathieu-Daudé
mips_fuloong2e_init() created the vCPU so has its reference, propagate it to write_bootloader(), removing the &first_cpu use. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloon

[PATCH v2 07/19] hw/mips/boston: Propagate CPU to gen_firmware()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate a CPU to gen_firmware(). Since we expect the first CPU to run the firmware, get it from the CPS in boston_mach_init(), resolving it using its QOM path. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/

[PATCH v2 19/19] hw/mips/bootloader: Remove use of &first_cpu in bootcpu_supports_isa()

2025-01-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index f02e5aabe48..1969610224d 100644 --- a/hw/mips/bootloader.c +++ b/hw/mips/bootloader.c @@ -51,7 +51,7 @@ typedef enum

[PATCH v2 18/19] hw/mips/bootloader: Propagate CPU env to bootcpu_supports_isa()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bootcpu_supports_isa() function. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index a

[PATCH v2 16/19] hw/mips/bootloader: Propagate CPU env to bl_gen_dsll()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_dsll() function. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index a0fc840e89f..e57d5c327

[PATCH v2 14/19] hw/mips/bootloader: Propagate CPU env to bl_gen_s[w, d]()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_sw() and bl_gen_sd() functions. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index

qemu-devel@nongnu.org

2025-01-13 Thread Philippe Mathieu-Daudé
Since create_cpu_without_cps() creates the vCPUs iterating up to the machine SMP count, it knows the first CPU is created upon the first iteration, at index #0 :) Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --g

[PATCH v2 10/19] hw/mips/bootloader: Propagate CPU to bl_gen_write_u[32, 64, long]()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target agnostic CPU pointer to the publicly declared bl_gen_write_u32(), bl_gen_write_u64() and bl_gen_write_ulong() functions. For the Malta machine in bl_setup_gt64120_jump_kernel(), pass its first CPU (the one we want to start running the bootloader). Signed-off-by: Philippe Math

[PATCH v2 13/19] hw/mips/bootloader: Propagate CPU env to bl_gen_[d]li()

2025-01-13 Thread Philippe Mathieu-Daudé
Propagate the target specific CPU env to the locally declared bl_gen_li() and bl_gen_dli() functions. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/bootloader.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c in

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-13 Thread David Hildenbrand
On 08.01.25 11:56, Chenyi Qiang wrote: On 1/8/2025 12:48 PM, Alexey Kardashevskiy wrote: On 13/12/24 18:08, Chenyi Qiang wrote: As the commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted, some subsystems like VFIO might disable ram block discard. However

[PATCH 0/3] gdbstub: Protect gdb_handlesig() with EXCLUSIVE_GUARD()

2025-01-13 Thread Ilya Leoshkevich
Hi, I ran into the issue with only one thread being stopped on a breakpoint hit [1] again [2]. While a proper solution to this includes kicking all threads using a reserved host signal and parking them, and is partially in review and partially in the works, this small series resolves most of the p

Re: [PULL 00/49] Misc HW patches for 2025-01-12

2025-01-13 Thread Philippe Mathieu-Daudé
Hi Stefan, Please drop this PR since Igor made a comment on a patch, Thanks! On 12/1/25 23:16, Philippe Mathieu-Daudé wrote: The following changes since commit 3214bec13d8d4c40f707d21d8350d04e4123ae97: Merge tag 'migration-20250110-pull-request' of https://gitlab.com/farosas/qemu into sta

Re: [PATCH v2] Add a b4 configuration file

2025-01-13 Thread Philippe Mathieu-Daudé
On 13/1/25 07:53, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 2/1/25 23:53, Jiaxun Yang wrote: b4 [1] is a convenient tool to manage patch series with mailing list working flow. Add a project default config file to match QEMU's mailing list conventions as well as adopting diffe

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-13 Thread Peter Xu
On Sat, Jan 11, 2025 at 01:15:24PM +0900, Akihiko Odaki wrote: > On 2025/01/11 0:18, Peter Xu wrote: > > On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote: > > > On 2025/01/10 4:37, Peter Xu wrote: > > > > On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: > > > > > On Thu, Jan 0

Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]

2025-01-13 Thread Michael Tokarev
Ghrm. 46 recipients seems to be quite a bit too aggressive.. 08.01.2025 15:10, Alex Bennée wrote: Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting

Re: [PATCH v3 3/7] migration: Fix parsing of s390 stream

2025-01-13 Thread Michael Tokarev
13.01.2025 16:03, Fabiano Rosas wrote: Michael Tokarev writes: 13.01.2025 11:19, Thomas Huth wrote: On 13/01/2025 08.51, Michael Tokarev wrote: Picked up:   1/7 migration: Add more error handling to analyze-migration.py   3/7 migration: Fix parsing of s390 stream   7/7 s390x: Fix CSS m

Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs

2025-01-13 Thread Philippe Mathieu-Daudé
On 13/1/25 13:28, Igor Mammedov wrote: On Sun, 12 Jan 2025 23:16:40 +0100 Philippe Mathieu-Daudé wrote: QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message

[PATCH 2/3] cpu: Introduce EXCLUSIVE_GUARD()

2025-01-13 Thread Ilya Leoshkevich
Add a macro that produces a start_exclusive() / end_exclusive() pair. Useful to guarantee an exit from an exclusive section in large functions. Signed-off-by: Ilya Leoshkevich --- include/hw/core/cpu.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/hw/core/cpu.h b/inclu

[PATCH 1/3] cpu: Set current_cpu early in qemu-user

2025-01-13 Thread Ilya Leoshkevich
gdb_handlesig() uses current_cpu. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c | 2 ++ linux-user/main.c| 2 ++ linux-user/syscall.c | 1 + 3 files changed, 5 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 0a5bc578365..aa052e515c9 100644 --- a/bsd-user/main.c

[PATCH 3/3] gdbstub: Protect gdb_handlesig() with EXCLUSIVE_GUARD()

2025-01-13 Thread Ilya Leoshkevich
If multiple threads hit a breakpoint at the same time, GDB gets confused [1]. Prevent this situation by stopping the other threads once a thread hits a breakpoint. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=32023 Signed-off-by: Ilya Leoshkevich --- gdbstub/user.c | 2 ++ 1 file changed

Re: [PATCH v6 6/8] chardev/char-mux: implement backend chardev multiplexing

2025-01-13 Thread Marc-André Lureau
Hi On Fri, Jan 10, 2025 at 7:39 PM Roman Penyaev wrote: > > On Fri, Jan 10, 2025 at 9:58 AM Daniel P. Berrangé > wrote: > > > > On Fri, Jan 10, 2025 at 09:43:52AM +0100, Roman Penyaev wrote: > > > On Thu, Jan 9, 2025 at 7:07 PM Daniel P. Berrangé > > > wrote: > > > > > > > > On Thu, Jan 09, 2

[PATCH] hw/usb/canokey: Fix buffer overflow for OUT packet

2025-01-13 Thread Hongren Zheng
When USBPacket in OUT direction has larger payload than the ep_out_buffer (of size 512), a buffer overflow would occur. It could be fixed by limiting the size of usb_packet_copy to be at most buffer size. Further optimization gets rid of the ep_out_buffer and directly uses ep_out as the target buf

[PULL 08/11] target/arm: add new property to select pauth-qarma5

2025-01-13 Thread Peter Maydell
From: Pierrick Bouvier Before changing default pauth algorithm, we need to make sure current default one (QARMA5) can still be selected. $ qemu-system-aarch64 -cpu max,pauth-qarma5=on ... Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-id: 20241219183211.3493974-2-pierr

[PULL 06/11] tests/qtest/boot-serial-test: Initialize PL011 Control register

2025-01-13 Thread Peter Maydell
From: Philippe Mathieu-Daudé The tests using the PL011 UART of the virt and raspi machines weren't properly enabling the UART and its transmitter previous to sending characters. Follow the PL011 manual initialization recommendation by setting the proper bits of the control register. Update the A

[PULL 10/11] target/arm: change default pauth algorithm to impdef

2025-01-13 Thread Peter Maydell
From: Pierrick Bouvier Pointer authentication on aarch64 is pretty expensive (up to 50% of execution time) when running a virtual machine with tcg and -cpu max (which enables pauth=on). The advice is always: use pauth-impdef=on. Our documentation even mentions it "by default" in docs/system/intr

[PULL 04/11] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests

2025-01-13 Thread Peter Maydell
From: Philippe Mathieu-Daudé Since registers are not modified, we don't need to refill their values. Directly jump to the previous store instruction to keep filling the TXDAT register. The equivalent C code remains: while (true) { *UART_DATA = 'T'; } Signed-off-by: Philippe Mathieu-D

[PULL 07/11] target/arm: Move minor arithmetic helpers out of helper.c

2025-01-13 Thread Peter Maydell
helper.c includes some small TCG helper functions used for mostly arithmetic instructions. These are TCG only and there's no need for them to be in the large and unwieldy helper.c. Move them out to their own source file in the tcg/ subdirectory, together with the op_addsub.h multiply-included tem

[PULL 00/11] target-arm queue

2025-01-13 Thread Peter Maydell
mu-arm.git tags/pull-target-arm-20250113 for you to fetch changes up to 435d260e7ec5ff9c79e3e62f1d66ec82d2d691ae: docs/system/arm/virt: mention specific migration information (2025-01-13 12:35:35 +) target-arm queue: * hw/

[PULL 11/11] docs/system/arm/virt: mention specific migration information

2025-01-13 Thread Peter Maydell
From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Message-id: 20241219183211.3493974-4-pierrick.bouv...@linaro.org [PMM: Removed a paragraph about using non-versioned models.] Signed-off-by: Peter Maydell --- docs/system/arm/virt.rst | 4 1 file changed, 4 insertions(+) diff --git a

[PULL 01/11] hw/arm_sysctl: fix extracting 31th bit of val

2025-01-13 Thread Peter Maydell
From: Anastasia Belova 1 << 31 is casted to uint64_t while bitwise and with val. So this value may become 0x8000 but only 31th "start" bit is required. This is not possible in practice because the MemoryRegionOps uses the default max access size of 4 bytes and so none of the upper by

[PULL 05/11] tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 test

2025-01-13 Thread Peter Maydell
From: Philippe Mathieu-Daudé In the next commit we are going to use a different value for the $w1 register, maintaining the same $x2 value. In order to keep the next commit trivial to review, set $x2 before $w1. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by:

[PULL 09/11] tests/tcg/aarch64: force qarma5 for pauth-3 test

2025-01-13 Thread Peter Maydell
The pauth-3 test explicitly tests that a computation of the pointer-authentication produces the expected result. This means that it must be run with the QARMA5 algorithm. Explicitly set the pauth algorithm when running this test, so that it doesn't break when we change the default algorithm the '

[PULL 03/11] tests/qtest/boot-serial-test: Improve ASM comments of PL011 tests

2025-01-13 Thread Peter Maydell
From: Philippe Mathieu-Daudé Re-indent ASM comments adding the 'loop:' label. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Fabiano Rosas Signed-off-by: Peter Maydell --- tests/qtest/boot-serial-test.c | 18 +- 1 file changed, 9 insertions

[PULL 02/11] hw/misc: cast rpm to uint64_t

2025-01-13 Thread Peter Maydell
From: Tigran Sogomonian The value of an arithmetic expression 'rpm * NPCM7XX_MFT_PULSE_PER_REVOLUTION' is a subject to overflow because its operands are not cast to a larger data type before performing arithmetic. Thus, need to cast rpm to uint64_t. Found by Linux Verification Center (linuxtesti

Re: A few patches for u-boot-sam460ex

2025-01-13 Thread BALATON Zoltan
Hello, On Tue, 7 Jan 2025, Michael Tokarev wrote: Hi! For some time, qemu package in debian carries several patches for roms/u-boot-sam460ex, fixing a number of issues. It'd be nice to have them in the official repository. I didn't applied these yet because I still intend to update to the

[PATCH v4 0/5] Change ghes driver to use HEST-based offsets

2025-01-13 Thread Mauro Carvalho Chehab
(patch resent as c/c ML was missing) This series was part of the previous PR to add generic error injection support on GHES. It depends on a cleanup patch series sent in December, pending merge: https://lore.kernel.org/qemu-devel/cover.1733297707.git.mchehab+hua...@kernel.org/T/#t It contai

[PATCH v4 2/5] acpi/ghes: add a firmware file with HEST address

2025-01-13 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its content at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- Change from v8: - hest_addr_lr is now pointing to the error source size and data. --- hw/acpi/ghes.c | 17 - include/hw

[PATCH v4 1/5] acpi/ghes: Prepare to support multiple sources on ghes

2025-01-13 Thread Mauro Carvalho Chehab
The current code is actually dependent on having just one error structure with a single source. As the number of sources should be arch-dependent, as it will depend on what kind of synchronous/assynchronous notifications will exist, change the logic to dynamically build the table. Yet, for a prop

Re: [PATCH v3 3/7] migration: Fix parsing of s390 stream

2025-01-13 Thread Fabiano Rosas
Fabiano Rosas writes: > Michael Tokarev writes: > >> 13.01.2025 11:19, Thomas Huth wrote: >>> On 13/01/2025 08.51, Michael Tokarev wrote: >> Picked up:   1/7 migration: Add more error handling to analyze-migration.py   3/7 migration: Fix parsing of s390 stream   7/7 s390

[PATCH v4 5/5] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-01-13 Thread Mauro Carvalho Chehab
Create a new property (x-has-hest-addr) and use it to detect if the GHES table offsets can be calculated from the HEST address (qemu 9.2 and upper) or via the legacy way via an offset obtained from the hardware_errors firmware file. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/generic_event_

[PATCH v4 3/5] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-01-13 Thread Mauro Carvalho Chehab
There are two pointers that are needed during error injection: 1. The start address of the CPER block to be stored; 2. The address of the ack, which needs a reset before next error. It is preferable to calculate them from the HEST table. This allows checking the source ID, the size of the table

[PATCH v4 4/5] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-01-13 Thread Mauro Carvalho Chehab
The GHES migration logic at GED should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/generic_event_device.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c i

Re: [PATCH v3 3/7] migration: Fix parsing of s390 stream

2025-01-13 Thread Fabiano Rosas
Michael Tokarev writes: > 13.01.2025 11:19, Thomas Huth wrote: >> On 13/01/2025 08.51, Michael Tokarev wrote: > >>> Picked up: >>> >>>   1/7 migration: Add more error handling to analyze-migration.py >>>   3/7 migration: Fix parsing of s390 stream >>>   7/7 s390x: Fix CSS migration >>> >>> but st

Re: [PULL 00/11] target-arm queue

2025-01-13 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH] hw/timer: fix int underflow

2025-01-13 Thread Дмитрий Фролов
Hello, Peter. I beg a pardon, but I guess, we have a misunderstanding here. The problem is that comparison "if (limit < 0)" will never be true. Thus, "true" branch is unreachable. According to the comment below, it was assumed that "limit" may be negative, and this means, that "QEMU is running to

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-13 Thread Chenyi Qiang
On 1/9/2025 12:29 PM, Chenyi Qiang wrote: > > > On 1/9/2025 10:55 AM, Alexey Kardashevskiy wrote: >> >> >> On 9/1/25 13:11, Chenyi Qiang wrote: >>> >>> >>> On 1/8/2025 7:20 PM, Alexey Kardashevskiy wrote: On 8/1/25 21:56, Chenyi Qiang wrote: > > > On 1/8/2025 12:48 P

Re: [PATCH 3/9] ppc/ppc405: Remove CPU

2025-01-13 Thread Nicholas Piggin
On Sat Jan 11, 2025 at 2:25 AM AEST, Richard Henderson wrote: > On 1/10/25 08:15, Philippe Mathieu-Daudé wrote: > > Hi Cédric, > > > > Cc'ing Laurent & Richard for user emulation. > > > ... > > The deprecation message (see previous patch) was about the > > "ppc ``ref405ep`` machine". Is that OK w

Re: [PATCH 0/9] ppc/pnv: HOMER and OCC fixes and improvements

2025-01-13 Thread Nicholas Piggin
On Tue Jan 7, 2025 at 8:00 AM AEST, Cédric Le Goater wrote: > Hello, > > On 12/10/24 04:04, Nicholas Piggin wrote: > > This series makes a bunch of fixes and improvements to the HOMER and > > OCC unit models for powernv. It gets OPAL OCC code happier again, > > Nice. I had similar changes exposing

  1   2   >