Stabilize the recovered Linx64 QEMU branch for clean rebuilds#30
Conversation
Advance the vendored ROM and libvirt-ci gitlinks together so the emulator tree points at one consistent set of external firmware and CI snapshots. Constraint: This repository tracks ROM and CI dependencies as gitlink snapshots rather than in-tree copies Rejected: Leave the existing mixed submodule revisions in place | makes emulator state harder to reproduce Confidence: medium Scope-risk: narrow Directive: Treat these gitlink bumps as a coordinated baseline update and validate firmware-dependent flows before bisecting emulator regressions across them Tested: git diff --check Not-tested: QEMU build, firmware boot, or CI execution
Preserve the recovered v7.0.0-based Linx implementation while making the branch reproducible from a fresh configure/build and aligning boot/reset handling with the recovered firmwareless lane. Constraint: Recovered patch line is authoritative and must stay on the v7.0.0 compatibility base Rejected: Rebase the recovered implementation onto current upstream master | much larger integration surface with no validation benefit for this lane Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Keep linx64-softmmu single-target shims in sync with target/linx header expectations before changing Meson target wiring Tested: Fresh ../configure --target-list=linx64-softmmu --disable-werror, full ninja build, qemu-system-linx64-unsigned --version Not-tested: Guest boot/runtime smoke beyond binary startup
There was a problem hiding this comment.
Code Review
This pull request introduces the Linx architecture to QEMU, including TCG acceleration, a new interrupt controller (LXIC), and platform-specific devices. It also adds support for 8-bit floating-point types and extensive documentation. Review feedback primarily addresses performance and architectural correctness: global debug counters and expensive system calls in hot paths should be avoided to prevent cache contention and overhead. Additionally, the build configuration must retain host OS checks to prevent compilation failures on non-Linux systems, and the .gdbinit file requires the source command to function correctly. Other suggestions include following QEMU logging standards and fixing copy-paste errors in configuration comments.
I am having trouble creating individual review comments. Click here to see my feedback.
accel/tcg/cpu-exec.c (217)
Incrementing a global counter (kenny_tb_exec) on every Translation Block execution will cause significant cache contention in multi-threaded TCG (MTTCG) environments, severely impacting performance. These debug counters should be removed or moved to a per-CPU structure if they are intended for statistics.
accel/tcg/cpu-exec.c (224)
Calling qemu_get_timedate inside the TB execution logging path is extremely expensive as it often involves system calls. This will make the -d exec log almost unusable for performance-sensitive debugging. Consider using a cheaper timestamp or removing the time from the trace if not strictly necessary.
configure (1133)
Removing the [ "$targetos" = linux ] check allows the configuration to attempt building linux-user targets on non-Linux host operating systems (like macOS or BSD) simply because the directory exists. This will lead to compilation failures later in the build process as linux-user depends on Linux-specific headers and syscalls.
if [ "$targetos" = linux ] && [ -d $source_path/linux-user/include/host/$cpu ]; then
.gdbinit (1)
The .gdbinit file should contain GDB commands. If the intention is to load settings from qemu.gdbinit, you must use the source command.
source qemu.gdbinit
accel/tcg/cpu-exec.c (55-56)
Global variables like kenny_tb_exec and kenny_tb_trans appear to be debug leftovers. For a stabilized branch, these should be removed or integrated into a proper statistics reporting mechanism.
accel/tcg/cpu-exec.c (956)
Using printf for debugging output is discouraged in QEMU. Please use qemu_log or error_report to ensure output is correctly handled by different frontends and logging configurations.
configs/devices/linx-softmmu/default.mak (1)
The comment refers to riscv64-softmmu, but this file is for the linx-softmmu configuration. This appears to be a copy-paste error.
# Default configuration for linx-softmmu
Summary
Validation