---
layout: page
pageTitle: LoongArch Upstream Activities
pageSubTitle: 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

<!--

线索来源：https://lore.kernel.org/loongarch/

内核需要补丁标题、链接及版本信息（v 几）
-->

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](https://lore.kernel.org/loongarch/20260622065843.3961572-1-chenhuacai@loongson.cn/) 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](https://lore.kernel.org/loongarch/20260705093624.1079988-1-rong.bao@csmantle.top/) 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](https://lore.kernel.org/loongarch/cover.1783670011.git.zhoubinbin@loongson.cn/) 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](https://lore.kernel.org/loongarch/cover.1783670733.git.zhoubinbin@loongson.cn/) 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](https://lore.kernel.org/loongarch/CAAhV-H5FGWPnJraY9aYLrLKa5B+eo74eScTFzUeGGXT6f=4FZA@mail.gmail.com/) 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](https://lore.kernel.org/loongarch/20260717063713.3638059-1-maobibo@loongson.cn/) of the patchset submitted this week addressed the above issues and merged the patches.

Tao Cui [fixed](https://lore.kernel.org/loongarch/20260714012452.1021833-1-cui.tao@linux.dev/) 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](https://lore.kernel.org/loongarch/6d591685-ee60-49a8-b883-f3d0a9395dd4@linux.dev/) 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](https://lore.kernel.org/loongarch/20260715100640.1454413-1-cui.tao@linux.dev/) 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](https://lore.kernel.org/loongarch/20260714072520.2745942-1-maobibo@loongson.cn/) 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](https://lore.kernel.org/loongarch/20260716013823.3259816-1-maobibo@loongson.cn/) 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](https://lore.kernel.org/bpf/20260709135344.1744677-1-main.kalliope@gmail.com/) 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](https://lore.kernel.org/loongarch/20260711101656.7415-1-yangtiezhu@loongson.cn/) 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](https://lore.kernel.org/loongarch/20260711100956.4351-1-yangtiezhu@loongson.cn/) 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](https://lore.kernel.org/loongarch/20260716030224.1696408-1-husong@kylinos.cn/) 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](https://lore.kernel.org/loongarch/20260717032721.1993891-1-husong@kylinos.cn/) by Song Hu has been judged as a "fake fix" and opposed by Huacai Chen.

Haofeng Li [fixed](https://lore.kernel.org/loongarch/20260714122351.3274006-3-lihaofeng@kylinos.cn/) multiple free and alloc leaks in the LoongArch Interrupt Redirection code.

## Toolchains

<!-- xry111 编撰审阅；工具链合集内容也可参考：https://patchwork.sourceware.org/ -->

This week's toolchain activities focus on fixes and optimizations. .NET has received LoongArch atomic instruction support.

### Binutils

<!-- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git -->

Xi Ruoyao [fixed](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a4481c8ff808e7237b99815d84b0d4c06ded6124) 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](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bfc3ac0d13b52a400aea7221603a5ac69510f471) `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](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2a6fb1798b6a81d57985494bba284239505a23ff) 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}*`](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4fec67921a8c11700dff6db1c8b6ad9255c59254), [`R_LARCH_B21` and etc.](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=eb2be880c89506ddc619af484121df1c9538e8e8) if relaxation does not change the relative location between the expression and its referenced symbol, and [do not generate](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=eb2be880c89506ddc619af484121df1c9538e8e8) `R_LARCH_ALIGN` before generating instructions that may be relaxed.

### GCC

<!-- https://gcc.gnu.org/git/?p=gcc.git -->

WANG Xuerui (xen0n) [reported](https://gcc.gnu.org/PR126200) a assembly failure caused by that GCC generates `vshuf4i.b` instructions with illegal operands on the main branch. Xi Ruoyao [submitted](https://gcc.gnu.org/pipermail/gcc-patches/2026-July/723919.html) a fix pending reviews.

Meng Qinggang [submitted](https://gcc.gnu.org/pipermail/gcc-patches/2026-July/723281.html) a patch to remove the addend mistakenly carried by the `R_LARCH_DTPREL{32,64}` relocation in the debug information.

### glibc

<!-- https://sourceware.org/git/gitweb.cgi?p=glibc.git](https://sourceware.org/git/gitweb.cgi?p=glibc.git -->

Xi Ruoyao [submitted](https://sourceware.org/glibc/wiki/Release/2.44#LoongArch_.2864-bit_hard-float.29) the test result of glibc 2.44 (Pre-Release).

<!-- ### Go 无进展 -->

<!-- https://github.com/golang/go -->

### LLVM

<!-- lrzlin 审阅；https://github.com/llvm/llvm-project -->

Lei Wang [submitted](https://github.com/llvm/llvm-project/pull/208886) a fix for the Clang test suite to disable the Emulated TLS test [not yet supported](https://github.com/llvm/llvm-project/pull/208413#issuecomment-4943363075) by the LoongArch backend. This test was originally introduced by the pull request [#207161](https://github.com/llvm/llvm-project/pull/208413) to add `__emutls_t` definition track support for `IRMaterializationUnit`.

Rui Wang [fixed](https://github.com/llvm/llvm-project/pull/209725) 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](https://github.com/llvm/llvm-project/pull/207316) that optimizes upper 128-bit vector widening.

Rong "Mantle" Bao [fixed](https://github.com/llvm/llvm-project/pull/206321) 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.

<!-- ### Rust -->

<!-- lrzlin 审阅；https://github.com/rust-lang/rust -->

<!-- ### Zig -->

<!-- https://github.com/ziglang/zig -->

### .NET

<!-- https://github.com/dotnet -->

Last month, An Liu [submitted](https://github.com/dotnet/runtime/pull/129683) 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

<!-- 刘阳负责；https://github.com/ptitSeb/box64 -->

- Yang Liu (ksco)
  - [Submitted](https://github.com/ptitSeb/box64/commit/24d550147f80562305d0c237bd54e1b6085bcc25) an upper 32-bit zero tracking optimization to remove redundant `bstrpick.d` instructions, and submitted a series of subsequent commits to complete the optimization: [1](https://github.com/ptitSeb/box64/commit/d53d99ebcfc3042d92b35b76f3636d9571cd83b7) [2](https://github.com/ptitSeb/box64/commit/2d5d7d1a417ee8ca96559de175dcff3ada6408fb) [3](https://github.com/ptitSeb/box64/commit/4b482fb0e1630376dd511c32d6b6de34bffbef6e) [4](https://github.com/ptitSeb/box64/commit/1dd0323f8f0863a7612d03f87559eda30a483992) [5](https://github.com/ptitSeb/box64/commit/e016c5a6cd0e331dcff70f40ff1a1863dab54c24).
  - [Submitted](https://github.com/ptitSeb/box64/commit/32f966210b71e208a2b39fe6994f944d1e02bdaf) a compact mode to DynaRec code block dumping to ease debugging.
  - [Fixed](https://github.com/ptitSeb/box64/commit/862fef5e0fa963f1b07f126675c24068fb58c449) the wrong implementation of `EXTRQ` and `INSERTQ` instructions in the interpreter.
  - [Modified](https://github.com/ptitSeb/box64/commit/894a18318043656278019e601da03141df4f550b) the `BOX64_DYNAREC_SEP` option to disabled by default to fix significant increase of branch mispredictions under certain loads.
  - [Submitted](https://github.com/ptitSeb/box64/commit/0910384e6f83ba5f8c9de2b0c65479061f451b20) a DynaRec implementation of the 16-bit `IMUL` instruction.
  - [Submitted](https://github.com/ptitSeb/box64/commit/373e1306ad476d29c19bb5429a71487939adb951) a fast path DynaRec implementation of the 16-bit `AND` instruction.
- Xiang Zhai
  - [Submitted](https://github.com/ptitSeb/box64/commit/a107c2a52b97ae0a40b8e9f1dee0f9d1456bba2e) ABI 1.0 compatibility code in the related commits of zero tracking for processing SIGBUS.

<!-- ### EDK II -->

<!-- https://github.com/tianocore/edk2, https://github.com/tianocore/edk2-platforms -->

### QEMU

<!-- https://lists.gnu.org/archive/html/qemu-devel/ -->

Bibo Mao [fixed](https://lists.gnu.org/archive/html/qemu-devel/2026-07/msg04219.html) `CONSTANT_TIMER_TICK_MASK` being unassigned when the constant timer is disabled.

SignKirigami [submitted](https://lists.gnu.org/archive/html/qemu-devel/2026-07/msg03117.html) 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](https://lists.gnu.org/archive/html/qemu-devel/2026-07/msg04671.html) 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.

<!--
发行版内容需要参考: https://loongfans.cn/os 以及 https://areweloongyet.com/，这里只列出了更新较为活跃的内容。

未标注内容均可在 [github.com](github.com) 中找到对应的内容。

白铭骢负责编撰审阅。
-->

<!-- ### Alpine Linux -->

<!-- https://github.com/alpinelinux/aports -->

<!-- ### Anolis OS（龙蜥）-->

<!-- https://gitee.com/organizations/anolis/pull_requests -->

### Debian

<!--

https://salsa.debian.org/explore/projects/active

此内容主要通过搜索 `merge` + `loongarch/loong64`

-->

Miao Wang backported an upstream patch to [fix](https://salsa.debian.org/qemu-team/qemu/-/merge_requests/55) dracut test errors in QEMU.

<!-- ### deepin -->

<!-- https://github.com/linuxdeepin -->

<!-- ### 安同 OS -->

<!-- https://github.com/AOSC-Dev/aosc-os-abbs -->

## 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).

<!--

其他开源项目主要参考 github.com 及 gitee.com 中的 Issues、Pull Request 及 disscussion 的内容，搜索内容为：`loongarch`、`LA`	、`loongson`、`loong64` 等内容，添加过滤规则为 `Recently updated`。

另外需要注意将上周编撰内容回顾，查看上周项目是否有最新进度。

-->

### Issues and Requests for Assistance

lindexi [submittted](https://github.com/xljiulang/PublishAotClang/issues/2) 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](https://github.com/loongson/Firmware/issues/164) a request to update the firmware on the Loongson 2K3000 AI Evaluation Board (G2K30Z0), and provided the [hardware design](https://gitee.com/open-loongarch/docs-2k3000/tree/master/2K3000%20AI%E5%BC%80%E5%8F%91%E6%9D%BF) for the board.

A community developer [submitted](https://issues.chromium.org/issues/535058203) 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](https://github.com/tonistiigi/xx/pull/254) 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](https://github.com/ebitengine/purego/pull/476) 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_](https://loongfans.cn/zh/guides/box64) (Chinese version only for now) on [Loongson Hobbyists Community](https://loongfans.cn/en/).

Rui Wang (heiher) [added](https://github.com/EmbarkStudios/crash-handling/pull/113) 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](https://github.com/xmake-io/xmake/pull/7655) an issue [reported by MetsukiMio](https://github.com/xmake-io/xmake/issues/7653) 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](https://repo.dactyloidae.xyz/Dactyloidae/UXP/releases/tag/13.2-rc1) Dactyloidae 13.2-rc1, a browser based on Firefox XUL. This release included JIT support for LoongArch that can improve browsing experience.

xiaoxiaoafeifei [added](https://github.com/JuliaLang/cpufeatures/pull/53) 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](https://github.com/syswonder/hvisor/pull/358) 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](https://github.com/KincaidYang/whois/pull/43) 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](https://github.com/LekKit/RVVM/pull/244) 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](https://github.com/gem5/gem5/pull/3309) LoongArch build support for modular computer-system architecture simulator, gem5. One upstream contributor has approved the pull request.
