Skip to content

feat(qemu): add QEMU workload build and run support - #60

Open
rezado wants to merge 4 commits into
mainfrom
feat-support-qemu
Open

feat(qemu): add QEMU workload build and run support#60
rezado wants to merge 4 commits into
mainfrom
feat-support-qemu

Conversation

@rezado

@rezado rezado commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for building and running Linux workloads on the QEMU nemu machine.

Changes

  • Add a QEMU-specific single-core DTS with the 16550A UART at 0x310b0000.
  • Add scripts/run-qemu.sh with QEMU machine/device contract validation.
  • Add platform-aware firmware output:
    • NEMU: fw_payload.bin
    • QEMU: fw_payload.qemu.bin
  • Support QEMU builds for CoreMark, SPEC CPU2006, and SPEC CPU2017.
  • Keep SPEC image exports under the existing build/images/... directories.
  • Align single-core DTB placement with OpenSBI at 0x801c0000.
  • Configure the multi-hart LibCheckpoint serial port for the QEMU UART.
  • Update DTS templates and workload documentation.

# Conflicts:
#	Makefile
#	README.md
#	dts/README.md
#	scripts/build-firmware-linux.sh
#	scripts/build-sbi.sh
#	scripts/export-linux-debug-artifacts.sh
#	workloads/linux/spec2006/rules.mk
#	workloads/linux/spec2017/rules.mk

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SPEC2017 QEMU builds need adequate memory profiles or explicit workload restrictions before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds build and runtime support for Linux workloads on QEMU’s nemu machine.

Changes:

  • Adds QEMU-specific DTS, firmware outputs, and runner validation.
  • Extends CoreMark and SPEC workflows for QEMU.
  • Aligns DTB placement and QEMU device configuration.
File summaries
File Description
workloads/linux/spec2017/rules.mk Adds QEMU firmware rules; memory profiles require correction.
workloads/linux/spec2017/README.md Updates DTS examples.
workloads/linux/spec2006/rules.mk Adds QEMU-aware firmware rules.
workloads/linux/spec2006/README.md Documents QEMU workflows.
workloads/linux/coremark/README.md Documents CoreMark QEMU builds.
scripts/run-qemu.sh Validates and runs QEMU workloads.
scripts/generate-xiangshan-multihart-dts.py Generates QEMU-compatible multi-hart DTS files.
scripts/export-linux-debug-artifacts.sh Exports platform-specific firmware artifacts.
scripts/build-sbi.sh Aligns the single-hart DTB address.
scripts/build-gcpt.sh Configures the checkpoint serial port.
scripts/build-firmware-linux.sh Supports platform-specific firmware outputs.
README.md Documents QEMU usage and layouts.
Makefile Adds platform-aware workload builds.
dts/xiangshan-qemu-nemu-mem2g.dts.in Defines the single-hart QEMU topology.
dts/xiangshan-fpga-noAIA-32hart-mem64g.dts.in Aligns the 32-hart QEMU devices.
dts/xiangshan-fpga-noAIA-2hart-mem8g-novec.dts.in Updates the 8 GiB QEMU profile.
dts/xiangshan-fpga-noAIA-2hart-mem16g-novec.dts.in Updates the 16 GiB QEMU profile.
dts/README.md Documents QEMU DTS conventions.
Review details
  • Files reviewed: 20/20 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread workloads/linux/spec2017/rules.mk Outdated
Select 8 GiB and 24 GiB QEMU DTS profiles for rate and speed cases, and retain the existing per-mode memory validation. Keep single-hart GCPT and OpenSBI configuration on the concrete 2 GiB QEMU template.
@poemonsense

Copy link
Copy Markdown
Member

what is the difference between QEMU and NEMU workloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants