Skip to content

Instantly share code, notes, and snippets.

View stsquad's full-sized avatar

Alex Bennée stsquad

View GitHub Profile
@stsquad
stsquad / gist:753f9651678ac188cec73afbded18bae
Created July 4, 2025 10:53
Booting up an Amazon image under TCG in QEMU
./qemu-system-aarch64 -serial mon:stdio \
-machine type=virt,virtualization=on,pflash0=rom,pflash1=efivars,gic-version=max \
-cpu neoverse-n1 -smp 4 -accel tcg \
-device virtio-net-pci,netdev=unet \
-device virtio-scsi-pci \
-device scsi-hd,drive=amazon \
-netdev user,id=unet,hostfwd=tcp::2222-:22 \
-blockdev driver=qcow2,node-name=amazon,file.driver=file,file.filename=/home/alex/images/al2023-kvm-2023.7.20250623.1-kernel-6.1-arm64.xfs.gpt.qcow2 \
-blockdev node-name=rom,driver=file,filename=(pwd)/pc-bios/edk2-aarch64-code.fd,read-only=true \
-blockdev node-name=efivars,driver=file,filename=$HOME/images/qemu-arm64-efivars \
@stsquad
stsquad / kvm25-qemu-keynote.org
Last active September 2, 2025 20:45
KVM Forum 2025 QEMU Zeigeist Report

QEMU Status Report

Setup

This is the setup pre-amble for the diagram and graph generation. The

Thought 59.77 s
The user wants to call a function on entry to the main hubi transient.
Looking at the transient-define-prefix hubi () definition, there isn't an obvious hook or slot to run a function when the transient is invoked.
However, the user says "Can I call something once on entry to the main hubi transient to set values if they are in fact null - ideally by loading from dir locals."
The problem is that .dir-locals.el are applied when a file is visited. If the user is in a buffer that is not visiting a file in the project (e.g. mu4e-headers), the dir-locals for that project won't have been applied. However, default-directory might point into the project.
The user mentions a hack to hubi--show-compile that didn't work because they need to set defaults based on .dir-locals. This suggests that hubi--show-current-compile is a place where we could put some logic.