Re: [PATCH v2 1/1] hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation

2024-12-22 Thread Michael Tokarev
29.10.2024 11:53, Yong-Xuan Wang wrote: In the section "4.7 Precise effects on interrupt-pending bits" of the RISC-V AIA specification defines that: "If the source mode is Level1 or Level0 and the interrupt domain is configured in MSI delivery mode (domaincfg.DM = 1): The pending bit is cleared

Re: [PATCH 0/2] hw/timer/hpet: miscellaneous cleanup

2024-12-22 Thread Michael Tokarev
26.11.2024 19:30, Zhao Liu wrote: Hi, This series just cleans up the outdated comment and macro. Applied to the trivial-patches tree. Thanks! /mjt

Re: [PATCH] vvfat: fix ubsan issue in create_long_filename

2024-12-22 Thread Michael Tokarev
04.12.2024 22:51, Pierrick Bouvier wrote: Found with test sbsaref introduced in [1]. .. Applied to the trivial-patches tree. Thank you! /mjt

Re: [PATCH 0/3] docs: Trivial cleanups

2024-12-22 Thread Michael Tokarev
19.12.2024 18:02, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (3): docs: Correct '-runas' and '-fsdev/-virtfs proxy' indentation docs: Correct release of TCG trace-events removal docs: Replace 'since' -> 'removed in' in removed-features.rst Applied to the trivial-patches tre

Re: [PATCH] target/i386/cpu: Fix notes for CPU models

2024-12-22 Thread Michael Tokarev
19.12.2024 11:51, Han Han wrote: ... Applied to the trivial-patches tree, thank you! Please do Cc: qemu-devel@ the next time. /mjt

Re: [PATCH] target/i386/cpu: Fix notes for CPU models

2024-12-22 Thread Han Han
On Sun, Dec 22, 2024 at 4:59 PM Michael Tokarev wrote: > 19.12.2024 11:51, Han Han wrote: > ... > > Applied to the trivial-patches tree, thank you! > > Please do Cc: qemu-devel@ the next time. > > OK. Thanks for your advice > /mjt > >

Re: [PATCH 00/12] Next round of qemu_api patches

2024-12-22 Thread Zhao Liu
On Fri, Dec 20, 2024 at 03:29:42PM +0100, Paolo Bonzini wrote: > Date: Fri, 20 Dec 2024 15:29:42 +0100 > From: Paolo Bonzini > Subject: [PATCH 00/12] Next round of qemu_api patches > X-Mailer: git-send-email 2.47.1 > > This includes: > > 1) the outcome of reviewing > > https://lore.kernel.or

RE: [PATCH v1 04/19] intel_iommu: Fill the PASID field when creating an IOMMUTLBEntry

2024-12-22 Thread Duan, Zhenzhong
Hi Clement, >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: [PATCH v1 04/19] intel_iommu: Fill the PASID field when creating an >IOMMUTLBEntry > >From: Clément Mathieu--Drif > >PASID value must be used by devices as a key (or part of a key) >when populating their ATC with the

Re: [PATCH v4 6/6] hw/ppc/epapr: Do not swap ePAPR magic value

2024-12-22 Thread BALATON Zoltan
On Fri, 20 Dec 2024, Philippe Mathieu-Daudé wrote: The ePAPR magic value in $r6 doesn't need to be byte swapped. See ePAPR-v1.1.pdf chapter 5.4.1 "Boot CPU Initial Register State" and the following mailing-list threads: https://lore.kernel.org/qemu-devel/cafeaca_nr4xw5dnl4nq7vnh4xrh5uwbhqcxulykq

[PATCH v3 39/51] tcg/optimize: Use fold_masks_zs in fold_sextract

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 3f601e43a7..6bd73f

[PATCH v3 07/51] tcg/optimize: Use finish_folding in fold_add, fold_add_vec, fold_addsub2

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index fbc0dc5588..26d1c5d4a1 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -938,7 +938,7 @@ static

[PATCH v3 30/51] tcg/optimize: Use fold_masks_zs in fold_qemu_ld

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Be careful not to call fold_masks_zs when the memory operation is wide enough to require multiple outputs, so split into two functions: fold_qemu_ld_1reg and fold_qemu_ld_2reg. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimiz

[PATCH v3 37/51] tcg/optimize: Use finish_folding in fold_cmp_vec

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index e5c46dd6e2..db26cc347d 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2463,7 +2463,7 @@ static bool fo

[PATCH v3 27/51] tcg/optimize: Use fold_masks_s in fold_not

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 4196de9e16..e0cb9bf6bb 100644 --- a/tcg/optimize.c +++ b/tcg/o

[PATCH v3 36/51] tcg/optimize: Use fold_masks_z in fold_setcond2

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 16c1192a91..e5c46dd6e2 100644 --- a/tcg/optimize.c +++ b/tcg/optim

[PATCH v3 12/51] tcg/optimize: Use fold_masks_z in fold_ctpop

2024-12-22 Thread Richard Henderson
Add fold_masks_z as a trivial wrapper around fold_masks_zs. Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c

[PATCH v3 35/51] tcg/optimize: Use fold_masks_s in fold_negsetcond

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index b6911faca2..16c1192a91 100644 --- a/tcg/optimize.c +++ b/tcg/optim

[PATCH v3 08/51] tcg/optimize: Use fold_masks_zs in fold_and

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Sink mask computation below fold_affected_mask early exit. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) dif

[PATCH v3 44/51] tcg/optimize: Use finish_folding in fold_tcg_ld_memcopy

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index cd12985537..48324f122a 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2668,7 +2668,7 @@ static bool fo

[PATCH v3 13/51] tcg/optimize: Use fold_and and fold_masks_z in fold_deposit

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. When we fold to and, use fold_and. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/tcg/optimi

[PATCH v3 26/51] tcg/optimize: Use fold_masks_s in fold_nor

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 98fc5e02a6..4196de9e16 100644 --- a/tcg/optimize.c +++ b/tcg

[PATCH v3 46/51] tcg/optimize: Use finish_folding in fold_bitsel_vec

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 0cdbd1e262..3bb208d6e9 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2816,7 +2816,7 @@ static bool fo

[PATCH v3 43/51] tcg/optimize: Use fold_masks_zs in fold_tcg_ld

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 14d3d6253d..cd12985537 100644 --- a/tcg/optimize.c

[PATCH v3 42/51] tcg/optimize: Use finish_folding in fold_sub, fold_sub_vec

2024-12-22 Thread Richard Henderson
Duplicate fold_sub_vec into fold_sub instead of calling it, now that fold_sub_vec always returns true. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c i

[PATCH v3 19/51] tcg/optimize: Use finish_folding in fold_extract2

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5aca1b3c38..f05110cb9f 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1756,7 +1756,7 @@ static bool fo

[PATCH v3 40/51] tcg/optimize: Use fold_masks_zs, fold_masks_s in fold_shift

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6bd73f6afa..05

[PATCH v3 02/51] tcg/optimize: Split out fold_affected_mask

2024-12-22 Thread Richard Henderson
There are only a few logical operations which can compute an "affected" mask. Split out handling of this optimization to a separate function, only to be called when applicable. Remove the a_mask field from OptContext, as the mask is no longer stored anywhere. Reviewed-by: Pierrick Bouvier Signe

[PATCH v3 25/51] tcg/optimize: Use fold_masks_z in fold_neg_no_const

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index c634c20ce7..98fc5e02a6 100644 --- a/tcg/optimize.c +++ b/tc

[PATCH v3 15/51] tcg/optimize: Use finish_folding in fold_divide

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index b6a0bfe64e..0a617bac71 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1671,7 +1671,7 @@ static bool fo

[PATCH v3 45/51] tcg/optimize: Use fold_masks_zs in fold_xor

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Remove fold_masks as the function becomes unused. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tcg/optimize

[PATCH v3 49/51] tcg/optimize: Re-enable sign-mask optimizations

2024-12-22 Thread Richard Henderson
All instances of s_mask have been converted to the new representation. We can now re-enable usage. Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 902c219032..607697e19c 100644 ---

[PATCH v3 47/51] tcg/optimize: Use finish_folding as default in tcg_optimize

2024-12-22 Thread Richard Henderson
All non-default cases now finish folding within each function. Do the same with the default case and assert it is done after. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tcg/optimize.

[PATCH v3 22/51] tcg/optimize: Use fold_masks_zs in fold_movcond

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index bdf95d1924..5493d76ceb

[PATCH v3 14/51] tcg/optimize: Compute sign mask in fold_deposit

2024-12-22 Thread Richard Henderson
The input which overlaps the sign bit of the output can have its input s_mask propagated to the output s_mask. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/t

[PATCH v3 16/51] tcg/optimize: Use finish_folding in fold_dup, fold_dup2

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 0a617bac71..9906f370de 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1681,7 +1681,7 @@ static boo

[PATCH v3 41/51] tcg/optimize: Simplify sign bit test in fold_shift

2024-12-22 Thread Richard Henderson
Merge the two conditions, sign != 0 && !(z_mask & sign), by testing ~z_mask & sign. If sign == 0, the logical and will produce false. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tcg/

[PATCH v3 50/51] tcg/optimize: Move fold_bitsel_vec into alphabetic sort

2024-12-22 Thread Richard Henderson
The big comment just above says functions should be sorted. Add forward declarations as needed. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 114 + 1 file changed, 59 insertions(+), 55 deletions(-) diff --gi

[PATCH v3 51/51] tcg/optimize: Move fold_cmp_vec, fold_cmpsel_vec into alphabetic sort

2024-12-22 Thread Richard Henderson
The big comment just above says functions should be sorted. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 60 +- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c

[PATCH v3 10/51] tcg/optimize: Use fold_masks_zs in fold_bswap

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Always set s_mask along the BSWAP_OS path, since the result is being explicitly sign-extended. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 20 +--- 1 file changed, 9 insertions

[PATCH v3 48/51] tcg/optimize: Remove z_mask, s_mask from OptContext

2024-12-22 Thread Richard Henderson
All mask setting is now done with parameters via fold_masks_*. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 13 - 1 file changed, 13 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 7481b59d59..902c219032 100644 --- a/tcg/optimi

[PATCH v2 1/2] hw/loongarch/boot: Refactor EFI booting protocol generation

2024-12-22 Thread Jiaxun Yang
Refector EFI style booting data structure generation to support 32bit EFI variant on LoongArch32 CPU. All data structs are filled with padding members if necessary and marked as QEMU_PACKED to avoid host ABI alignment impact. Host endian is being cared as well. It also fixed various problems in

[PATCH v2 2/2] hw/loongarch/boot: Rework boot code generation

2024-12-22 Thread Jiaxun Yang
Use stl_p to write instructions so that host endian conversion will be performed. Replace mailbox read/write on LoongArch32 systems with 32bit IOCSR instructions to prevent illegal instructions. Reviewed-by: Song Gao Signed-off-by: Jiaxun Yang --- hw/loongarch/boot.c | 107

[PATCH v2 0/2] hw/loongarch/booting: Booting protocol refactoring

2024-12-22 Thread Jiaxun Yang
Hi all, This series refactored booting protocol generation code to better accommodate different host ABI / Alignment and endianess. It also enhanced LoongArch32 support. Thanks --- v2: Fix building on 32 bit host Signed-off-by: Jiaxun Yang --- Jiaxun Yang (2): hw/loongarch/boot: Refact

[PATCH] Add a b4 configuration file

2024-12-22 Thread Jiaxun Yang
roles --norolestats --nogit --nogit-fallback +prep-perpatch-check-cmd = scripts/checkpatch.pl -q --terse --no-summary --mailback - --- base-commit: 65cb7129f4160c7e07a0da107f888ec73ae96776 change-id: 20241222-b4-config-e469b075802c Best regards, -- Jiaxun Yang

Re: [PULL v2 00/15] Host Memory Backends and Memory devices queue 2024-12-21

2024-12-22 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

[PATCH] hw/loongarch/boot: Support Linux raw boot image

2024-12-22 Thread Jiaxun Yang
uint32_t pe_header_offset; +} QEMU_PACKED; + /* UEFI 2.10 */ #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 #define EFI_2_100_SYSTEM_TABLE_REVISION ((2<<16) | (100)) --- base-commit: c69612063e1844b76ac01e3a781b979548c3585c change-id: 20241222-la-direct-kernel-boot-c598264710e7 Best regards, -- Jiaxun Yang

[PATCH 2/2] hvf: arm: disable unavailable features on older macOS

2024-12-22 Thread Joelle van Dyne
IPA size queries were introduced in macOS 13. When QEMU is built targeting a lower version, the compile will fail. If targeting a higher version and the binary is executed on an older version, QEMU will crash. This will restore the behaviour before IPA max size querying was added which means VMs wi

[PATCH 0/2] Disable unavailable features on older macOS

2024-12-22 Thread Joelle van Dyne
Some features require APIs introduced in a recent version of macOS. Currently, this is not checked anywhere and so either the build will fail (if building with an older version of Xcode) or will throw a warning and then crash if run on an older machine. The correct way to handle this is with availa

[PATCH 1/2] vmnet: disable unavailable features on older macOS

2024-12-22 Thread Joelle van Dyne
Some options require macOS 11 or newer APIs. Instead of crashing (target version not set) or failing to compile (target version set), we will just return an error when the user tries to use the option. Signed-off-by: Joelle van Dyne --- net/vmnet-host.c| 48 +++---

[PATCH v3 21/33] next-cube: always use retval to return rtc read values

2024-12-22 Thread Mark Cave-Ayland
Instead of shifting out rtc read values from individual rtc registers, change the logic so that rtc read commands are executed when the last bit of the rtc command is received and the result stored in retval. This simplifies the rtc read logic such that the shift out logic can be consolidated for r

[PATCH v3 33/33] next-cube: add my copyright to the top of the file

2024-12-22 Thread Mark Cave-Ayland
This series has involved rewriting and/or updating a considerable part of the next-cube emulation so update the copyright in next-cube.c to reflect this. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 1 + 1 file changed,

[PATCH v3 06/33] next-cube: introduce next-scsi device

2024-12-22 Thread Mark Cave-Ayland
This device is intended to hold the ESP SCSI controller and the NeXT SCSI CSRs. Start by creating the device and moving the ESP SCSI controller to be an embedded child device. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 93 +

[PATCH v3 27/33] next-cube: move rtc-data-in gpio from next-pc to next-rtc device

2024-12-22 Thread Mark Cave-Ayland
Add a new rtc-data-out gpio to the next-pc device and wire it up to the next-rtc rtc-data-in gpio using the standard qdev gpio APIs. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-)

[PATCH v3 07/33] next-cube: move SCSI CSRs from next-pc to the next-scsi device

2024-12-22 Thread Mark Cave-Ayland
The SCSI CSRs are located within the SCSI subsystem of the NeXT PC (Peripheral Contoller) which is now modelled as a separate QEMU device. Add a new memory region subregion to contain the SCSI CSRs that simply store and retrieve the register values. Add a new VMStateDescription for the next-scsi d

[PATCH v3 24/33] next-cube: don't use rtc phase value of -1

2024-12-22 Thread Mark Cave-Ayland
The rtc phase value of -1 is directly equivalent to using a phase value of 0 so simplify the logic to use an initial rtc phase of 0. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/m68k/n

[PATCH v3 32/33] next-cube: rename old_scr2 and scr2_2 in next_scr2_rtc_update()

2024-12-22 Thread Mark Cave-Ayland
Rename them to old_scr2_rtc and scr2_rtc to reflect that they contain the previous and current values of the SCR2 RTC bits. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/m68

[PATCH v3 09/33] next-cube: move floppy disk MMIO to separate memory region in next-pc

2024-12-22 Thread Mark Cave-Ayland
The dummy floppy disk device is part of the next-pc device, and not related to the NeXTCube SCRs. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 61 - 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/

[PATCH v3 13/33] next-cube: move en ethernet MMIO to separate memory region on next-pc device

2024-12-22 Thread Mark Cave-Ayland
Move the en ethernet MMIO accesses to a separate memory region on the next-pc device instead of being part of the next.scr MMIO memory region. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 48 + 1 file changed, 40

[PATCH v3 18/33] next-cube: rename typedef struct NextRtc to NeXTRTC

2024-12-22 Thread Mark Cave-Ayland
This brings the capitalisation in line with the other NeXTCube definitions. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c i

[PATCH v3 16/33] next-cube: rearrange NeXTState declarations to improve readability

2024-12-22 Thread Mark Cave-Ayland
Move the NeXTState, next_dma and TYPE_NEXT_MACHINE definition to the same area at the top of next-cube.c. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 64 ++--- 1 file changed, 32

[PATCH] 9pfs: make multidevs=remap default

2024-12-22 Thread Christian Schoenebeck
1a6ed33cc5 introduced option multidevs=remap|forbid|warn and made "warn" the default option. As it turned out though, e.g. by several reports in conjunction with following 9p client issue: https://github.com/torvalds/linux/commit/850925a8133c73c4a2453c360b2c3beb3bab67c9 Many people are just igno

[PATCH v3 28/33] next-cube: use named gpio output for next-rtc data

2024-12-22 Thread Mark Cave-Ayland
Add a named gpio output for the next-rtc data and then update next_rtc_data_in_irq() to drive the IRQ directly. This enables the next-rtc to next-pc data to be wired up using the standard qdev gpio APIs. At the same time rename the pc-rtc-data-in gpio to rtc-data-in which is possible now that the

[PATCH v3 31/33] next-cube: move next_rtc_cmd_is_write() and next_rtc_data_in_irq() functions

2024-12-22 Thread Mark Cave-Ayland
Move these functions in next-cube.c so that they are with the rest of the next-rtc functions. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 172 ++-- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/hw/m

[PATCH v3 22/33] next-cube: use named gpio to set RTC data bit in scr2

2024-12-22 Thread Mark Cave-Ayland
This is in preparation for moving NeXTRTC to its own separate device. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 1

Re: or1k -M virt -hda and net.

2024-12-22 Thread Rob Landley
On 11/24/24 00:50, Stafford Horne wrote: Speaking of which, is there a way to get or1k to exit the emulator? I told the kernel to reboot but it says "reboot failed, system halted" and hangs instead of exiting qemu. (My testroot runs qemu under "timeout -i 10" to kill it after 10 seconds of inacti

[PATCH] hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size'

2024-12-22 Thread Daniel Henrique Barboza
Trivial fix for the following ticket: CID 1568580: Incorrect expression (EVALUATION_ORDER) In "table_size = table_size = n_vectors * 16U", "table_size" is written twice with the same value. Cc: qemu-triv...@nongnu.org Cc: Peter Maydell Resolves: Coverity CID 1568580 Fixes: 01c1caa9d1 ("hw/

[PATCH] target/loongarch: Implement semihosting support

2024-12-22 Thread Jiaxun Yang
Wire up ARM_COMPATIBLE_SEMIHOSTING for LoongArch. The semihosting ABI (i.e. "dbcl 0xab" for semihosting call and Arm compatible settings) is confirmed by LA132 (1C103)'s OpenOCD implementation. Signed-off-by: Jiaxun Yang --- configs/targets/loongarch64-linux-user.mak | 2 + linux-user/

Re: [PATCH] contrib/plugins/bbv.c: Start bb index from 1

2024-12-22 Thread Pierrick Bouvier
On 12/22/24 01:11, Michael Tokarev wrote: 17.12.2024 17:24, ckf104 wrote: Standard simpoint tool reqeusts that index of basic block index starts from 1. While this patch is a trivial one-liner, but the underlying issue requires at least a minimal understanding of what it is all about, what *i

[PATCH v3 04/33] next-cube: move next_scsi_init() to next_pc_realize()

2024-12-22 Thread Mark Cave-Ayland
This reflects that the SCSI interface exists within the NeXT Peripheral Controller (PC). Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 58b4

[PATCH v3 05/33] next-cube: introduce next_pc_init() object init function

2024-12-22 Thread Mark Cave-Ayland
Move initialisation of the memory regions and GPIOs from next_pc_realize() to the new next_pc_init() function. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/m68k/next-cub

[PATCH v3 00/33] next-cube: more tidy-ups and improvements

2024-12-22 Thread Mark Cave-Ayland
This series contains a number of tidy-ups and improvements to the NeXTCube machine which include: - Bringing the code up-to-date with our latest coding standards/APIs, in particular related to the board configuration and IRQ wiring - Remove the remaining overlapping memory regions and c

[PATCH v3 08/33] next-cube: move SCSI 4020/4021 logic from next-pc device to next-scsi device

2024-12-22 Thread Mark Cave-Ayland
The SCSI 4020/4021 logic refers to the offset of the SCSI CSRs within the NeXTCube address space. Due to the previously overlapping memory regions, there were duplicate MMIO accessors in the next.scr memory region for these registers but this has now been resolved. Move the remaining SCSI 4020/40

[PATCH v3 02/33] next-cube: remove overlap between next.dma and next.mmio memory regions

2024-12-22 Thread Mark Cave-Ayland
Change the start of the next.mmio memory region so that it follows on directly after the next.dma memory region. Increase the address offsets in next_mmio_read() and next_mmio_write(), and reduce the size of the next.mmio memory region accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Phi

[PATCH v3 03/33] next-cube: create new next.scsi container memory region

2024-12-22 Thread Mark Cave-Ayland
Move the ESP SCSI and SCSI CSR registers to the new next.scsi container memory region. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/m68k/next-cu

[PATCH v3 01/33] next-cube: remove 0x14020 dummy value from next_mmio_read()

2024-12-22 Thread Mark Cave-Ayland
This is a dummy value for the SCSI CSR which appears to have no effect when removed. Eventually the reads/writes to this register will be directed towards the WIP implementations in next_scr_readfn() and next_scr_writefn(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/ne

[PATCH v3 11/33] next-cube: move ESCC to be QOM child of next-pc device

2024-12-22 Thread Mark Cave-Ayland
Since the ESCC is part of the next-pc device, move the ESCC to be a QOM child of the next-pc device. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 54 ++--- 1 file changed, 26 inser

[PATCH v3 14/33] next-cube: add empty slots for unknown accesses to next.scr memory region

2024-12-22 Thread Mark Cave-Ayland
The next.scr memory is now effectively unused, however there are 3 separate region accesses still logged that occur when booting a NeXTStep disk image. Use the empty_slot device to capture and ignore memory accesses to these 3 memory regions. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas

[PATCH v3 17/33] next-cube: convert next-pc device to use Resettable interface

2024-12-22 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Acked-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index de697c3e2b..61d0cb8327 100644 --- a/hw/m68k/next-cube.c ++

[PATCH v3 12/33] next-cube: move timer MMIO to separate memory region on next-pc device

2024-12-22 Thread Mark Cave-Ayland
Move the timer MMIO accesses to a separate memory region on the next-pc device instead of being part of the next.scr MMIO memory region. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 63 +++

[PATCH v3 10/33] next-cube: map ESCC registers as a subregion of the next.scr memory region

2024-12-22 Thread Mark Cave-Ayland
Since the ESCC device exists within the memory range of the next.scr memory region, map the ESCC device registers as a subregion of the next.scr memory region instead of directly to the system address space. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu

[PATCH v3 15/33] next-cube: remove unused next.scr memory region

2024-12-22 Thread Mark Cave-Ayland
Now that the next.scr memory region is unused it can be removed and the next-pc devices mapped directly within the machine init function. This is the last remaining overlapping memory region within the NeXTCube machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-c

[PATCH v3 29/33] next-cube: add rtc-cmd-reset named gpio to reset the rtc state machine

2024-12-22 Thread Mark Cave-Ayland
This allows us to decouple the next-pc and next-rtc devices from each other in next_scr2_rtc_update(). Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c in

[PATCH v3 25/33] next-cube: QOMify NeXTRTC

2024-12-22 Thread Mark Cave-Ayland
This is to allow the RTC functionality to be maintained within its own separate device rather than as part of the next-pc device. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 71 +++-- 1 file changed, 50 insertions(+), 21 deletions(-) diff --

[PATCH v3 19/33] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update()

2024-12-22 Thread Mark Cave-Ayland
Rather than directly clear bit 3 in int_status in next_scr2_rtc_update(), use a qemu_irq to drive the equivalent NEXT_PWR_I signal. Signed-off-by: Mark Cave-Ayland Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/m68k/ne

Re: [PATCH v2 34/34] next-cube: replace boiler-plate GPL 2.0 or later license text with SPDX identifier

2024-12-22 Thread Mark Cave-Ayland
On 16/12/2024 11:17, Thomas Huth wrote: On 16/12/2024 11.38, Daniel P. Berrangé wrote: On Sat, Dec 14, 2024 at 08:38:06PM +, Mark Cave-Ayland wrote: On 12/12/2024 17:28, Daniel P. Berrangé wrote: On Thu, Dec 12, 2024 at 11:46:20AM +, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-

[PATCH v3 00/51] tcg: Remove in-flight mask data from OptContext

2024-12-22 Thread Richard Henderson
The desire is to start re-using some of the fold_* functions while lowering or simplifying operations during tcg_optmize. Many of these fold_* functions set z_mask, s_mask, and a_mask, which hang around until the end of the tcg_optmize loop and are applied by finish_folding. This disconnect betwe

[PATCH v3 01/51] tcg/optimize: Split out finish_bb, finish_ebb

2024-12-22 Thread Richard Henderson
Call them directly from the opcode switch statement in tcg_optimize, rather than in finish_folding based on opcode flags. Adjust folding of conditional branches to match. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 47 +++-

[PATCH v3 03/51] tcg/optimize: Copy mask writeback to fold_masks

2024-12-22 Thread Richard Henderson
Use of fold_masks should be restricted to those opcodes that can reliably make use of it -- those with a single output, and from higher-level folders that set up the masks. Prepare for conversion of each folder in turn. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/opti

[PATCH v3 05/51] tcg/optimize: Augment s_mask from z_mask in fold_masks_zs

2024-12-22 Thread Richard Henderson
Consider the passed s_mask to be a minimum deduced from either existing s_mask or from a sign-extension operation. We may be able to deduce more from the set of known zeros. Remove identical logic from several opcode folders. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tc

[PATCH v3 29/51] tcg/optimize: Use fold_masks_zs in fold_orc

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 060d7153f8..c1305e9eab 100644 --- a/tcg/optimize.c +++ b/tcg

[PATCH v3 18/51] tcg/optimize: Use fold_masks_z in fold_extract

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 9c1fba00fb..5aca1b3c38 10064

[PATCH v3 06/51] tcg/optimize: Change representation of s_mask

2024-12-22 Thread Richard Henderson
Change the representation from sign bit repetitions to all bits equal to the sign bit, including the sign bit itself. The previous format has a problem in that it is difficult to recreate a valid sign mask after a shift operation: the "repetitions" part of the previous format meant that applying t

[PATCH v3 21/51] tcg/optimize: Use fold_masks_z in fold_extu

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index ab8ce1de2a..bdf95d1924 100644 --- a/tcg/optimize.c +++ b/tcg/opt

[PATCH v3 34/51] tcg/optimize: Use fold_masks_z in fold_setcond

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index b401287ce1..b6911faca2 100644 --- a/tcg/optimize.c +++ b/tcg/optim

[PATCH v3 04/51] tcg/optimize: Split out fold_masks_zs

2024-12-22 Thread Richard Henderson
Add a routine to which masks can be passed directly, rather than storing them into OptContext. To be used in upcoming patches. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/

[PATCH v3 20/51] tcg/optimize: Use fold_masks_zs in fold_exts

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Explicitly sign-extend z_mask instead of doing that manually. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) d

[PATCH v3 11/51] tcg/optimize: Use fold_masks_zs in fold_count_zeros

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Compute s_mask from the union of the maximum count and the op2 fallback for op1 being zero. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 ++- 1 file changed, 10 insertions(+), 5 d

[PATCH v3 17/51] tcg/optimize: Use fold_masks_s in fold_eqv

2024-12-22 Thread Richard Henderson
Add fold_masks_s as a trivial wrapper around fold_masks_zs. Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c

[PATCH v3 28/51] tcg/optimize: Use fold_masks_zs in fold_or

2024-12-22 Thread Richard Henderson
Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index e0cb9bf6bb..060d7153f8 100644

[PATCH v3 38/51] tcg/optimize: Use finish_folding in fold_cmpsel_vec

2024-12-22 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index db26cc347d..3f601e43a7 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2484,7 +2484,7 @@ static bool fo

  1   2   >