Install
$ agentstack add skill-processmission-oh-my-qemu-qemu-tcg-backend-adaptation ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
QEMU TCG Backend Adaptation
Use this domain skill for host backend work under tcg//: instruction encoders, TCG_TARGET_HAS_*, constraints, tcg_out_op, qemu load/store paths, vector emission, and generated host-code bugs.
Flow dependencies
- Start with
qemu-flow-plan. - Put host-code logs, TCG dumps, temporary disassembly, benchmark notes, and review files under
build/agent//. - Use
qemu-rlcr-loopfor implementation/debug rounds. - Use
qemu-buildfor host backend builds. - Use
qemu-debugfor TCG logs andone-insn-per-tb. - Use
qemu-model-verificationfor final evidence.
Hard policy boundary
Do not produce source code intended for QEMU upstream submission. Do not add DCO or review trailers.
Backend contract
A backend change is correct only when these agree:
- IR op semantics from
include/tcg/tcg-opc.handdocs/devel/tcg-ops.rst; - host feature flag in
tcg-target-has.h; - operand constraints in
tcg-target-con-str.handtcg-target-con-set.h; - register class/reserved-register assumptions in
tcg-target.h; tcg_out_op, vector emission, or qemu_ld/st implementation intcg-target.c.inc;- tests/logs proving the native path or intentional generic expansion.
Do not enable TCG_TARGET_HAS_* before constraints and emission support are complete.
Classify the change
Record one category in the plan:
- new host instruction encoder;
- native emission for existing TCG op;
- optional op enablement;
- constraint/register allocation fix;
- qemu_ld/st or atomic path;
- vector op support;
- host feature gating/runtime CPU detection;
- code generation bug investigation.
Emission checklist
Check:
- immediate ranges and sign extension;
- i32 result extension on 64-bit hosts;
- signed vs unsigned conditions;
- branch displacement and relocation/pool handling;
- clobbers and call ABI;
- scalar vs vector register classes;
- host endianness;
- constant materialization;
- instruction-cache flush needs.
Keep code generation paths allocation-free and simple.
qemu_ld/st and atomics
Verify separately:
MemOpsize, sign, and endianness;- TLB fast path vs slow path labels;
- i128 register pairing;
- user-mode vs system-mode differences;
- guest atomicity vs host capability;
- helper calls and clobbers;
- unaligned behavior.
Vector rules
For vectors, verify:
- host vector feature detection;
v64/v128/v256and specific op flags;- element size coverage;
- constant operand forms;
- scalar fallback vs vector path;
tcg_can_emit_vec_op()/tcg_expand_vec_op()behavior.
Verification expectations
- Build the backend on the host.
- Run focused
tests/tcgwhen available. - Capture TCG IR and host-code logs proving native emission or fallback.
- Check unsupported host features remain disabled.
- Use
one-insn-per-tbwhen frontend/backend attribution is unclear.
Upstream references
- QEMU code provenance and AI policy:
docs/devel/code-provenance.rst. - TCG IR semantics:
docs/devel/tcg-ops.rst. - TCG internals:
docs/devel/tcg.rst. - Backend examples:
tcg/aarch64/,tcg/riscv64/,tcg/loongarch64/. - Core declarations:
include/tcg/tcg.h,include/tcg/tcg-opc.h,include/tcg/tcg-op-common.h.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: processmission
- Source: processmission/oh-my-qemu
- License: MIT
- Homepage: https://processmission.github.io/oh-my-qemu/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.