LoongArch Upstream Activities
2026.07.10-2026.07.17

This article contains LoongArch upstream community activities in the past week (as of July 17th 2026 18:00 CST), including ports, optimization, platform support, bug fixes and reports, etc. in Linux kernel, compiler toolchains, emulators and other projects.
Key upstream community activities:
- Linux kernel merged a patch to register ISO/LPC PIO devices before registering ACPI PCI root devices to fix the mainline kernel boot failure on several 3A6000/2K3000/3B6000M devices, a patch to retrieve CPU package ID from ACPI PPTT to fix topology information on 3B6000
- Pull request to add LoongArch atomic instruction implementation to .NET is pending upstream reviews
- gem5, a modular computer-system architecture simulator, has a LoongArch support pull request pending upstream reviews and one upstream contributor has approved the pull request
- RVVM, a RISC-V emulator, has merged the LoongArch64 JIT backend support. This achieves about 7% native performance (4.7x interpreter performance)
- LoongArch support in Julia programming language is in progress
Linux Kernel
This week's Linux kernel activities focus on fixes for current platforms (e.g. fixes for a few devices known to have boot failures, and fix for CPU topology information on 3B6000) and expansion (iteration on CAN-FD controller support patches), KVM feature expansion (ACPI IOVT table) and reliablity fixes, and other miscellaneous fixes.
Platform Support
Two weeks ago, Huacai Chen submitted a patch to support registering ISA/LPC Programmable I/O (PIO) devices before registering ACPI PCI root devices. This patch focuses on an out-of-bounds access issue when booting mainline kernels on platforms that use PIO devices defined by SystemIO. Linux kernel has merged the patch into the mainline branch, and backporting it to the current stable and longterm branches.
This issue is prevalent among industrial control products that provide large number of serial ports using ITE Super IO, such as Seewo 3A6000 motherboards and IP3 3B6000M mITX motherboards.
Last week, Rong Bao submitted a patch to read core ID from ACPI PPTT (Processor Properties Topology Table) to fix CPU topology information on 3B6000. Tests of the patch on XB612B0_V1.0 and XB612B0_V1.2 motherboards, 8- and 12-core combinations have succeeded.
Binbin Zhou submitted a patch to add support for thermal monitoring on 2K0300. This patch supports different batches of 2K0300 chipsets -- early batches may report invalid data, and the driver will print warnings and fall back to the thermal calculation $T_{raw} \times 569 - 394700$ to retain basic function.
Binbin Zhou submitted the 5th iteration of CAN-FD controller driver, continuing to fix multiple functional and code style problems found in previous patch iterations, and fixing compilation on the master branch.
KVM Subsystem
This week, Huacai Chen provided reviews on Bibo Mao's ACPI IOVT table support patches, suggesting re-organizing the 8 patches into 3 patches, corresponding to the introduction of acpi_arch_init() and acpi_arch_late_init() functions, support for IOVT device table scanning on LoongArch, and the addition of ACPI_IOVT configuration option. The second iteration of the patchset submitted this week addressed the above issues and merged the patches.
Tao Cui fixed an out-of-bounds access issue in the LoongArch KVM EIOINTC emulation that is potentially a security vulnerability as unprivileged guests are able to exploit the issue. Bibo Mao reviewed the patchset and pointed out that he included a relavant fix in another pathset. Tao Cui then gave up on his patchset in favour of Bibo Mao's patchset.
Tao Cui fixed an issue of the TVAL value in kvm_restore_timer() function not correctly updating after virtual machine migration, and a crash caused by a division by zero.
Bibo Mao submitted the 5th iteration of the LoongArch KVM EIOINTC and DMSINTC emulation hardening patchset. The patchset fixes issues and flaws including uses of variables before initialization, only printing warnings instead of interrupting when IPI address is not aligned, and kernel mode interrupts not delivered using kernel mode API.
Bibo Mao submitted a patch to fix a virtual machine migration issue caused by that pv_feature in vCPU could only be set once. This patch allows setting pv_feature more than once. It checks if vCPU feature was set correctly and had never been started, and resets pv_feature if that was not the case.
BPF Subsystem
Nicholas Dudar fixed the upper 32-bit not being zero in the result of BPF 32-bit arithmetics (ALU32) on LoongArch. Tiezhu Yang has tested and confirmed the patch, and the patch fixes 4 BPF test cases.
Tiezhu Yang submitted a patchset to optimize 32-bit zero/sign extensions. The patchset is currently in the RFC (Request for Comments) state, and needs reviews and tests. Tiezhu Yang also cleaned up dead and redundant code, and unnecessary runtime checks for BPF subsystem function build_insn() paths.
Other Functional and Code Fixes in the Kernel
Song Hu fixed the infinite re-execution of the faulty instruction that causes a page fault, caused by that the kernel treats any non-write fault on a present page (e.g. a NX page) as spurious. The patch to fix the size calculation for local_flush_tlb_kernel_range() submitted by Song Hu has been judged as a "fake fix" and opposed by Huacai Chen.
Haofeng Li fixed multiple free and alloc leaks in the LoongArch Interrupt Redirection code.
Toolchains
This week's toolchain activities focus on fixes and optimizations. .NET has received LoongArch atomic instruction support.
Binutils
Xi Ruoyao fixed kernel modules not loaded by the kernel due to having unexpected R_LARCH_ALIGN relocation caused by aforementioned ld -r alignment fix.
Meng Qinggang simplified R_LARCH_DTPREL{32,64} relocation processing in the linker, and ignored its addend as a workaround of the issue that GCC carries addend by mistake when using these relocations in the debug information.
Meng Qinggang applied a series of measures to reduce the overall size of the relocation table: For the linker, set the size of R_LARCH_TLS_DESC64* relocations to $4$ (was $8$, and lead to an extra R_LARCH_NONE relocation); for the assembler, do not generate relocations for R_LARCH_{ADD,SUB}*, R_LARCH_B21 and etc. if relaxation does not change the relative location between the expression and its referenced symbol, and do not generate R_LARCH_ALIGN before generating instructions that may be relaxed.
GCC
WANG Xuerui (xen0n) reported a assembly failure caused by that GCC generates vshuf4i.b instructions with illegal operands on the main branch. Xi Ruoyao submitted a fix pending reviews.
Meng Qinggang submitted a patch to remove the addend mistakenly carried by the R_LARCH_DTPREL{32,64} relocation in the debug information.
glibc
Xi Ruoyao submitted the test result of glibc 2.44 (Pre-Release).
LLVM
Lei Wang submitted a fix for the Clang test suite to disable the Emulated TLS test not yet supported by the LoongArch backend. This test was originally introduced by the pull request #207161 to add __emutls_t definition track support for IRMaterializationUnit.
Rui Wang fixed LASX-only patterns not matching in matchHalfOf128BitLanes caused by that the function only binds to LSC instructions, and extension operations such as v8i8 -> v8i32 and v2i64 -> v2i128 using VEXTH/VEXTH_U by mistake. This issue was raised from #207316 that optimizes upper 128-bit vector widening.
Rong "Mantle" Bao fixed drifting relocations in lld with both --no-relocs and --emit-relocs arguments enabled at the same time on LoongArch and RISC-V. However, Jessica Clarke argued that --emit-relocs is meaningless with the linker relaxation enabled and opposed the fix. Considering that GNU ld and mold have both chosen to fix the issue, further discussions on the issue are needed.
.NET
Last month, An Liu submitted support for LoongArch atomic instructions for both LoongArch ISA v1.0 and v1.1. The patchset have been submitted to the JIT development team for review.
Firmware & Emulators
For emulators, Box64 received more optimizations and fixes as usual, QEMU received two fixes and the third iteration on the patchset to add support for LVZ instruction set extension to the TCG interpreter.
Box64
- Yang Liu (ksco)
- Submitted an upper 32-bit zero tracking optimization to remove redundant
bstrpick.dinstructions, and submitted a series of subsequent commits to complete the optimization: 1 2 3 4 5. - Submitted a compact mode to DynaRec code block dumping to ease debugging.
- Fixed the wrong implementation of
EXTRQandINSERTQinstructions in the interpreter. - Modified the
BOX64_DYNAREC_SEPoption to disabled by default to fix significant increase of branch mispredictions under certain loads. - Submitted a DynaRec implementation of the 16-bit
IMULinstruction. - Submitted a fast path DynaRec implementation of the 16-bit
ANDinstruction.
- Submitted an upper 32-bit zero tracking optimization to remove redundant
- Xiang Zhai
- Submitted ABI 1.0 compatibility code in the related commits of zero tracking for processing SIGBUS.
QEMU
Bibo Mao fixed CONSTANT_TIMER_TICK_MASK being unassigned when the constant timer is disabled.
SignKirigami submitted the third iteration on the patchset to add LVZ instruction set extension to the TCG interpreter. Bibo Mao has left review comments on the patchset.
Miao Wang submitted a patch to fix a data race condition when emulating using the TCG interpreter, where the CPU and other processes write to the CSR_ESTAT register at the same time. This fixes random RCU Stall and Soft/Hard Lockup errors on guest machines with dual vCPU, and random stucks at the idle_exit() function on guest machines with single vCPU.
Linux Distributions and Operating Systems
There are not many fixes and optimizations targeting LoongArch from Linux distributions and operating systems this week.
Debian
Miao Wang backported an upstream patch to fix dracut test errors in QEMU.
Other Open-Source Projects
As always, it has been a very busy week for other open source projects. To make the part easier to read, we will be more selective starting this week, and filter out academic and competition related activities (we may list these activities in separate sections next time).
Issues and Requests for Assistance
lindexi submittted a request to add LoongArch support to PublishAotClang, a .NET AOT cross-compilation and publishing toolchain. The author stated that the .NET upstream has not fully implemented PublishAot on LoongArch, which needs more attention so that the project can support LoongArch.
TOA-HI submitted a request to update the firmware on the Loongson 2K3000 AI Evaluation Board (G2K30Z0), and provided the hardware design for the board.
A community developer submitted a request to add LoongArch compiler-rt binary to the Chromium Clang toolchain. The upstream maintainers marked the request as "Won't Fix (Intended Behaviour)", stating that LoongArch is not officially supported and preferred downstream maintenance. However, the community developer pointed out that another unofficial (community) architecture, RISC-V, has received official support in the upstream back in 2025, and requested that the upstream explain the prerequisite for receiving official support and why the two architectures are treated differently. The upstream has not made further comments.
Ports, Optimizations, and Fixes
CrazyMax (crazymax) fixed the support for different LoongArch distro architecture names for tonistiigi/xx, a Dockerfile cross-compilation helper. The upstream has since merged the pull request and the next release will include the fix.
Hajime Hoshi (hajimehoshi) fixed struct-return stack-argument undercount on LoongArch (and x86-64) for purego, a library to call C functions written in pure Go. The upstream has merged the pull request and the next release will include the fix.
Mikura Kyouka (Mikura-Kyouka) published User's Guide for Box64 (Chinese version only for now) on Loongson Hobbyists Community.
Rui Wang (heiher) added basic LoongArch support for crash-handling, a Rust crash handling library. This is one of the dependencies for the Zed text editor/IDE.
ruki fixed an issue reported by MetsukiMio that the cross-platform compilation system xmake produces wrong LoongArch binaries (outputting 32-bit binaries on 64-bit targets). The upstream has merged patch into the main branch and the next release will include the fix.
wuggy released Dactyloidae 13.2-rc1, a browser based on Firefox XUL. This release included JIT support for LoongArch that can improve browsing experience.
xiaoxiaoafeifei added LoongArch CPU feature inspection support for the Julia programming language library, cpufeatures (CPU feature inspection library), and explained that it is part of the plan to add LoongArch support to the Julia programming language. The upstream has expressed support for the proposal.
Zhongkai Xu added Alternative Routine-ID Interpretation (ARI) support on LoongArch for the bare-metal virtual machine hypervisor, hvisor. ARI improves scalability and low-latency peformance for virtualization systems.
YANGJINZE (KincaidYang) added LoongArch target support for WHOIS querying tool, whois. The upstream has merged the change, and will distribute LoongArch (ABI 2.0) binaries starting from version 1.1.0.
Yao Zi (ziyao233) submitted LoongArch JIT backend support for system-level RISC-V emulator, RVVM. According to the author, the JIT backend currently achieves about 7% native performance, and 4.7x improvement compared to interpreter mode. The upstream has merged the pull request and the next release will include the change.
Xi Zhang (cheungxi) submitted LoongArch build support for modular computer-system architecture simulator, gem5. One upstream contributor has approved the pull request.