Install
$ agentstack add skill-processmission-oh-my-qemu-qemu-tcg-frontend-instruction ✓ 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 Frontend Instruction
Use this domain skill for guest ISA decode/translation work in target//: decodetree patterns, trans_* functions, feature gates, helpers, PC updates, exceptions, and tests.
Flow dependencies
- Start with
qemu-flow-plan. - Put decode notes, generated decoder inspection, TCG logs, test outputs, and scratch files under
build/agent//. - Use
qemu-rlcr-loopfor iterative work. - Use
qemu-buildfor target builds. - Use
qemu-debugfor TCG logs andone-insn-per-tbdebugging. - Use
qemu-model-verificationfor evidence reporting.
Hard policy boundary
Do not produce source code intended for QEMU upstream submission. Do not add DCO or review trailers.
Frontend contract
A frontend maps guest instructions to TCG IR while preserving architectural exceptions, feature gating, PC state, and TB termination.
Record in the plan:
- ISA extension/version and privilege requirements;
- instruction encoding and aliases;
- operand fields and sign/zero extension;
- XLEN/vector/FPU state constraints;
- expected illegal-instruction cases;
- helper vs direct TCG-op decision;
- tests that prove semantics and invalid encodings.
Decoder rules
For decodetree targets:
- reuse existing fields, formats, and argument sets;
- confirm fixedmask/fixedbits uniqueness;
- handle overlap groups intentionally;
- use field functions for transformed immediates;
- keep decoder ordering consistent with nearby extensions.
For hand decoders, preserve existing fallback and illegal-instruction behavior.
trans_* rules
Before emitting IR, gate:
- CPU/ISA feature;
- privilege/virtualization mode;
- XLEN/operand width;
- reserved bits and invalid immediates;
- vector/FPU state where relevant;
- alignment or memory-mode constraints if architectural.
Use direct TCG ops for simple integer/logical/shift/select operations. Use helpers for complex state, softfloat/crypto/vector libraries, or exception-heavy semantics.
Helper calls must use correct side-effect flags. Do not mark a helper no-side-effects if it can raise or mutate CPU state.
PC and TB rules
Check target conventions for:
pc_nextadvancement;- PC update before exceptions;
- branch/direct-block chaining;
ctx->base.is_jmpstate;- page-boundary behavior;
- single-step and interrupt trigger behavior.
Wrong PC state corrupts exceptions, gdbstub state, and replay/debug evidence.
Verification expectations
- Build the target translator.
- Add/run focused
tests/tcg//coverage when applicable. - Cover edge values, invalid encodings, feature-disabled behavior, and privilege errors.
- Use
-accel tcg,one-insn-per-tb=onwhen debugging instruction boundaries. - Store TCG logs under
build/agent//logs/.
Upstream references
- QEMU code provenance and AI policy:
docs/devel/code-provenance.rst. - Decodetree:
docs/devel/decodetree.rst. - TCG internals:
docs/devel/tcg.rst. - TCG IR/helper semantics:
docs/devel/tcg-ops.rst. - Target examples:
target/riscv/translate.c,target/riscv/*.decode,target/riscv/insn_trans/.
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.