Machine descriptors - #9
Merged
Merged
Conversation
A disk given by path has QEMU open the image and every backing file its header names. So QEMU sees the caller's filesystem, and a header decides what it reads. Disk.Chain is the other form: each image is a descriptor set (Spec.FDSets, -add-fd), and the images are -blockdev nodes, each backed by the next and the last by nothing. QEMU opens nothing by path, and follows no name a header carries. Each descriptor carries an opaque, the caller's path, which query-fdsets gives back. That is how a caller still learns which image a device has open. QMPFD and QMPFD2 put a monitor on a socket the caller already listens on, for a QEMU that may create no socket where the caller would connect. -object monitor-qmp, because QEMU 11.1 warns -mon is deprecated. TestAChainOverDescriptorsIsReadWithoutAPathAndSealedUnderAnOverlay runs in verify:args. It renames the directory away after opening the images, seals the top under an overlay handed over the same way, and reads the opaques back. With the explicit backing reference taken out, QEMU follows the header to a base that is no longer there. One descriptor per image is enough: QEMU 11.1.1 keeps the old top's descriptor when it seals it, rather than reopening it read-only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GHRRFvbnZi5q3KSTvyW5a
A QEMU that may open nothing by path needs its console handed over too, and the usual console is the write end of a FIFO. "-serial file:/dev/fdset/<ID>" fails on one with EINVAL: QEMU truncates what it opens. SerialFDSet puts the console on a descriptor set through "-chardev file,append=on" instead. It counts as a serial port in the fingerprint, as Serial does, so a template taken with one form restores into the other. TestAChainOverDescriptors writes its console into a FIFO this way, and the fingerprint test puts a machine given descriptors beside the same machine given paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GHRRFvbnZi5q3KSTvyW5a
A QEMU whose root holds no /dev can still run a machine: KVMFDSet moves the accelerator to -accel kvm,device=/dev/fdset/N, VsockFD and NIC.VhostFD become vhostfd=. QEMU refuses -accel beside -machine accel= (11.1.1), so the machine argument drops it; the shape, and so the fingerprint, still says accel=kvm. Proven against the release build: /dev/null in the place of either device fails the start, the devices themselves answer on QMP. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GHRRFvbnZi5q3KSTvyW5a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.