* [PULL 0/7] loongarch-to-apply queue
@ 2022-11-03 12:38 Song Gao
2022-11-03 18:31 ` Stefan Hajnoczi
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2022-11-03 12:38 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, stefanha
The following changes since commit a11f65ec1b8adcb012b89c92819cbda4dc25aaf1:
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-11-01 13:49:33 -0400)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20221103
for you to fetch changes up to d31e2b1af7e6db41e6088679babc3893bd69b4b3:
target/loongarch: Fix raise_mmu_exception() set wrong exception_index (2022-11-03 17:59:19 +0800)
----------------------------------------------------------------
pull-loongarch-20221103
----------------------------------------------------------------
Song Gao (2):
target/loongarch: Add exception subcode
target/loongarch: Fix raise_mmu_exception() set wrong exception_index
Xiaojuan Yang (5):
hw/intc: Convert the memops to with_attrs in LoongArch extioi
hw/intc: Fix LoongArch extioi coreisr accessing
hw/loongarch: Load FDT table into dram memory space
hw/loongarch: Improve fdt for LoongArch virt machine
hw/loongarch: Add TPM device for LoongArch virt machine
hw/intc/loongarch_extioi.c | 41 ++++++++++++++++-------------
hw/intc/trace-events | 3 +--
hw/loongarch/acpi-build.c | 50 +++++++++++++++++++++++++++++++++--
hw/loongarch/virt.c | 53 ++++++++++++++++++++++++++++++++-----
include/hw/loongarch/virt.h | 3 ---
include/hw/pci-host/ls7a.h | 1 +
target/loongarch/cpu.c | 8 ++++--
target/loongarch/cpu.h | 58 ++++++++++++++++++++++-------------------
target/loongarch/iocsr_helper.c | 19 ++++++++------
target/loongarch/tlb_helper.c | 5 ++--
10 files changed, 170 insertions(+), 71 deletions(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2022-11-03 12:38 Song Gao
@ 2022-11-03 18:31 ` Stefan Hajnoczi
0 siblings, 0 replies; 22+ messages in thread
From: Stefan Hajnoczi @ 2022-11-03 18:31 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel, richard.henderson
The cross-win32-system GitLab CI job fails to build with the following error:
i686-w64-mingw32-gcc -m32 -Ilibqemu-loongarch64-softmmu.fa.p -I. -I..
-Itarget/loongarch -I../target/loongarch -I../dtc/libfdt -Iqapi
-Itrace -Iui -Iui/shader
-I/usr/i686-w64-mingw32/sys-root/mingw/include/pixman-1
-I/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0
-I/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include
-fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g
-iquote . -iquote /builds/qemu-project/qemu -iquote
/builds/qemu-project/qemu/include -iquote
/builds/qemu-project/qemu/tcg/i386 -mms-bitfields -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -fno-pie -no-pie -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration
-Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k
-Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs
-Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2
-Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi
-fstack-protector-strong -DNEED_CPU_H
'-DCONFIG_TARGET="loongarch64-softmmu-config-target.h"'
'-DCONFIG_DEVICES="loongarch64-softmmu-config-devices.h"' -MD -MQ
libqemu-loongarch64-softmmu.fa.p/hw_loongarch_acpi-build.c.obj -MF
libqemu-loongarch64-softmmu.fa.p/hw_loongarch_acpi-build.c.obj.d -o
libqemu-loongarch64-softmmu.fa.p/hw_loongarch_acpi-build.c.obj -c
../hw/loongarch/acpi-build.c
../hw/loongarch/acpi-build.c: In function 'acpi_build':
../hw/loongarch/acpi-build.c:402:9: error: implicit declaration of
function 'tpm_get_version' [-Werror=implicit-function-declaration]
402 | if (tpm_get_version(tpm_find()) == TPM_VERSION_2_0) {
| ^~~~~~~~~~~~~~~
../hw/loongarch/acpi-build.c:402:9: error: nested extern declaration
of 'tpm_get_version' [-Werror=nested-externs]
../hw/loongarch/acpi-build.c:402:25: error: implicit declaration of
function 'tpm_find' [-Werror=implicit-function-declaration]
402 | if (tpm_get_version(tpm_find()) == TPM_VERSION_2_0) {
| ^~~~~~~~
../hw/loongarch/acpi-build.c:402:25: error: nested extern declaration
of 'tpm_find' [-Werror=nested-externs]
../hw/loongarch/acpi-build.c:402:40: error: 'TPM_VERSION_2_0'
undeclared (first use in this function); did you mean 'TP_VERSION'?
402 | if (tpm_get_version(tpm_find()) == TPM_VERSION_2_0) {
| ^~~~~~~~~~~~~~~
| TP_VERSION
../hw/loongarch/acpi-build.c:402:40: note: each undeclared identifier
is reported only once for each function it appears in
https://gitlab.com/qemu-project/qemu/-/jobs/3270049630
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2023-10-13 8:17 Song Gao
2023-10-16 19:20 ` Stefan Hajnoczi
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2023-10-13 8:17 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, stefanha
The following changes since commit 63011373ad22c794a013da69663c03f1297a5c56:
Merge tag 'pull-riscv-to-apply-20231012-1' of https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 -0400)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20231013
for you to fetch changes up to 1bea6930ca7b9587ea8d8fbb77069b6a13aa031a:
LoongArch: step down as general arch maintainer (2023-10-13 10:05:32 +0800)
----------------------------------------------------------------
pull-loongarch-20231013
*Fix ASXE flag conflict
*Add preldx instruction
*Add preldx instruction
*Remove unused region
*Xiao juan step down as general arch maintainer
----------------------------------------------------------------
Jiajie Chen (1):
target/loongarch: fix ASXE flag conflict
Philippe Mathieu-Daudé (2):
hw/loongarch/virt: Remove unused ISA UART
hw/loongarch/virt: Remove unused ISA Bus
Song Gao (2):
target/loongarch: Add preldx instruction
hw/loongarch/virt: Remove unused 'loongarch_virt_pm' region
Thomas Weißschuh (1):
hw/loongarch: remove global loaderparams variable
Xiaojuan Yang (1):
LoongArch: step down as general arch maintainer
MAINTAINERS | 2 -
hw/loongarch/Kconfig | 2 -
hw/loongarch/virt.c | 103 +++++++------------------
include/hw/loongarch/virt.h | 3 -
target/loongarch/cpu.h | 4 +-
target/loongarch/disas.c | 7 ++
target/loongarch/insn_trans/trans_memory.c.inc | 5 ++
target/loongarch/insns.decode | 3 +
tests/tcg/loongarch64/system/boot.S | 7 +-
9 files changed, 49 insertions(+), 87 deletions(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2023-10-13 8:17 Song Gao
@ 2023-10-16 19:20 ` Stefan Hajnoczi
0 siblings, 0 replies; 22+ messages in thread
From: Stefan Hajnoczi @ 2023-10-16 19:20 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel, richard.henderson, stefanha
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2024-09-12 12:51 Song Gao
2024-09-13 13:34 ` Peter Maydell
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2024-09-12 12:51 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
The following changes since commit 4b7ea33074450bc6148c8e1545d78f179e64adb4:
Merge tag 'pull-request-2024-09-11' of https://gitlab.com/thuth/qemu into staging (2024-09-11 19:28:23 +0100)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240912
for you to fetch changes up to 45d1fe46e5a6fe2b22b034e2b2bc0d941acd4b9e:
hw/loongarch: Add acpi SPCR table support (2024-09-12 20:57:54 +0800)
----------------------------------------------------------------
pull-loongarch-20240912
----------------------------------------------------------------
Bibo Mao (5):
target/loongarch: Add compatible support about VM reboot
hw/loongarch: Remove default enable with VIRTIO_VGA device
target/loongarch/kvm: Add vCPU reset function
target/loongarch: Support QMP dump-guest-memory
hw/loongarch: Add acpi SPCR table support
Jason A. Donenfeld (2):
hw/loongarch: virt: support up to 4 serial ports
hw/loongarch: virt: pass random seed to fdt
hw/loongarch/Kconfig | 1 -
hw/loongarch/acpi-build.c | 63 +++++++++++--
hw/loongarch/virt.c | 33 ++++---
include/hw/pci-host/ls7a.h | 9 +-
target/loongarch/arch_dump.c | 167 +++++++++++++++++++++++++++++++++++
target/loongarch/cpu.c | 17 +++-
target/loongarch/internals.h | 2 +
target/loongarch/kvm/kvm.c | 5 +-
target/loongarch/kvm/kvm_loongarch.h | 2 +-
target/loongarch/meson.build | 1 +
10 files changed, 274 insertions(+), 26 deletions(-)
create mode 100644 target/loongarch/arch_dump.c
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2024-09-12 12:51 Song Gao
@ 2024-09-13 13:34 ` Peter Maydell
0 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2024-09-13 13:34 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel
On Thu, 12 Sept 2024 at 14:09, Song Gao <gaosong@loongson.cn> wrote:
>
> The following changes since commit 4b7ea33074450bc6148c8e1545d78f179e64adb4:
>
> Merge tag 'pull-request-2024-09-11' of https://gitlab.com/thuth/qemu into staging (2024-09-11 19:28:23 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240912
>
> for you to fetch changes up to 45d1fe46e5a6fe2b22b034e2b2bc0d941acd4b9e:
>
> hw/loongarch: Add acpi SPCR table support (2024-09-12 20:57:54 +0800)
>
> ----------------------------------------------------------------
> pull-loongarch-20240912
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/9.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2024-09-29 8:17 Song Gao
2024-09-30 14:06 ` Peter Maydell
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2024-09-29 8:17 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929
for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:
hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)
----------------------------------------------------------------
pull-loongarch-20240929
----------------------------------------------------------------
Bibo Mao (3):
acpi: ged: Add macro for acpi sleep control register
hw/loongarch/virt: Add FDT table support with acpi ged pm register
target/loongarch: Avoid bits shift exceeding width of bool type
Jiaxun Yang (2):
hw/loongarch/boot: Refactor EFI booting protocol generation
hw/loongarch/boot: Rework boot code generation
Philippe Mathieu-Daudé (2):
hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion
hw/loongarch/fw_cfg: Build in common_ss[]
hw/acpi/generic_event_device.c | 6 +-
hw/loongarch/boot.c | 321 +++++++++++++++++++++------------
hw/loongarch/meson.build | 2 +-
hw/loongarch/virt.c | 39 ++++
include/hw/acpi/generic_event_device.h | 7 +-
include/hw/loongarch/boot.h | 106 +++++++++--
include/hw/loongarch/virt.h | 1 -
target/loongarch/arch_dump.c | 6 +-
8 files changed, 342 insertions(+), 146 deletions(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2024-09-29 8:17 Song Gao
@ 2024-09-30 14:06 ` Peter Maydell
2024-10-09 11:34 ` gaosong
0 siblings, 1 reply; 22+ messages in thread
From: Peter Maydell @ 2024-09-30 14:06 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel
On Sun, 29 Sept 2024 at 09:35, Song Gao <gaosong@loongson.cn> wrote:
>
> The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
>
> Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929
>
> for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:
>
> hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)
>
> ----------------------------------------------------------------
> pull-loongarch-20240929
>
> ----------------------------------------------------------------
Hi; this fails to build on 32-bit hosts:
https://gitlab.com/qemu-project/qemu/-/jobs/7953018819
https://gitlab.com/qemu-project/qemu/-/jobs/7953018846
../hw/loongarch/boot.c: In function ‘init_systab_32’:
../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
different size [-Werror=int-to-pointer-cast]
187 | ((typeof(p))((uintptr_t)(s) + \
| ^
../hw/loongarch/boot.c:201:9: note: in expansion of macro ‘BOOTP_ALIGN_PTR_UP’
201 | p = BOOTP_ALIGN_PTR_UP(p, start, EFI_TABLE_ALIGN); \
| ^~~~~~~~~~~~~~~~~~
../hw/loongarch/boot.c:243:1: note: in expansion of macro ‘EFI_INIT_SYSTAB_GEN’
243 | EFI_INIT_SYSTAB_GEN(32)
| ^~~~~~~~~~~~~~~~~~~
../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
different size [-Werror=int-to-pointer-cast]
187 | ((typeof(p))((uintptr_t)(s) + \
| ^
etc.
This happens because if the argument 'n' to BOOTP_ALIGN_PTR_UP()
is a 64-bit type (as EFI_TABLE_ALIGN happens to be) then the
expression ends up being calculated as 64-bits, which is bigger
than the type of a pointer on these hosts.
-- PMM
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2024-09-30 14:06 ` Peter Maydell
@ 2024-10-09 11:34 ` gaosong
0 siblings, 0 replies; 22+ messages in thread
From: gaosong @ 2024-10-09 11:34 UTC (permalink / raw)
To: Peter Maydell, Jiaxun Yang; +Cc: qemu-devel
在 2024/9/30 下午10:06, Peter Maydell 写道:
> On Sun, 29 Sept 2024 at 09:35, Song Gao <gaosong@loongson.cn> wrote:
>> The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
>>
>> Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)
>>
>> are available in the Git repository at:
>>
>> https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929
>>
>> for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:
>>
>> hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)
>>
>> ----------------------------------------------------------------
>> pull-loongarch-20240929
>>
>> ----------------------------------------------------------------
> Hi; this fails to build on 32-bit hosts:
>
>
> https://gitlab.com/qemu-project/qemu/-/jobs/7953018819
> https://gitlab.com/qemu-project/qemu/-/jobs/7953018846
>
> ../hw/loongarch/boot.c: In function ‘init_systab_32’:
> ../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
> different size [-Werror=int-to-pointer-cast]
> 187 | ((typeof(p))((uintptr_t)(s) + \
> | ^
> ../hw/loongarch/boot.c:201:9: note: in expansion of macro ‘BOOTP_ALIGN_PTR_UP’
> 201 | p = BOOTP_ALIGN_PTR_UP(p, start, EFI_TABLE_ALIGN); \
> | ^~~~~~~~~~~~~~~~~~
> ../hw/loongarch/boot.c:243:1: note: in expansion of macro ‘EFI_INIT_SYSTAB_GEN’
> 243 | EFI_INIT_SYSTAB_GEN(32)
> | ^~~~~~~~~~~~~~~~~~~
> ../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
> different size [-Werror=int-to-pointer-cast]
> 187 | ((typeof(p))((uintptr_t)(s) + \
> | ^
>
> etc.
>
> This happens because if the argument 'n' to BOOTP_ALIGN_PTR_UP()
> is a 64-bit type (as EFI_TABLE_ALIGN happens to be) then the
> expression ends up being calculated as 64-bits, which is bigger
> than the type of a pointer on these hosts.
>
> -- PMM
Sorry for the late reply.
@Jiaxun Could you fix this and update the patch?
Thanks.
Song Gao
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2025-01-24 7:00 Bibo Mao
2025-01-24 7:00 ` [PULL 1/7] target/loongarch: Add dynamic function access with CSR register Bibo Mao
` (7 more replies)
0 siblings, 8 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
The following changes since commit cf86770c7aa31ebd6e56f4eeb25c34107f92c51e:
Merge tag 'pull-request-2025-01-21v2' of https://gitlab.com/thuth/qemu into staging (2025-01-22 09:59:02 -0500)
are available in the Git repository at:
https://gitlab.com/bibo-mao/qemu.git tags/pull-loongarch-20250124
for you to fetch changes up to 3215fe8528de45a1794f0314623cc10bd8e8e19f:
target/loongarch: Dump all generic CSR registers (2025-01-24 14:49:24 +0800)
----------------------------------------------------------------
pull-loongarch-20250124 queue
----------------------------------------------------------------
Bibo Mao (7):
target/loongarch: Add dynamic function access with CSR register
target/loongarch: Remove static CSR function setting
target/loongarch: Add generic csr function type
target/loongarch: Add common header file for CSR registers
target/loongarch: Add common source file for CSR register
target/loongarch: Set unused flag with CSR registers
target/loongarch: Dump all generic CSR registers
target/loongarch/cpu.c | 96 +++++++++---
target/loongarch/csr.c | 129 +++++++++++++++++
target/loongarch/csr.h | 29 ++++
target/loongarch/meson.build | 1 +
.../tcg/insn_trans/trans_privileged.c.inc | 161 +++++----------------
target/loongarch/tcg/tcg_loongarch.h | 12 ++
target/loongarch/tcg/translate.c | 5 +
7 files changed, 294 insertions(+), 139 deletions(-)
create mode 100644 target/loongarch/csr.c
create mode 100644 target/loongarch/csr.h
create mode 100644 target/loongarch/tcg/tcg_loongarch.h
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 1/7] target/loongarch: Add dynamic function access with CSR register
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 2/7] target/loongarch: Remove static CSR function setting Bibo Mao
` (6 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
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 <maobibo@loongson.cn>
---
.../tcg/insn_trans/trans_privileged.c.inc | 37 +++++++++++++++++--
target/loongarch/tcg/tcg_loongarch.h | 12 ++++++
target/loongarch/tcg/translate.c | 5 +++
3 files changed, 51 insertions(+), 3 deletions(-)
create mode 100644 target/loongarch/tcg/tcg_loongarch.h
diff --git a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
index 30f9b83fb2..96958bd6c1 100644
--- a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
+++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
@@ -76,7 +76,7 @@ enum {
#define CSR_OFF(NAME) \
CSR_OFF_FLAGS(NAME, 0)
-static const CSRInfo csr_info[] = {
+static CSRInfo csr_info[] = {
CSR_OFF_FLAGS(CRMD, CSRFL_EXITTB),
CSR_OFF(PRMD),
CSR_OFF_FLAGS(EUEN, CSRFL_EXITTB),
@@ -160,9 +160,9 @@ static bool check_plv(DisasContext *ctx)
return false;
}
-static const CSRInfo *get_csr(unsigned csr_num)
+static CSRInfo *get_csr(unsigned csr_num)
{
- const CSRInfo *csr;
+ CSRInfo *csr;
if (csr_num >= ARRAY_SIZE(csr_info)) {
return NULL;
@@ -174,6 +174,37 @@ static const CSRInfo *get_csr(unsigned csr_num)
return csr;
}
+static bool set_csr_trans_func(unsigned int csr_num, GenCSRRead readfn,
+ GenCSRWrite writefn)
+{
+ CSRInfo *csr;
+
+ csr = get_csr(csr_num);
+ if (!csr) {
+ return false;
+ }
+
+ csr->readfn = readfn;
+ csr->writefn = writefn;
+ return true;
+}
+
+#define SET_CSR_FUNC(NAME, read, write) \
+ set_csr_trans_func(LOONGARCH_CSR_##NAME, read, write)
+
+void loongarch_csr_translate_init(void)
+{
+ SET_CSR_FUNC(ESTAT, NULL, gen_helper_csrwr_estat);
+ SET_CSR_FUNC(ASID, NULL, gen_helper_csrwr_asid);
+ SET_CSR_FUNC(PGD, gen_helper_csrrd_pgd, NULL);
+ SET_CSR_FUNC(PWCL, NULL, gen_helper_csrwr_pwcl);
+ SET_CSR_FUNC(CPUID, gen_helper_csrrd_cpuid, NULL);
+ SET_CSR_FUNC(TCFG, NULL, gen_helper_csrwr_tcfg);
+ SET_CSR_FUNC(TVAL, gen_helper_csrrd_tval, NULL);
+ SET_CSR_FUNC(TICLR, NULL, gen_helper_csrwr_ticlr);
+}
+#undef SET_CSR_FUNC
+
static bool check_csr_flags(DisasContext *ctx, const CSRInfo *csr, bool write)
{
if ((csr->flags & CSRFL_READONLY) && write) {
diff --git a/target/loongarch/tcg/tcg_loongarch.h b/target/loongarch/tcg/tcg_loongarch.h
new file mode 100644
index 0000000000..da2539e995
--- /dev/null
+++ b/target/loongarch/tcg/tcg_loongarch.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * QEMU LoongArch TCG interface
+ *
+ * Copyright (c) 2025 Loongson Technology Corporation Limited
+ */
+#ifndef TARGET_LOONGARCH_TCG_LOONGARCH_H
+#define TARGET_LOONGARCH_TCG_LOONGARCH_H
+
+void loongarch_csr_translate_init(void);
+
+#endif /* TARGET_LOONGARCH_TCG_LOONGARCH_H */
diff --git a/target/loongarch/tcg/translate.c b/target/loongarch/tcg/translate.c
index 68be999410..3480f54c71 100644
--- a/target/loongarch/tcg/translate.c
+++ b/target/loongarch/tcg/translate.c
@@ -16,6 +16,7 @@
#include "exec/log.h"
#include "qemu/qemu-print.h"
#include "fpu/softfloat.h"
+#include "tcg_loongarch.h"
#include "translate.h"
#include "internals.h"
#include "vec.h"
@@ -358,4 +359,8 @@ void loongarch_translate_init(void)
offsetof(CPULoongArchState, lladdr), "lladdr");
cpu_llval = tcg_global_mem_new(tcg_env,
offsetof(CPULoongArchState, llval), "llval");
+
+#ifndef CONFIG_USER_ONLY
+ loongarch_csr_translate_init();
+#endif
}
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 2/7] target/loongarch: Remove static CSR function setting
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
2025-01-24 7:00 ` [PULL 1/7] target/loongarch: Add dynamic function access with CSR register Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 3/7] target/loongarch: Add generic csr function type Bibo Mao
` (5 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
Since CSR function setting is done dynamically in TCG mode, remove
static CSR function setting here.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
.../tcg/insn_trans/trans_privileged.c.inc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
index 96958bd6c1..b90e14cd2a 100644
--- a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
+++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
@@ -82,7 +82,7 @@ static CSRInfo csr_info[] = {
CSR_OFF_FLAGS(EUEN, CSRFL_EXITTB),
CSR_OFF_FLAGS(MISC, CSRFL_READONLY),
CSR_OFF(ECFG),
- CSR_OFF_FUNCS(ESTAT, CSRFL_EXITTB, NULL, gen_helper_csrwr_estat),
+ CSR_OFF_FLAGS(ESTAT, CSRFL_EXITTB),
CSR_OFF(ERA),
CSR_OFF(BADV),
CSR_OFF_FLAGS(BADI, CSRFL_READONLY),
@@ -91,15 +91,15 @@ static CSRInfo csr_info[] = {
CSR_OFF(TLBEHI),
CSR_OFF(TLBELO0),
CSR_OFF(TLBELO1),
- CSR_OFF_FUNCS(ASID, CSRFL_EXITTB, NULL, gen_helper_csrwr_asid),
+ CSR_OFF_FLAGS(ASID, CSRFL_EXITTB),
CSR_OFF(PGDL),
CSR_OFF(PGDH),
- CSR_OFF_FUNCS(PGD, CSRFL_READONLY, gen_helper_csrrd_pgd, NULL),
- CSR_OFF_FUNCS(PWCL, 0, NULL, gen_helper_csrwr_pwcl),
+ CSR_OFF_FLAGS(PGD, CSRFL_READONLY),
+ CSR_OFF(PWCL),
CSR_OFF(PWCH),
CSR_OFF(STLBPS),
CSR_OFF(RVACFG),
- CSR_OFF_FUNCS(CPUID, CSRFL_READONLY, gen_helper_csrrd_cpuid, NULL),
+ CSR_OFF_FLAGS(CPUID, CSRFL_READONLY),
CSR_OFF_FLAGS(PRCFG1, CSRFL_READONLY),
CSR_OFF_FLAGS(PRCFG2, CSRFL_READONLY),
CSR_OFF_FLAGS(PRCFG3, CSRFL_READONLY),
@@ -120,10 +120,10 @@ static CSRInfo csr_info[] = {
CSR_OFF_ARRAY(SAVE, 14),
CSR_OFF_ARRAY(SAVE, 15),
CSR_OFF(TID),
- CSR_OFF_FUNCS(TCFG, CSRFL_IO, NULL, gen_helper_csrwr_tcfg),
- CSR_OFF_FUNCS(TVAL, CSRFL_READONLY | CSRFL_IO, gen_helper_csrrd_tval, NULL),
+ CSR_OFF_FLAGS(TCFG, CSRFL_IO),
+ CSR_OFF_FLAGS(TVAL, CSRFL_READONLY | CSRFL_IO),
CSR_OFF(CNTC),
- CSR_OFF_FUNCS(TICLR, CSRFL_IO, NULL, gen_helper_csrwr_ticlr),
+ CSR_OFF_FLAGS(TICLR, CSRFL_IO),
CSR_OFF(LLBCTL),
CSR_OFF(IMPCTL1),
CSR_OFF(IMPCTL2),
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 3/7] target/loongarch: Add generic csr function type
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
2025-01-24 7:00 ` [PULL 1/7] target/loongarch: Add dynamic function access with CSR register Bibo Mao
2025-01-24 7:00 ` [PULL 2/7] target/loongarch: Remove static CSR function setting Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 4/7] target/loongarch: Add common header file for CSR registers Bibo Mao
` (4 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
Parameter type TCGv and TCGv_ptr for function GenCSRRead and GenCSRWrite
is not used in non-TCG mode. Generic csr function type is added here
with parameter void type, so that it passes to compile with non-TCG mode.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
.../tcg/insn_trans/trans_privileged.c.inc | 27 ++++++++++++-------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
index b90e14cd2a..0513cac577 100644
--- a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
+++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
@@ -44,12 +44,13 @@ GEN_FALSE_TRANS(idle)
typedef void (*GenCSRRead)(TCGv dest, TCGv_ptr env);
typedef void (*GenCSRWrite)(TCGv dest, TCGv_ptr env, TCGv src);
+typedef void (*GenCSRFunc)(void);
typedef struct {
int offset;
int flags;
- GenCSRRead readfn;
- GenCSRWrite writefn;
+ GenCSRFunc readfn;
+ GenCSRFunc writefn;
} CSRInfo;
enum {
@@ -184,8 +185,8 @@ static bool set_csr_trans_func(unsigned int csr_num, GenCSRRead readfn,
return false;
}
- csr->readfn = readfn;
- csr->writefn = writefn;
+ csr->readfn = (GenCSRFunc)readfn;
+ csr->writefn = (GenCSRFunc)writefn;
return true;
}
@@ -222,6 +223,7 @@ static bool trans_csrrd(DisasContext *ctx, arg_csrrd *a)
{
TCGv dest;
const CSRInfo *csr;
+ GenCSRRead readfn;
if (check_plv(ctx)) {
return false;
@@ -233,8 +235,9 @@ static bool trans_csrrd(DisasContext *ctx, arg_csrrd *a)
} else {
check_csr_flags(ctx, csr, false);
dest = gpr_dst(ctx, a->rd, EXT_NONE);
- if (csr->readfn) {
- csr->readfn(dest, tcg_env);
+ readfn = (GenCSRRead)csr->readfn;
+ if (readfn) {
+ readfn(dest, tcg_env);
} else {
tcg_gen_ld_tl(dest, tcg_env, csr->offset);
}
@@ -247,6 +250,7 @@ static bool trans_csrwr(DisasContext *ctx, arg_csrwr *a)
{
TCGv dest, src1;
const CSRInfo *csr;
+ GenCSRWrite writefn;
if (check_plv(ctx)) {
return false;
@@ -262,9 +266,10 @@ static bool trans_csrwr(DisasContext *ctx, arg_csrwr *a)
return false;
}
src1 = gpr_src(ctx, a->rd, EXT_NONE);
- if (csr->writefn) {
+ writefn = (GenCSRWrite)csr->writefn;
+ if (writefn) {
dest = gpr_dst(ctx, a->rd, EXT_NONE);
- csr->writefn(dest, tcg_env, src1);
+ writefn(dest, tcg_env, src1);
} else {
dest = tcg_temp_new();
tcg_gen_ld_tl(dest, tcg_env, csr->offset);
@@ -278,6 +283,7 @@ static bool trans_csrxchg(DisasContext *ctx, arg_csrxchg *a)
{
TCGv src1, mask, oldv, newv, temp;
const CSRInfo *csr;
+ GenCSRWrite writefn;
if (check_plv(ctx)) {
return false;
@@ -308,8 +314,9 @@ static bool trans_csrxchg(DisasContext *ctx, arg_csrxchg *a)
tcg_gen_andc_tl(temp, oldv, mask);
tcg_gen_or_tl(newv, newv, temp);
- if (csr->writefn) {
- csr->writefn(oldv, tcg_env, newv);
+ writefn = (GenCSRWrite)csr->writefn;
+ if (writefn) {
+ writefn(oldv, tcg_env, newv);
} else {
tcg_gen_st_tl(newv, tcg_env, csr->offset);
}
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 4/7] target/loongarch: Add common header file for CSR registers
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
` (2 preceding siblings ...)
2025-01-24 7:00 ` [PULL 3/7] target/loongarch: Add generic csr function type Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 5/7] target/loongarch: Add common source file for CSR register Bibo Mao
` (3 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
Common header file csr.h is added here, it can be used by both
TCG mode and kvm mode.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
target/loongarch/csr.h | 25 +++++++++++++++++++
.../tcg/insn_trans/trans_privileged.c.inc | 16 +-----------
2 files changed, 26 insertions(+), 15 deletions(-)
create mode 100644 target/loongarch/csr.h
diff --git a/target/loongarch/csr.h b/target/loongarch/csr.h
new file mode 100644
index 0000000000..20d4bf5dc7
--- /dev/null
+++ b/target/loongarch/csr.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2025 Loongson Technology Corporation Limited
+ */
+
+#ifndef TARGET_LOONGARCH_CSR_H
+#define TARGET_LOONGARCH_CSR_H
+
+#include "cpu-csr.h"
+
+typedef void (*GenCSRFunc)(void);
+enum {
+ CSRFL_READONLY = (1 << 0),
+ CSRFL_EXITTB = (1 << 1),
+ CSRFL_IO = (1 << 2),
+};
+
+typedef struct {
+ int offset;
+ int flags;
+ GenCSRFunc readfn;
+ GenCSRFunc writefn;
+} CSRInfo;
+
+#endif /* TARGET_LOONGARCH_CSR_H */
diff --git a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
index 0513cac577..87506ec0dc 100644
--- a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
+++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
@@ -5,7 +5,7 @@
* LoongArch translation routines for the privileged instructions.
*/
-#include "cpu-csr.h"
+#include "csr.h"
#ifdef CONFIG_USER_ONLY
@@ -44,20 +44,6 @@ GEN_FALSE_TRANS(idle)
typedef void (*GenCSRRead)(TCGv dest, TCGv_ptr env);
typedef void (*GenCSRWrite)(TCGv dest, TCGv_ptr env, TCGv src);
-typedef void (*GenCSRFunc)(void);
-
-typedef struct {
- int offset;
- int flags;
- GenCSRFunc readfn;
- GenCSRFunc writefn;
-} CSRInfo;
-
-enum {
- CSRFL_READONLY = (1 << 0),
- CSRFL_EXITTB = (1 << 1),
- CSRFL_IO = (1 << 2),
-};
#define CSR_OFF_FUNCS(NAME, FL, RD, WR) \
[LOONGARCH_CSR_##NAME] = { \
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 5/7] target/loongarch: Add common source file for CSR register
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
` (3 preceding siblings ...)
2025-01-24 7:00 ` [PULL 4/7] target/loongarch: Add common header file for CSR registers Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 6/7] target/loongarch: Set unused flag with CSR registers Bibo Mao
` (2 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
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 <maobibo@loongson.cn>
---
target/loongarch/csr.c | 114 ++++++++++++++++++
target/loongarch/csr.h | 1 +
target/loongarch/meson.build | 1 +
.../tcg/insn_trans/trans_privileged.c.inc | 107 ----------------
4 files changed, 116 insertions(+), 107 deletions(-)
create mode 100644 target/loongarch/csr.c
diff --git a/target/loongarch/csr.c b/target/loongarch/csr.c
new file mode 100644
index 0000000000..62c1815bfb
--- /dev/null
+++ b/target/loongarch/csr.c
@@ -0,0 +1,114 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2025 Loongson Technology Corporation Limited
+ */
+#include <stddef.h>
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "csr.h"
+
+#define CSR_OFF_FUNCS(NAME, FL, RD, WR) \
+ [LOONGARCH_CSR_##NAME] = { \
+ .offset = offsetof(CPULoongArchState, CSR_##NAME), \
+ .flags = FL, .readfn = RD, .writefn = WR \
+ }
+
+#define CSR_OFF_ARRAY(NAME, N) \
+ [LOONGARCH_CSR_##NAME(N)] = { \
+ .offset = offsetof(CPULoongArchState, CSR_##NAME[N]), \
+ .flags = 0, .readfn = NULL, .writefn = NULL \
+ }
+
+#define CSR_OFF_FLAGS(NAME, FL) CSR_OFF_FUNCS(NAME, FL, NULL, NULL)
+#define CSR_OFF(NAME) CSR_OFF_FLAGS(NAME, 0)
+
+static CSRInfo csr_info[] = {
+ CSR_OFF_FLAGS(CRMD, CSRFL_EXITTB),
+ CSR_OFF(PRMD),
+ CSR_OFF_FLAGS(EUEN, CSRFL_EXITTB),
+ CSR_OFF_FLAGS(MISC, CSRFL_READONLY),
+ CSR_OFF(ECFG),
+ CSR_OFF_FLAGS(ESTAT, CSRFL_EXITTB),
+ CSR_OFF(ERA),
+ CSR_OFF(BADV),
+ CSR_OFF_FLAGS(BADI, CSRFL_READONLY),
+ CSR_OFF(EENTRY),
+ CSR_OFF(TLBIDX),
+ CSR_OFF(TLBEHI),
+ CSR_OFF(TLBELO0),
+ CSR_OFF(TLBELO1),
+ CSR_OFF_FLAGS(ASID, CSRFL_EXITTB),
+ CSR_OFF(PGDL),
+ CSR_OFF(PGDH),
+ CSR_OFF_FLAGS(PGD, CSRFL_READONLY),
+ CSR_OFF(PWCL),
+ CSR_OFF(PWCH),
+ CSR_OFF(STLBPS),
+ CSR_OFF(RVACFG),
+ CSR_OFF_FLAGS(CPUID, CSRFL_READONLY),
+ CSR_OFF_FLAGS(PRCFG1, CSRFL_READONLY),
+ CSR_OFF_FLAGS(PRCFG2, CSRFL_READONLY),
+ CSR_OFF_FLAGS(PRCFG3, CSRFL_READONLY),
+ CSR_OFF_ARRAY(SAVE, 0),
+ CSR_OFF_ARRAY(SAVE, 1),
+ CSR_OFF_ARRAY(SAVE, 2),
+ CSR_OFF_ARRAY(SAVE, 3),
+ CSR_OFF_ARRAY(SAVE, 4),
+ CSR_OFF_ARRAY(SAVE, 5),
+ CSR_OFF_ARRAY(SAVE, 6),
+ CSR_OFF_ARRAY(SAVE, 7),
+ CSR_OFF_ARRAY(SAVE, 8),
+ CSR_OFF_ARRAY(SAVE, 9),
+ CSR_OFF_ARRAY(SAVE, 10),
+ CSR_OFF_ARRAY(SAVE, 11),
+ CSR_OFF_ARRAY(SAVE, 12),
+ CSR_OFF_ARRAY(SAVE, 13),
+ CSR_OFF_ARRAY(SAVE, 14),
+ CSR_OFF_ARRAY(SAVE, 15),
+ CSR_OFF(TID),
+ CSR_OFF_FLAGS(TCFG, CSRFL_IO),
+ CSR_OFF_FLAGS(TVAL, CSRFL_READONLY | CSRFL_IO),
+ CSR_OFF(CNTC),
+ CSR_OFF_FLAGS(TICLR, CSRFL_IO),
+ CSR_OFF(LLBCTL),
+ CSR_OFF(IMPCTL1),
+ CSR_OFF(IMPCTL2),
+ CSR_OFF(TLBRENTRY),
+ CSR_OFF(TLBRBADV),
+ CSR_OFF(TLBRERA),
+ CSR_OFF(TLBRSAVE),
+ CSR_OFF(TLBRELO0),
+ CSR_OFF(TLBRELO1),
+ CSR_OFF(TLBREHI),
+ CSR_OFF(TLBRPRMD),
+ CSR_OFF(MERRCTL),
+ CSR_OFF(MERRINFO1),
+ CSR_OFF(MERRINFO2),
+ CSR_OFF(MERRENTRY),
+ CSR_OFF(MERRERA),
+ CSR_OFF(MERRSAVE),
+ CSR_OFF(CTAG),
+ CSR_OFF_ARRAY(DMW, 0),
+ CSR_OFF_ARRAY(DMW, 1),
+ CSR_OFF_ARRAY(DMW, 2),
+ CSR_OFF_ARRAY(DMW, 3),
+ CSR_OFF(DBG),
+ CSR_OFF(DERA),
+ CSR_OFF(DSAVE),
+};
+
+CSRInfo *get_csr(unsigned int csr_num)
+{
+ CSRInfo *csr;
+
+ if (csr_num >= ARRAY_SIZE(csr_info)) {
+ return NULL;
+ }
+
+ csr = &csr_info[csr_num];
+ if (csr->offset == 0) {
+ return NULL;
+ }
+
+ return csr;
+}
diff --git a/target/loongarch/csr.h b/target/loongarch/csr.h
index 20d4bf5dc7..caad832545 100644
--- a/target/loongarch/csr.h
+++ b/target/loongarch/csr.h
@@ -22,4 +22,5 @@ typedef struct {
GenCSRFunc writefn;
} CSRInfo;
+CSRInfo *get_csr(unsigned int csr_num);
#endif /* TARGET_LOONGARCH_CSR_H */
diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build
index 7817318287..20bd3e2f0a 100644
--- a/target/loongarch/meson.build
+++ b/target/loongarch/meson.build
@@ -10,6 +10,7 @@ loongarch_system_ss = ss.source_set()
loongarch_system_ss.add(files(
'arch_dump.c',
'cpu_helper.c',
+ 'csr.c',
'loongarch-qmp-cmds.c',
'machine.c',
))
diff --git a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
index 87506ec0dc..3afa23af79 100644
--- a/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
+++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
@@ -45,99 +45,6 @@ GEN_FALSE_TRANS(idle)
typedef void (*GenCSRRead)(TCGv dest, TCGv_ptr env);
typedef void (*GenCSRWrite)(TCGv dest, TCGv_ptr env, TCGv src);
-#define CSR_OFF_FUNCS(NAME, FL, RD, WR) \
- [LOONGARCH_CSR_##NAME] = { \
- .offset = offsetof(CPULoongArchState, CSR_##NAME), \
- .flags = FL, .readfn = RD, .writefn = WR \
- }
-
-#define CSR_OFF_ARRAY(NAME, N) \
- [LOONGARCH_CSR_##NAME(N)] = { \
- .offset = offsetof(CPULoongArchState, CSR_##NAME[N]), \
- .flags = 0, .readfn = NULL, .writefn = NULL \
- }
-
-#define CSR_OFF_FLAGS(NAME, FL) \
- CSR_OFF_FUNCS(NAME, FL, NULL, NULL)
-
-#define CSR_OFF(NAME) \
- CSR_OFF_FLAGS(NAME, 0)
-
-static CSRInfo csr_info[] = {
- CSR_OFF_FLAGS(CRMD, CSRFL_EXITTB),
- CSR_OFF(PRMD),
- CSR_OFF_FLAGS(EUEN, CSRFL_EXITTB),
- CSR_OFF_FLAGS(MISC, CSRFL_READONLY),
- CSR_OFF(ECFG),
- CSR_OFF_FLAGS(ESTAT, CSRFL_EXITTB),
- CSR_OFF(ERA),
- CSR_OFF(BADV),
- CSR_OFF_FLAGS(BADI, CSRFL_READONLY),
- CSR_OFF(EENTRY),
- CSR_OFF(TLBIDX),
- CSR_OFF(TLBEHI),
- CSR_OFF(TLBELO0),
- CSR_OFF(TLBELO1),
- CSR_OFF_FLAGS(ASID, CSRFL_EXITTB),
- CSR_OFF(PGDL),
- CSR_OFF(PGDH),
- CSR_OFF_FLAGS(PGD, CSRFL_READONLY),
- CSR_OFF(PWCL),
- CSR_OFF(PWCH),
- CSR_OFF(STLBPS),
- CSR_OFF(RVACFG),
- CSR_OFF_FLAGS(CPUID, CSRFL_READONLY),
- CSR_OFF_FLAGS(PRCFG1, CSRFL_READONLY),
- CSR_OFF_FLAGS(PRCFG2, CSRFL_READONLY),
- CSR_OFF_FLAGS(PRCFG3, CSRFL_READONLY),
- CSR_OFF_ARRAY(SAVE, 0),
- CSR_OFF_ARRAY(SAVE, 1),
- CSR_OFF_ARRAY(SAVE, 2),
- CSR_OFF_ARRAY(SAVE, 3),
- CSR_OFF_ARRAY(SAVE, 4),
- CSR_OFF_ARRAY(SAVE, 5),
- CSR_OFF_ARRAY(SAVE, 6),
- CSR_OFF_ARRAY(SAVE, 7),
- CSR_OFF_ARRAY(SAVE, 8),
- CSR_OFF_ARRAY(SAVE, 9),
- CSR_OFF_ARRAY(SAVE, 10),
- CSR_OFF_ARRAY(SAVE, 11),
- CSR_OFF_ARRAY(SAVE, 12),
- CSR_OFF_ARRAY(SAVE, 13),
- CSR_OFF_ARRAY(SAVE, 14),
- CSR_OFF_ARRAY(SAVE, 15),
- CSR_OFF(TID),
- CSR_OFF_FLAGS(TCFG, CSRFL_IO),
- CSR_OFF_FLAGS(TVAL, CSRFL_READONLY | CSRFL_IO),
- CSR_OFF(CNTC),
- CSR_OFF_FLAGS(TICLR, CSRFL_IO),
- CSR_OFF(LLBCTL),
- CSR_OFF(IMPCTL1),
- CSR_OFF(IMPCTL2),
- CSR_OFF(TLBRENTRY),
- CSR_OFF(TLBRBADV),
- CSR_OFF(TLBRERA),
- CSR_OFF(TLBRSAVE),
- CSR_OFF(TLBRELO0),
- CSR_OFF(TLBRELO1),
- CSR_OFF(TLBREHI),
- CSR_OFF(TLBRPRMD),
- CSR_OFF(MERRCTL),
- CSR_OFF(MERRINFO1),
- CSR_OFF(MERRINFO2),
- CSR_OFF(MERRENTRY),
- CSR_OFF(MERRERA),
- CSR_OFF(MERRSAVE),
- CSR_OFF(CTAG),
- CSR_OFF_ARRAY(DMW, 0),
- CSR_OFF_ARRAY(DMW, 1),
- CSR_OFF_ARRAY(DMW, 2),
- CSR_OFF_ARRAY(DMW, 3),
- CSR_OFF(DBG),
- CSR_OFF(DERA),
- CSR_OFF(DSAVE),
-};
-
static bool check_plv(DisasContext *ctx)
{
if (ctx->plv == MMU_PLV_USER) {
@@ -147,20 +54,6 @@ static bool check_plv(DisasContext *ctx)
return false;
}
-static CSRInfo *get_csr(unsigned csr_num)
-{
- CSRInfo *csr;
-
- if (csr_num >= ARRAY_SIZE(csr_info)) {
- return NULL;
- }
- csr = &csr_info[csr_num];
- if (csr->offset == 0) {
- return NULL;
- }
- return csr;
-}
-
static bool set_csr_trans_func(unsigned int csr_num, GenCSRRead readfn,
GenCSRWrite writefn)
{
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 6/7] target/loongarch: Set unused flag with CSR registers
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
` (4 preceding siblings ...)
2025-01-24 7:00 ` [PULL 5/7] target/loongarch: Add common source file for CSR register Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-24 7:00 ` [PULL 7/7] target/loongarch: Dump all generic " Bibo Mao
2025-01-25 3:28 ` [PULL 0/7] loongarch-to-apply queue Stefan Hajnoczi
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
On LA464, some CSR registers are not used such as CSR_SAVE8 -
CSR_SAVE15, also CSR registers relative with MCE is not used now.
Flag CSRFL_UNUSED is added for these registers, so that it will
not dumped. In order to keep compatiblity, these CSR registers are
not removed since it is used in vmstate already.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
target/loongarch/cpu.c | 30 +++++++++++++++++++++++++++++-
target/loongarch/csr.c | 13 +++++++++++++
target/loongarch/csr.h | 2 ++
3 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index d611a60470..a744010332 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -19,7 +19,7 @@
#include "cpu.h"
#include "internals.h"
#include "fpu/softfloat-helpers.h"
-#include "cpu-csr.h"
+#include "csr.h"
#ifndef CONFIG_USER_ONLY
#include "system/reset.h"
#endif
@@ -375,6 +375,33 @@ static int loongarch_cpu_mmu_index(CPUState *cs, bool ifetch)
return MMU_DA_IDX;
}
+static void loongarch_la464_init_csr(Object *obj)
+{
+#ifndef CONFIG_USER_ONLY
+ static bool initialized;
+ LoongArchCPU *cpu = LOONGARCH_CPU(obj);
+ CPULoongArchState *env = &cpu->env;
+ int i, num;
+
+ if (!initialized) {
+ initialized = true;
+ num = FIELD_EX64(env->CSR_PRCFG1, CSR_PRCFG1, SAVE_NUM);
+ for (i = num; i < 16; i++) {
+ set_csr_flag(LOONGARCH_CSR_SAVE(i), CSRFL_UNUSED);
+ }
+ set_csr_flag(LOONGARCH_CSR_IMPCTL1, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_IMPCTL2, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRCTL, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRINFO1, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRINFO2, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRENTRY, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRERA, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_MERRSAVE, CSRFL_UNUSED);
+ set_csr_flag(LOONGARCH_CSR_CTAG, CSRFL_UNUSED);
+ }
+#endif
+}
+
static void loongarch_la464_initfn(Object *obj)
{
LoongArchCPU *cpu = LOONGARCH_CPU(obj);
@@ -470,6 +497,7 @@ static void loongarch_la464_initfn(Object *obj)
env->CSR_PRCFG3 = FIELD_DP64(env->CSR_PRCFG3, CSR_PRCFG3, STLB_WAYS, 7);
env->CSR_PRCFG3 = FIELD_DP64(env->CSR_PRCFG3, CSR_PRCFG3, STLB_SETS, 8);
+ loongarch_la464_init_csr(obj);
loongarch_cpu_post_init(obj);
}
diff --git a/target/loongarch/csr.c b/target/loongarch/csr.c
index 62c1815bfb..87bd24e8cd 100644
--- a/target/loongarch/csr.c
+++ b/target/loongarch/csr.c
@@ -112,3 +112,16 @@ CSRInfo *get_csr(unsigned int csr_num)
return csr;
}
+
+bool set_csr_flag(unsigned int csr_num, int flag)
+{
+ CSRInfo *csr;
+
+ csr = get_csr(csr_num);
+ if (!csr) {
+ return false;
+ }
+
+ csr->flags |= flag;
+ return true;
+}
diff --git a/target/loongarch/csr.h b/target/loongarch/csr.h
index caad832545..deb1aacc33 100644
--- a/target/loongarch/csr.h
+++ b/target/loongarch/csr.h
@@ -13,6 +13,7 @@ enum {
CSRFL_READONLY = (1 << 0),
CSRFL_EXITTB = (1 << 1),
CSRFL_IO = (1 << 2),
+ CSRFL_UNUSED = (1 << 3),
};
typedef struct {
@@ -23,4 +24,5 @@ typedef struct {
} CSRInfo;
CSRInfo *get_csr(unsigned int csr_num);
+bool set_csr_flag(unsigned int csr_num, int flag);
#endif /* TARGET_LOONGARCH_CSR_H */
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PULL 7/7] target/loongarch: Dump all generic CSR registers
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
` (5 preceding siblings ...)
2025-01-24 7:00 ` [PULL 6/7] target/loongarch: Set unused flag with CSR registers Bibo Mao
@ 2025-01-24 7:00 ` Bibo Mao
2025-01-25 3:28 ` [PULL 0/7] loongarch-to-apply queue Stefan Hajnoczi
7 siblings, 0 replies; 22+ messages in thread
From: Bibo Mao @ 2025-01-24 7:00 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Song Gao
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 71c1c ESTAT 0 ERA 9000000002c31300 BADV 12022c0e0
CSR008: BADI 2b0000
CSR012: EENTRY 90000000046b0000
CSR016: TLBIDX ffffffff8e000228 TLBEHI 120228000 TLBELO0 400000016f19001f TLBELO1 400000016f1a401f
CSR024: ASID a0004 PGDL 90000001016f0000 PGDH 9000000004680000 PGD 0
CSR028: PWCL 5e56e PWCH 2e4 STLBPS e RVACFG 0
CSR032: CPUID 0 PRCFG1 72f8 PRCFG2 3ffff000 PRCFG3 8073f2
CSR048: SAVE0 0 SAVE1 af9c SAVE2 12010d6a8 SAVE3 8300000
CSR052: SAVE4 0 SAVE5 0 SAVE6 0 SAVE7 0
CSR064: TID 0 TCFG 8f0ca15 TVAL 4cefd8b CNTC fffffffffe688aaa
CSR068: TICLR 0
CSR096: LLBCTL 1
CSR136: TLBRENTRY 46ba000 TLBRBADV ffff8000130d81e2 TLBRERA 9000000003585cb8 TLBRSAVE ffff8000130d81e0
CSR140: TLBRELO0 1fe00043 TLBRELO1 40 TLBREHI ffff8000130d800e TLBRPRMD 0
CSR384: DMW0 8000000000000001 DMW1 9000000000000011 DMW2 0 DMW3 0
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
target/loongarch/cpu.c | 66 ++++++++++++++++++++++++++++++++----------
target/loongarch/csr.c | 2 ++
target/loongarch/csr.h | 1 +
3 files changed, 53 insertions(+), 16 deletions(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index a744010332..e91f4a5239 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -793,6 +793,54 @@ static ObjectClass *loongarch_cpu_class_by_name(const char *cpu_model)
return oc;
}
+static void loongarch_cpu_dump_csr(CPUState *cs, FILE *f)
+{
+#ifndef CONFIG_USER_ONLY
+ CPULoongArchState *env = cpu_env(cs);
+ CSRInfo *csr_info;
+ int64_t *addr;
+ int i, j, len, col = 0;
+
+ qemu_fprintf(f, "\n");
+
+ /* Dump all generic CSR register */
+ for (i = 0; i < LOONGARCH_CSR_DBG; i++) {
+ csr_info = get_csr(i);
+ if (!csr_info || (csr_info->flags & CSRFL_UNUSED)) {
+ if (i == (col + 3)) {
+ qemu_fprintf(f, "\n");
+ }
+
+ continue;
+ }
+
+ if ((i > (col + 3)) || (i == col)) {
+ col = i & ~3;
+ qemu_fprintf(f, " CSR%03d:", col);
+ }
+
+ addr = (void *)env + csr_info->offset;
+ qemu_fprintf(f, " %s ", csr_info->name);
+ len = strlen(csr_info->name);
+ for (; len < 6; len++) {
+ qemu_fprintf(f, " ");
+ }
+
+ qemu_fprintf(f, "%" PRIx64, *addr);
+ j = find_last_bit((void *)addr, BITS_PER_LONG) & (BITS_PER_LONG - 1);
+ len += j / 4 + 1;
+ for (; len < 22; len++) {
+ qemu_fprintf(f, " ");
+ }
+
+ if (i == (col + 3)) {
+ qemu_fprintf(f, "\n");
+ }
+ }
+ qemu_fprintf(f, "\n");
+#endif
+}
+
static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
CPULoongArchState *env = cpu_env(cs);
@@ -812,22 +860,8 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
}
}
- qemu_fprintf(f, "CRMD=%016" PRIx64 "\n", env->CSR_CRMD);
- qemu_fprintf(f, "PRMD=%016" PRIx64 "\n", env->CSR_PRMD);
- qemu_fprintf(f, "EUEN=%016" PRIx64 "\n", env->CSR_EUEN);
- qemu_fprintf(f, "ESTAT=%016" PRIx64 "\n", env->CSR_ESTAT);
- qemu_fprintf(f, "ERA=%016" PRIx64 "\n", env->CSR_ERA);
- qemu_fprintf(f, "BADV=%016" PRIx64 "\n", env->CSR_BADV);
- qemu_fprintf(f, "BADI=%016" PRIx64 "\n", env->CSR_BADI);
- qemu_fprintf(f, "EENTRY=%016" PRIx64 "\n", env->CSR_EENTRY);
- qemu_fprintf(f, "PRCFG1=%016" PRIx64 ", PRCFG2=%016" PRIx64 ","
- " PRCFG3=%016" PRIx64 "\n",
- env->CSR_PRCFG1, env->CSR_PRCFG2, env->CSR_PRCFG3);
- qemu_fprintf(f, "TLBRENTRY=%016" PRIx64 "\n", env->CSR_TLBRENTRY);
- qemu_fprintf(f, "TLBRBADV=%016" PRIx64 "\n", env->CSR_TLBRBADV);
- qemu_fprintf(f, "TLBRERA=%016" PRIx64 "\n", env->CSR_TLBRERA);
- qemu_fprintf(f, "TCFG=%016" PRIx64 "\n", env->CSR_TCFG);
- qemu_fprintf(f, "TVAL=%016" PRIx64 "\n", env->CSR_TVAL);
+ /* csr */
+ loongarch_cpu_dump_csr(cs, f);
/* fpr */
if (flags & CPU_DUMP_FPU) {
diff --git a/target/loongarch/csr.c b/target/loongarch/csr.c
index 87bd24e8cd..7ea0a30450 100644
--- a/target/loongarch/csr.c
+++ b/target/loongarch/csr.c
@@ -9,12 +9,14 @@
#define CSR_OFF_FUNCS(NAME, FL, RD, WR) \
[LOONGARCH_CSR_##NAME] = { \
+ .name = (stringify(NAME)), \
.offset = offsetof(CPULoongArchState, CSR_##NAME), \
.flags = FL, .readfn = RD, .writefn = WR \
}
#define CSR_OFF_ARRAY(NAME, N) \
[LOONGARCH_CSR_##NAME(N)] = { \
+ .name = (stringify(NAME##N)), \
.offset = offsetof(CPULoongArchState, CSR_##NAME[N]), \
.flags = 0, .readfn = NULL, .writefn = NULL \
}
diff --git a/target/loongarch/csr.h b/target/loongarch/csr.h
index deb1aacc33..81a656baae 100644
--- a/target/loongarch/csr.h
+++ b/target/loongarch/csr.h
@@ -17,6 +17,7 @@ enum {
};
typedef struct {
+ const char *name;
int offset;
int flags;
GenCSRFunc readfn;
--
2.43.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
` (6 preceding siblings ...)
2025-01-24 7:00 ` [PULL 7/7] target/loongarch: Dump all generic " Bibo Mao
@ 2025-01-25 3:28 ` Stefan Hajnoczi
7 siblings, 0 replies; 22+ messages in thread
From: Stefan Hajnoczi @ 2025-01-25 3:28 UTC (permalink / raw)
To: Bibo Mao; +Cc: Stefan Hajnoczi, qemu-devel, Song Gao
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2025-06-10 7:53 Song Gao
2025-06-11 18:22 ` Stefan Hajnoczi
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2025-06-10 7:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha
The following changes since commit bc98ffdc7577e55ab8373c579c28fe24d600c40f:
Merge tag 'pull-10.1-maintainer-may-2025-070625-1' of https://gitlab.com/stsquad/qemu into staging (2025-06-07 15:08:55 -0400)
are available in the Git repository at:
https://github.com/gaosong715/qemu.git tags/pull-loongarch-20250610
for you to fetch changes up to ffe89c1762d879fd39ba1be853d154677dbfbc7b:
hw/loongarch/virt: Remove global variables about memmap tables (2025-06-10 15:01:41 +0800)
----------------------------------------------------------------
pull-loongarch_20250610
----------------------------------------------------------------
Bibo Mao (5):
hw/loongarch/virt: Fix big endian support with MCFG table
hw/intc/loongarch_pch: Convert to little endian with ID register
hw/intc/loongarch_extioi: Fix typo issue about register EXTIOI_COREISR_END
hw/loongarch/virt: Remove global variables about initrd
hw/loongarch/virt: Remove global variables about memmap tables
Qiang Ma (1):
hw/loongarch/virt: inform guest of kvm
Song Gao (1):
target/loongarch: add check for fcond
hw/intc/loongarch_pch_pic.c | 2 +-
hw/loongarch/boot.c | 52 +++++++++++++-----------
hw/loongarch/virt-acpi-build.c | 4 +-
hw/loongarch/virt.c | 27 ++++++++----
include/hw/intc/loongarch_extioi_common.h | 2 +-
include/hw/loongarch/boot.h | 5 +--
include/hw/loongarch/virt.h | 2 +
target/loongarch/tcg/insn_trans/trans_fcmp.c.inc | 25 ++++++++----
target/loongarch/tcg/insn_trans/trans_vec.c.inc | 16 ++++++--
9 files changed, 87 insertions(+), 48 deletions(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2025-06-10 7:53 Song Gao
@ 2025-06-11 18:22 ` Stefan Hajnoczi
0 siblings, 0 replies; 22+ messages in thread
From: Stefan Hajnoczi @ 2025-06-11 18:22 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel, stefanha
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PULL 0/7] loongarch-to-apply queue
@ 2026-02-10 2:30 Song Gao
2026-02-10 11:14 ` Peter Maydell
0 siblings, 1 reply; 22+ messages in thread
From: Song Gao @ 2026-02-10 2:30 UTC (permalink / raw)
To: qemu-devel
The following changes since commit c4a9d49c7b23a02c646ebac756519c15a24f7ecc:
Merge tag 'pull-9p-20260207' of https://github.com/cschoenebeck/qemu into staging (2026-02-07 17:46:15 +0000)
are available in the Git repository at:
https://github.com/gaosong715/qemu.git tags/pull-loongarch-20260210
for you to fetch changes up to 59c8adc2830342c2cff5fe8867191d0e166abb29:
target/loongarch: Add LA v1.1 instructions to max cpu (2026-02-10 10:48:20 +0800)
----------------------------------------------------------------
pull-loongarch-2026-02-10
----------------------------------------------------------------
Jiajie Chen (7):
target/loongarch: Require atomics to be aligned
target/loongarch: Add am{swap/add}[_db].{b/h}
target/loongarch: Add amcas[_db].{b/h/w/d}
target/loongarch: Add estimated reciprocal instructions
target/loongarch: Add llacq/screl instructions
target/loongarch: Add sc.q instructions
target/loongarch: Add LA v1.1 instructions to max cpu
target/loongarch/cpu.c | 11 +-
target/loongarch/cpu.h | 7 +
target/loongarch/disas.c | 33 +++++
target/loongarch/insns.decode | 34 +++++
target/loongarch/tcg/insn_trans/trans_atomic.c.inc | 145 +++++++++++++++++++--
target/loongarch/tcg/insn_trans/trans_farith.c.inc | 4 +
target/loongarch/tcg/insn_trans/trans_memory.c.inc | 22 ++++
target/loongarch/tcg/insn_trans/trans_vec.c.inc | 8 ++
target/loongarch/tcg/translate.c | 6 +-
target/loongarch/translate.h | 30 +++--
10 files changed, 280 insertions(+), 20 deletions(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PULL 0/7] loongarch-to-apply queue
2026-02-10 2:30 Song Gao
@ 2026-02-10 11:14 ` Peter Maydell
0 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2026-02-10 11:14 UTC (permalink / raw)
To: Song Gao; +Cc: qemu-devel
On Tue, 10 Feb 2026 at 02:57, Song Gao <gaosong@loongson.cn> wrote:
>
> The following changes since commit c4a9d49c7b23a02c646ebac756519c15a24f7ecc:
>
> Merge tag 'pull-9p-20260207' of https://github.com/cschoenebeck/qemu into staging (2026-02-07 17:46:15 +0000)
>
> are available in the Git repository at:
>
> https://github.com/gaosong715/qemu.git tags/pull-loongarch-20260210
>
> for you to fetch changes up to 59c8adc2830342c2cff5fe8867191d0e166abb29:
>
> target/loongarch: Add LA v1.1 instructions to max cpu (2026-02-10 10:48:20 +0800)
>
> ----------------------------------------------------------------
> pull-loongarch-2026-02-10
>
> ----------------------------------------------------------------
> Jiajie Chen (7):
> target/loongarch: Require atomics to be aligned
> target/loongarch: Add am{swap/add}[_db].{b/h}
> target/loongarch: Add amcas[_db].{b/h/w/d}
> target/loongarch: Add estimated reciprocal instructions
> target/loongarch: Add llacq/screl instructions
> target/loongarch: Add sc.q instructions
> target/loongarch: Add LA v1.1 instructions to max cpu
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2026-02-10 11:15 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 7:00 [PULL 0/7] loongarch-to-apply queue Bibo Mao
2025-01-24 7:00 ` [PULL 1/7] target/loongarch: Add dynamic function access with CSR register Bibo Mao
2025-01-24 7:00 ` [PULL 2/7] target/loongarch: Remove static CSR function setting Bibo Mao
2025-01-24 7:00 ` [PULL 3/7] target/loongarch: Add generic csr function type Bibo Mao
2025-01-24 7:00 ` [PULL 4/7] target/loongarch: Add common header file for CSR registers Bibo Mao
2025-01-24 7:00 ` [PULL 5/7] target/loongarch: Add common source file for CSR register Bibo Mao
2025-01-24 7:00 ` [PULL 6/7] target/loongarch: Set unused flag with CSR registers Bibo Mao
2025-01-24 7:00 ` [PULL 7/7] target/loongarch: Dump all generic " Bibo Mao
2025-01-25 3:28 ` [PULL 0/7] loongarch-to-apply queue Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2026-02-10 2:30 Song Gao
2026-02-10 11:14 ` Peter Maydell
2025-06-10 7:53 Song Gao
2025-06-11 18:22 ` Stefan Hajnoczi
2024-09-29 8:17 Song Gao
2024-09-30 14:06 ` Peter Maydell
2024-10-09 11:34 ` gaosong
2024-09-12 12:51 Song Gao
2024-09-13 13:34 ` Peter Maydell
2023-10-13 8:17 Song Gao
2023-10-16 19:20 ` Stefan Hajnoczi
2022-11-03 12:38 Song Gao
2022-11-03 18:31 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.