Re: [PATCH 2/2] hw/arm: ast27x0: Wire up EHCI controllers

2025-04-22 Thread Cédric Le Goater
On 3/17/25 07:59, Troy Lee wrote: AST27x0 has 4 EHCI controllers, where each CPU and I/O die has 2 instances. This patch use existing TYPE_PLATFORM_EHCI. After wiring up the EHCI controller, the ast2700a1-evb can find up to 4 USB EHCI interfaces. ehci-platform 12061000.usb: EHCI Host Controller

Re: [PATCH] hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses

2025-04-22 Thread Cédric Le Goater
On 4/22/25 02:27, Joe Komlodi wrote: cde3247651dc998da5dc1005148302a90d72f21f fixed atomicity for LDRD, which ends up making accesses 64-bits wide. However, the AST2600 bootloader can sometimes compile with LDRD instructions, which causes the acceses to fail when accessing the memory-mapped SPI f

Re: [PATCH v2 0/3] Update to test new ASPEED SDK version

2025-04-22 Thread Cédric Le Goater
On 4/23/25 03:40, Jamin Lin wrote: v1: Update to test new ASPEED SDK version for AST2600, AST2500 ,and AST1030. v2: Fix review issue for AST1030. Jamin Lin (3): tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 f

Re: [PATCH v2 3/3] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

2025-04-22 Thread Cédric Le Goater
On 4/23/25 03:40, Jamin Lin wrote: Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- tests/functional/test_arm_aspeed_ast1030.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast1030.py b/tests/fun

Re: [PATCH v5 3/3] vhost-user: return failure if backend crash when live migration

2025-04-22 Thread Haoqian He
> 2025年4月16日 10:47,Haoqian He 写道: > > Live migration should be terminated if the vhost-user backend crashes > before the migration completes. > > Specifically, since the vhost device will be stopped when VM is stopped > before the end of the live migration, in current implementation if the > b

Re: [PATCH] Reapply "virtio-net: Copy received header to buffer"

2025-04-22 Thread Michael S. Tsirkin
On Wed, Apr 23, 2025 at 03:19:30PM +0900, Akihiko Odaki wrote: > This reverts commit e28fbd1c525db21f0502b85517f49504c9f9dcd8. > > The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to > buffer") was to remove the need to patch the (const) input buffer with a > recomputed UDP check

Re: [PATCH V2 0/3] acpi: Add machine option to disable SPCR table

2025-04-22 Thread bibo mao
On 2025/4/22 下午8:03, Li Chen wrote: This series introduces a new machine option, spcr=on|off, allowing users to disable the ACPI SPCR (Serial Port Console Redirection) table. By default, SPCR is enabled. Disabling it can help ensure that the guest > console behavior is determined solely by ke

Re: [RFC PATCH v4 14/19] qemu/target_info: Add %target_arch field to TargetInfo

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 23:24, Pierrick Bouvier wrote: On 4/22/25 22:34, Philippe Mathieu-Daudé wrote: On 22/4/25 20:30, Pierrick Bouvier wrote: On 4/22/25 11:24, Philippe Mathieu-Daudé wrote: On 22/4/25 20:20, Pierrick Bouvier wrote: On 4/22/25 07:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philipp

Re: [RFC PATCH v4 14/19] qemu/target_info: Add %target_arch field to TargetInfo

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 22:34, Philippe Mathieu-Daudé wrote: On 22/4/25 20:30, Pierrick Bouvier wrote: On 4/22/25 11:24, Philippe Mathieu-Daudé wrote: On 22/4/25 20:20, Pierrick Bouvier wrote: On 4/22/25 07:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---    include/qemu/targe

[PATCH] Reapply "virtio-net: Copy received header to buffer"

2025-04-22 Thread Akihiko Odaki
This reverts commit e28fbd1c525db21f0502b85517f49504c9f9dcd8. The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to buffer") was to remove the need to patch the (const) input buffer with a recomputed UDP checksum by copying headers to a RW region and inject the checksum there. The

Re: [PATCH 18/18] amd_iommu: Do not emit I/O page fault events during replay()

2025-04-22 Thread Sairaj Kodilkar
On 4/14/2025 7:32 AM, Alejandro Jimenez wrote: Do not emit an I/O page fault on amdvi_page_walk() when a valid mapping is not found. The current role of amdvi_page_walk() is to be a helper for the translate() method and ultimately the IOMMU replay() functionality. These operations might be exe

Re: [PATCH 16/18] amd_iommu: Do not assume passthrough translation when DTE[TV]=0

2025-04-22 Thread Sairaj Kodilkar
On 4/14/2025 7:32 AM, Alejandro Jimenez wrote: The AMD I/O Virtualization Technology (IOMMU) Specification (see Table 8: V, TV, and GV Fields in Device Table Entry), specifies that a DTE with V=0, TV=1 does not contain a valid address translation information. This should be "V=1, TV=0". Reg

Re: [PATCH v2 11/20] util/cacheflush.c: Update cache flushing mechanism for Emscripten

2025-04-22 Thread Kohei Tokunaga
Hi Philippe, >On 22/4/25 07:27, Kohei Tokunaga wrote: >> Although __builtin___clear_cache is used to flush the instruction cache for >> a specified memory region[1], this operation doesn't apply to wasm, as its >> memory isn't executable. Moreover, Emscripten does not support this builtin >> and f

Re: [PATCH v3 1/2] intel_iommu: Take the bql before registering a new address space

2025-04-22 Thread Michael S. Tsirkin
On Wed, Apr 23, 2025 at 05:38:20AM +, CLEMENT MATHIEU--DRIF wrote: > Address space creation might end up being called without holding the > bql as it is exposed through the IOMMU ops. > > Signed-off-by: Clement Mathieu--Drif > --- > hw/i386/intel_iommu.c | 6 ++ > 1 file changed, 6 inser

[PATCH v3 2/2] intel_iommu: Use BQL_LOCK_GUARD to manage cleanup automatically

2025-04-22 Thread CLEMENT MATHIEU--DRIF
vtd_switch_address_space needs to take the BQL if not already held. Use BQL_LOCK_GUARD to make the iommu implementation more consistent. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/i386/intel_iomm

[PATCH v3 1/2] intel_iommu: Take the bql before registering a new address space

2025-04-22 Thread CLEMENT MATHIEU--DRIF
Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index dffd7ee885

Re: [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings

2025-04-22 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 23/4/25 07:24, Akihiko Odaki wrote: On 2025/04/23 5:31, Pierrick Bouvier wrote: On 4/22/25 12:45, Philippe Mathieu-Daudé wrote: On 22/4/25 20:36, Pierrick Bouvier wrote: On 4/22/25 10:19, Philippe Mathieu-Daudé wrote: When using Visual Studio Code (v1.99.3) and Apple clangd v1

Re: [RFC PATCH v4 14/19] qemu/target_info: Add %target_arch field to TargetInfo

2025-04-22 Thread Philippe Mathieu-Daudé
On 22/4/25 20:30, Pierrick Bouvier wrote: On 4/22/25 11:24, Philippe Mathieu-Daudé wrote: On 22/4/25 20:20, Pierrick Bouvier wrote: On 4/22/25 07:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---    include/qemu/target-info-impl.h   | 4    configs/targets/aarch6

Re: [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings

2025-04-22 Thread Akihiko Odaki
On 2025/04/23 5:31, Pierrick Bouvier wrote: On 4/22/25 12:45, Philippe Mathieu-Daudé wrote: On 22/4/25 20:36, Pierrick Bouvier wrote: On 4/22/25 10:19, Philippe Mathieu-Daudé wrote: When using Visual Studio Code (v1.99.3) and Apple clangd v17.0.0 I get:     In file included from ../../qapi/st

Re: [PATCH v8 15/55] i386/tdx: Implement user specified tsc frequency

2025-04-22 Thread Zhao Liu
On Tue, Apr 01, 2025 at 09:01:25AM -0400, Xiaoyao Li wrote: > Date: Tue, 1 Apr 2025 09:01:25 -0400 > From: Xiaoyao Li > Subject: [PATCH v8 15/55] i386/tdx: Implement user specified tsc frequency > X-Mailer: git-send-email 2.34.1 > > Reuse "-cpu,tsc-frequency=" to get user wanted tsc frequency an

[PATCH v3 0/3] hw/misc/aspeed_otp: Introduce OTP memory and integrate with SBC

2025-04-22 Thread Kane Chen via
From: Kane-Chen-AS Dear reviewers, This patch series introduces a new model for the ASPEED OTP (One-Time Programmable) memory and integrates it with the ASPEED Secure Boot Controller (SBC) and SoC models such as AST1030 and AST2600. The OTP memory is implemented as a QEMU device (`aspeed.otpmem

[PATCH v3 3/3] hw/arm: Integrate Aspeed OTP memory into AST10x0 and AST2600 SoCs

2025-04-22 Thread Kane Chen via
From: Kane-Chen-AS This patch wires up the OTP memory device (`aspeed.otpmem`) into the AST1030 and AST2600 SoC models. The device is initialized, attached to a backing block drive (`-drive id=otpmem`) and linked to the SBC controller via a QOM link. The default OTP memory image can be generated

[PATCH v3 2/3] hw/misc/aspeed_sbc: Connect Aspeed OTP memory device to SBC controller

2025-04-22 Thread Kane Chen via
From: Kane-Chen-AS This patch integrates the `aspeed.otpmem` device with the ASPEED Secure Boot Controller (SBC). The SBC now accepts an OTP backend via a QOM link property ("otpmem"), enabling internal access to OTP content for controller-specific logic. This connection provides the foundation

[PATCH v3 1/3] hw/misc/aspeed_otp: Add Aspeed OTP memory device model

2025-04-22 Thread Kane Chen via
From: Kane-Chen-AS This introduces a new model for the ASPEED OTP (One-Time Programmable) memory. The device is implemented as a `SysBusDevice` and provides an abstracted interface for OTP read, write (program), and default value initialization. OTP content is backed by a block device and suppor

[PATCH v2 3/3] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

2025-04-22 Thread Jamin Lin via
Signed-off-by: Jamin Lin --- tests/functional/test_arm_aspeed_ast1030.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast1030.py b/tests/functional/test_arm_aspeed_ast1030.py index d45d9f7c1c..77037f0179 100755 --- a/tests/functi

[PATCH v2 1/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500

2025-04-22 Thread Jamin Lin via
Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_arm_aspeed_ast2500.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional/test_arm_aspeed_ast2500.py index 1ffba6c995..90f3940e

[PATCH v2 0/3] Update to test new ASPEED SDK version

2025-04-22 Thread Jamin Lin via
v1: Update to test new ASPEED SDK version for AST2600, AST2500 ,and AST1030. v2: Fix review issue for AST1030. Jamin Lin (3): tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600 tests/functional/aspeed: Upd

[PATCH v2 2/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600

2025-04-22 Thread Jamin Lin via
Update test for AST2600 production revision A3. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_arm_aspeed_ast2600.py | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2600.py b/tests/functio

RE: [PATCH v1 3/3] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

2025-04-22 Thread Jamin Lin
Hi Philip, Cedric, > > On 4/22/25 11:15, Jamin Lin wrote: > > Updated test to target SDK version v03.00. > > Removed redundant test case to simplify validation. > > Cleaned up unsupported shell commands. > > Were some commands removed from SDK v03.00 ? Testing different zephyr Thanks for revie

Re: [PATCH V2 1/3] acpi: Add machine option to disable SPCR table

2025-04-22 Thread Gavin Shan
On 4/22/25 10:05 PM, Li Chen wrote: From: Li Chen The ACPI SPCR (Serial Port Console Redirection) table allows firmware to specify a preferred serial console device to the operating system. On ARM64 systems, Linux by default respects this table: even if the kernel command line does not include

Re: [PATCH RFC] target: riscv: Add Svrsw60b59b extension support

2025-04-22 Thread Deepak Gupta
On Fri, Mar 14, 2025 at 11:48:33AM +0100, Alexandre Ghiti wrote: The Svrsw60b59b extension allows to free the PTE reserved bits 60 and 59 for software to use. Apart from what you already caught. Extension is dependnet on Sv39. So it should be validated somewhere. Perhaps in `riscv_cpu_validate_

[PULL 0/9] target/avr: Increase TARGET_PAGE_BITS to 10

2025-04-22 Thread Richard Henderson
The following changes since commit 1da8f3a3c53b604edfe0d55e475102640490549e: Open 10.1 development tree (2025-04-22 15:09:23 -0400) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-avr-20250422 for you to fetch changes up to

[PULL 8/9] hw/avr: Prepare for TARGET_PAGE_SIZE > 256

2025-04-22 Thread Richard Henderson
If i/o does not cover the entire first page, allocate a portion of ram as an i/o device, so that the entire first page is i/o. While memory_region_init_ram_device_ptr is happy to allocate the RAMBlock, it does not register the ram for migration. Do this by hand. Reviewed-by: Pierrick Bouvier Sig

[PULL 6/9] target/avr: Use cpu_stb_mmuidx_ra in helper_fullwr

2025-04-22 Thread Richard Henderson
Avoid direct use of address_space_memory. Make use of the softmmu cache of the i/o page. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/helper.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target/avr/helper.c b/target/avr/helper.

[PULL 5/9] target/avr: Remove NUMBER_OF_IO_REGISTERS

2025-04-22 Thread Richard Henderson
This define is no longer used. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 6f68060ab0..9862705c6a 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -45,8

[PULL 2/9] target/avr: Remove OFFSET_CPU_REGISTERS

2025-04-22 Thread Richard Henderson
This define isn't really used. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/cpu.h| 2 -- target/avr/helper.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index

[PULL 7/9] target/avr: Use do_stb in avr_cpu_do_interrupt

2025-04-22 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/avr/helper.c b/target/avr/helper.c index 7d6954ec26..f23fa3e8ba 100644 --- a/target/

[PULL 1/9] target/avr: Improve decode of LDS, STS

2025-04-22 Thread Richard Henderson
The comment about not being able to define a field with zero bits is out of date since 94597b6146f3 ("decodetree: Allow !function with no input bits"). This fixes the missing load of imm in the disassembler. Cc: qemu-sta...@nongnu.org Fixes: 9d8caa67a24 ("target/avr: Add support for disassembling

[PULL 3/9] target/avr: Add defines for i/o port registers

2025-04-22 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/cpu.h| 10 ++ target/avr/helper.c | 36 ++-- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/target/avr/cpu.h b/target/a

[PULL 4/9] target/avr: Move cpu register accesses into system memory

2025-04-22 Thread Richard Henderson
Integrate the i/o 0x00-0x1f and 0x38-0x3f loopbacks into the cpu registers with normal address space accesses. We no longer need to trap accesses to the first page within avr_cpu_tlb_fill but can wait until a write occurs. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- targe

[PULL 9/9] target/avr: Increase TARGET_PAGE_BITS to 10

2025-04-22 Thread Richard Henderson
Now that we can handle the MCU allocating only a portion of the first page to i/o, increase the page size. Choose 10 as larger than the i/o on every MCU, just so that this path is tested. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/avr/cpu-param.h | 8 +--- 1

Re: [PATCH] hw/arm: Attach PSPI module to NPCM8XX SoC

2025-04-22 Thread Hao Wu
On Mon, Apr 14, 2025 at 3:43 AM Philippe Mathieu-Daudé wrote: > On 14/4/25 04:06, Tim Lee wrote: > > Nuvoton's PSPI is a general purpose SPI module which enables > > connections to SPI-based peripheral devices. Attach it to the NPCM8XX. > > > > Tested: > > NPCM8XX PSPI driver probed successfully

Re: [PATCH 140/147] tcg: Pass max_threads not max_cpus to tcg_init

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:28, Richard Henderson wrote: In effect, hoist the check for mttcg from tcg_n_regions() to tcg_init_machine(). Signed-off-by: Richard Henderson --- include/tcg/startup.h | 6 +++--- tcg/tcg-internal.h| 2 +- accel/tcg/tcg-all.c | 14 -- tcg/region.c

Re: [PATCH 144/147] accel/tcg: Move mttcg warning to tcg_init_machine

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:28, Richard Henderson wrote: Delay the warning to tcg_init_machine, because we will have resolved the CPUClass at that point. Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) Reviewed-by: Pi

Re: [PATCH 142/147] accel/tcg: Remove mttcg_enabled

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:28, Richard Henderson wrote: In qemu_tcg_mttcg_enabled, read the value from TCGState and eliminate the separate global variable. Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Pierrick Bouvi

Re: [PATCH 066/147] include/exec: Move TLB_MMIO, TLB_DISCARD_WRITE to slow flags

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Recover two bits from the inline flags. Signed-off-by: Richard Henderson --- include/exec/tlb-flags.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) Reviewed-by: Pierrick Bouvier

Re: [PATCH 065/147] accel/tcg: Rebuild full flags in tlb_reset_dirty_range_locked

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Undo the split between inline and slow flags before masking. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Pierrick Bouvier

Re: [PATCH 064/147] accel/tcg: Pass CPUTLBEntryFull to tlb_reset_dirty_range_locked

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: While we're renaming things, don't modify addr; save it for reuse in the qatomic_set. Compute the host address into a new local variable. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 20 ++-- 1 file changed, 10 insertio

Re: [PATCH 063/147] accel/tcg: Fix argument types of tlb_reset_dirty

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: The arguments to tlb_reset_dirty are host pointers. The conversion from ram_addr_t was done in the sole caller, tlb_reset_dirty_range_all. Fixes: e554861766d ("exec: prepare for splitting") Signed-off-by: Richard Henderson --- include/exec/cputlb.h |

Re: [PATCH 057/147] include/exec: Protect icount_enabled from poisoned symbols

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/exec/icount.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Pierrick Bouvier

Re: [PATCH 056/147] include/exec: Split out icount.h

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Split icount stuff from system/cpu-timers.h. There are 17 files which only require icount.h, 7 that only require cpu-timers.h, and 7 that require both. Signed-off-by: Richard Henderson --- include/exec/icount.h| 68 +++

Re: [PATCH 048/147] include/exec: Split out watchpoint.h

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Relatively few objects in qemu care about watchpoints, so split out to a new header. Removes an instance of CONFIG_USER_ONLY from hw/core/cpu.h. Signed-off-by: Richard Henderson --- include/exec/watchpoint.h | 41 ++

Re: [PATCH 047/147] semihosting: Assert is_user in user-only semihosting_enabled

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- semihosting/user.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Pierrick Bouvier

Re: [PATCH 030/147] accel/tcg: Use cpu_ld*_code_mmu in translator.c

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:26, Richard Henderson wrote: Cache the mmu index in DisasContextBase. Perform the read on host endianness, which lets us share code with the translator_ld fast path. Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 + accel/tcg/translator.c| 58 ++

[PATCH 083/147] target/microblaze: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-13-phi...@linaro.org> --- target/microblaze/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mic

Re: [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings

2025-04-22 Thread Pierrick Bouvier
On 4/22/25 12:45, Philippe Mathieu-Daudé wrote: On 22/4/25 20:36, Pierrick Bouvier wrote: On 4/22/25 10:19, Philippe Mathieu-Daudé wrote: When using Visual Studio Code (v1.99.3) and Apple clangd v17.0.0 I get:    In file included from ../../qapi/string-output-visitor.c:14:    qemu/include/qe

[PATCH 126/147] tcg: Include missing 'cpu.h' in translate-all.c

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé tb_check_watchpoint() calls cpu_get_tb_cpu_state(), which is declared in each "cpu.h" header. It is indirectly included via "tcg/insn-start-words.h". Since we want to rework "tcg/insn-start-words.h", removing "cpu.h" in the next commit, add the missing header now, oth

[PATCH 089/147] target/s390x: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(), restricting s390x_cpu_mmu_index() to TCG #ifdef. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-19-phi...@linaro.org>

[PATCH 138/147] tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé By directly using TCGCPUOps::guest_default_memory_order, we don't need the TCG_GUEST_DEFAULT_MO definition anymore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Rich

[PATCH 024/147] include/exec: Split out accel/tcg/cpu-mmu-index.h

2025-04-22 Thread Richard Henderson
The implementation of cpu_mmu_index was split between cpu-common.h and cpu-all.h, depending on CONFIG_USER_ONLY. We already have the plumbing common to user and system mode. Using MMU_USER_IDX requires the cpu.h for a specific target, and so is restricted to when we're compiling per-target. Incl

Re: [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings

2025-04-22 Thread Philippe Mathieu-Daudé
On 22/4/25 20:36, Pierrick Bouvier wrote: On 4/22/25 10:19, Philippe Mathieu-Daudé wrote: When using Visual Studio Code (v1.99.3) and Apple clangd v17.0.0 I get:    In file included from ../../qapi/string-output-visitor.c:14:    qemu/include/qemu/cutils.h:144:12: error: 'strchrnul' is only ava

[PATCH 136/147] tcg: Propagate CPUState argument to cpu_req_mo()

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé In preparation of having tcg_req_mo() access CPUState in the next commit, pass it to cpu_req_mo(), its single caller. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 3 ++- a

[PATCH 125/147] target/riscv: Do not expose rv128 CPU on user mode emulation

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé As Richard mentioned: We should allow RV128 in user-mode at all until there's a kernel abi for it. Remove the experimental 'x-rv128' CPU on user emulation (since it is experimental, no deprecation period is required). Reported-by: Richard Henderson Reviewed-by

[PATCH 049/147] hw/core: Move unconditional files to libsystem_ss, libuser_ss

2025-04-22 Thread Richard Henderson
Many of the headers used by these require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/core/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/meson.build b/hw/core/meson.build index b5a545a0ed..547de6527c 10064

[PATCH 121/147] hw/arm/digic_boards: prepare compilation unit to be common

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-27-pierrick.bouv...@linaro.org> --- hw/arm/digic_boards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/digic_

[PATCH 133/147] tcg: Simplify tcg_req_mo() macro

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Now that TCG_GUEST_DEFAULT_MO is always defined, simplify the tcg_req_mo() macro. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/inte

[PATCH 100/147] page-vary: Restrict scope of TARGET_PAGE_BITS_MIN

2025-04-22 Thread Richard Henderson
The only place we really need to know the minimum is within page-vary-target.c. Rename the target/arm TARGET_PAGE_BITS_MIN to TARGET_PAGE_BITS_LEGACY to emphasize what it really means. Move the assertions related to minimum page size as well. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard

[PATCH 124/147] hw/arm: make most of the compilation units common

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-30-pierrick.bouv...@linaro.org> --- hw/arm/meson.build | 112 ++--- 1 file changed, 56 insertions(+

[PATCH 143/147] tcg: Convert TCGState::mttcg_enabled to TriState

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Use the OnOffAuto type as 3-state. Since the TCGState instance is zero-initialized, the mttcg_enabled is initialzed as AUTO (ON_OFF_AUTO_AUTO). In tcg_init_machine(), if mttcg_enabled is still AUTO, set a default value (effectively inlining the default_mttcg_enabled

[PATCH 141/147] tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé qemu_tcg_mttcg_enabled() is specific to 1/ TCG and 2/ system emulation. Move the prototype declaration to "system/tcg.h", reducing 'mttcg_enabled' variable scope. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Me

[PATCH 061/147] meson: Only allow CONFIG_USER_ONLY from certain source sets

2025-04-22 Thread Richard Henderson
Poison CONFIG_USER_ONLY and CONFIG_SOFTMMU unless the compilation unit is in specific_ss, libuser_ss, or libsystem_ss. This is intended to prevent files being incorrectly added to common_ss. Remove #ifndef CONFIG_USER_ONLY / #error / #endif blocks. All they do is trigger the poison error. Review

[PATCH 122/147] hw/arm/xlnx-zynqmp: prepare compilation unit to be common

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Remove kvm unused headers. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-28-pierrick.bouv...@linaro.org> --- hw/arm/xlnx-zynqmp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/h

[PATCH 051/147] plugins: Move api.c, core.c to libuser_ss, libsystem_ss

2025-04-22 Thread Richard Henderson
Headers used by these files require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- plugins/meson.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/meson.build b/plugins/meson.build index 3be8245a69..5383c7b88b 100644 ---

[PATCH 055/147] include/hw/s390x: Remove ifndef CONFIG_USER_ONLY in css.h

2025-04-22 Thread Richard Henderson
We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/s390x/css.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index c

[PATCH 123/147] hw/arm/xlnx-versal: prepare compilation unit to be common

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Remove kvm unused headers. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-29-pierrick.bouv...@linaro.org> --- hw/arm/xlnx-versal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/h

[PATCH 085/147] target/openrisc: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-15-phi...@linaro.org> --- target/openrisc/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openr

[PATCH 080/147] target/i386: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move x86_cpu_mmu_index() to tcg-cpu.c, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-10-phi...@linaro.org> --- targe

[PATCH 120/147] hw/arm/boot: make compilation unit hw common

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Now we eliminated poisoned identifiers from headers, this file can now be compiled once for all arm targets. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-25-pierrick.bouv...@linaro.org

[PATCH 063/147] accel/tcg: Fix argument types of tlb_reset_dirty

2025-04-22 Thread Richard Henderson
The arguments to tlb_reset_dirty are host pointers. The conversion from ram_addr_t was done in the sole caller, tlb_reset_dirty_range_all. Fixes: e554861766d ("exec: prepare for splitting") Signed-off-by: Richard Henderson --- include/exec/cputlb.h | 2 +- accel/tcg/cputlb.c| 6 +++--- 2 fil

[PATCH 093/147] target/xtensa: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-23-phi...@linaro.org> --- target/xtensa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/

[PATCH 073/147] accel/tcg: Introduce TCGCPUOps::mmu_index() callback

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé We'll move CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-3-phi...@linaro.org> --- include/accel/tcg/cpu-mmu-index.h | 5

[PATCH 102/147] include/exec/cpu-all: move compile time check for CPUArchState to cpu-target.c

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-4-pierrick.bouv...@linaro.org> --- include/exec/cpu-all.h | 4

[PATCH 147/147] tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Instead of having a compile-time TARGET_SUPPORTS_MTTCG definition, have each target set the 'mttcg_supported' field in the TCGCPUOps structure. Since so far we only emulate one target architecture at a time, tcg_init_machine() gets whether MTTCG is supported via the

[PATCH 097/147] accel/tcg: Split out tlb-bounds.h

2025-04-22 Thread Richard Henderson
The CPU_TLB_DYN_{MIN,MAX}_BITS definitions are not required outside of cputlb.c and translate-all.c. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 27 --- accel/tcg/tlb-bounds.h| 32

[PATCH 129/147] exec: Restrict 'cpu-ldst-common.h' to accel/tcg/

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- include/{exec => accel/tcg}/cpu-ldst-common.h | 6 +++--- include/exec/cpu_ldst.h | 2 +- accel/tcg/trans

[PATCH 087/147] target/riscv: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move riscv_cpu_mmu_index() to the TCG-specific file, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-17-phi...@linaro.o

[PATCH 118/147] target/arm/cpu: remove inline stubs for aarch32 emulation

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Directly condition associated calls in target/arm/helper.c for now. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-23-pierrick.bouv...@linaro.org> --- target/arm/cpu.h| 8

[PATCH 082/147] target/m68k: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-12-phi...@linaro.org> --- target/m68k/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/cpu.

[PATCH 071/147] target/rx: Fix copy/paste typo (riscv -> rx)

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Rename riscv_cpu_mmu_index() -> rx_cpu_mmu_index(). Fixes: ef5cc166da1 ("target/rx: Populate CPUClass.mmu_index") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401072052.25892-1-phi...@linar

[PATCH 109/147] exec/cpu-all: remove cpu include

2025-04-22 Thread Richard Henderson
From: Pierrick Bouvier Now we made sure important defines are included using their direct path, we can remove cpu.h from cpu-all.h. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-14-pierrick.bouv...@linaro.org

[PATCH 074/147] target/alpha: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-4-phi...@linaro.org> --- target/alpha/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/alpha/cpu

[PATCH 132/147] tcg: Always define TCG_GUEST_DEFAULT_MO

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé We only require the TCG_GUEST_DEFAULT_MO for MTTCG-enabled frontends, otherwise we use a default value of TCG_MO_ALL. In order to simplify, require the definition for all targets, defining it for hexagon, m68k, rx, sh4 and tricore. Signed-off-by: Philippe Mathieu-Da

[PATCH 044/147] target/mips: Restrict semihosting tests to system mode

2025-04-22 Thread Richard Henderson
We do not set CONFIG_SEMIHOSTING in configs/targets/mips*-linux-user.mak. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/mips/cpu.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index b207106dd7..47df5

[PATCH 040/147] exec: Restrict memory-internal.h to system/

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Only file units within the system/ directory need access to "memory-internal.h". Restrict its scope by moving it there. The comment from commit 9d70618c684 ("memory-internal.h: Remove obsolete claim that header is obsolete") is now obsolete, remove it. Signed-off-by

[PATCH 046/147] semihosting: Move user-only implementation out-of-line

2025-04-22 Thread Richard Henderson
Avoid testing CONFIG_USER_ONLY in semihost.h. The only function that's required is semihosting_enabled. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/semihosting/semihost.h | 29 ++--- semihosting/stubs-al

[PATCH 081/147] target/loongarch: Restrict SoftMMU mmu_index() to TCG

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-11-phi...@linaro.org> --- target/loongarch/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/loon

[PATCH 139/147] tcg: Move cpu_req_mo() macro to target-agnostic 'backend-ldst.h'

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/backend-ldst.h| 41 + accel/tcg/internal-target.h | 28 - accel/tcg/cputlb.c

[PATCH 068/147] accel/tcg: Move get_page_addr_code* declarations

2025-04-22 Thread Richard Henderson
Move the declarations from exec/exec-all.h to the private accel/tcg/internal-common.h. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-common.h | 34 ++ include/exec/exec-all.h | 34 -- acc

[PATCH 142/147] accel/tcg: Remove mttcg_enabled

2025-04-22 Thread Richard Henderson
In qemu_tcg_mttcg_enabled, read the value from TCGState and eliminate the separate global variable. Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index bb759cec07..b75

[PATCH 130/147] exec: Restrict 'cpu_ldst.h' to accel/tcg/

2025-04-22 Thread Richard Henderson
From: Philippe Mathieu-Daudé Mechanical change using: $ sed -i -e 's,exec/cpu_ldst,accel/tcg/cpu-ldst,' \ $(git grep -l exec/cpu_ldst.h) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- bsd-use

  1   2   3   4   5   >