Repository navigation
Rebase the edera fork commits onto v54.0 - #3
Merged
Merged
Conversation
In order to prepare for supporting bidirectional communication over a file-backed virtio-console device, rename the field in `ConsoleConfig` from `file` to `output_file` to clarify its purpose. No functional change intended, but merging this change would likely break API compatibility. Signed-off-by: Simon Veith <simon@edera.dev>
When used as `--console file=<path>`, the virtio-console device is currently unidirectional (output from guest only). Add an optional parameter `input_file=<path>` which allows input into the guest from the given file or pipe as well. Signed-off-by: Simon Veith <simon@edera.dev>
The deterministic cache leaf (0x8000_001d on AMD, 0x4 on Intel) is inherited verbatim from the host via KVM_GET_SUPPORTED_CPUID, so its "logical processors sharing this cache" field still describes the host's last-level cache span (e.g. a whole CCX). When a guest is given a multi-package topology to back a vNUMA layout, the guest's LLC then appears to cross NUMA node boundaries and the kernel warns: sched: CPU #2's llc-sibling CPU #0 is not on the same node! Re-derive the cache-sharing field from the topology we synthesize: per-core caches (L1/L2) share across a core's threads, and the last-level cache shares across a whole package (== one vNUMA node). Cache geometry is left untouched, and single-package guests keep the host's cache topology, which is already self-consistent. Signed-off-by: Steven Noonan <steven@edera.dev>
asher
force-pushed
the
asher/v54-rebase
branch
from
October 15, 2026 23:53
de78ff8 to
671711e
Compare
cloud-hypervisor derives a vCPU's x2APIC ID from cpu_id / (threads*cores*dies), so it can only carve equal-sized packages. An unbalanced vNUMA layout (e.g. 4+3 vCPUs) therefore cannot map one guest package per node, which is what keeps a node's last-level cache from appearing to span nodes. Add vcpu_x2apic_id(), mirroring Xen's guest_vcpu_x2apic_id: each node occupies a power-of-two APIC-ID window sized to the largest node (encoded as cores_per_die); a vCPU's ID is (node << pkg_shift) | offset, and under-filled nodes leave the tail of their window unused. For balanced layouts this is bit-identical to the uniform encoding. Compute every vCPU's APIC ID once in CpuManager from the NUMA layout and feed it to the vlapic, MADT, SRAT, the AML _MAT and the per-vCPU CPUID topology leaves so all interfaces agree. Relax the topology-count check to allow over-provisioned APIC space (total >= max_vcpus). Signed-off-by: Steven Noonan <steven@edera.dev>
KVM_GET_SUPPORTED_CPUID can advertise CPUID(7,0).EDX[31] (SSBD via IA32_SPEC_CTRL) without EDX[26] (SPEC_CTRL) on AMD hosts, where speculation control is exposed through leaf 0x8000_0008 instead. The guest kernel's cpuid-deps check then warns: x86 CPU feature dependency check failure: CPU0 has '18*32+31' enabled but '18*32+26' disabled. Enforce the dependency in the guest CPUID: drop EDX[31] when EDX[26] is clear. Real SSBD stays available to the guest via 0x8000_0008.EBX[24]. Signed-off-by: Steven Noonan <steven@edera.dev>
A guest flush asks that written data survive a crash. fdatasync gives that: the data plus the metadata needed to read it back. fsync also commits the timestamps, and on ext4 every O_DIRECT write updates the image mtime, so each guest flush forced a host journal commit on top of the device flush. This was already in QEMU already. Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
0.23.46 fixes RUSTSEC-2026-0346, RUSTSEC-2026-0347, RUSTSEC-2026-0348 and RUSTSEC-2026-0349, which cargo audit reports for 0.23.45. Signed-off-by: Asher Feldman <asher@edera.dev>
asher
force-pushed
the
asher/v54-rebase
branch
from
October 16, 2026 00:23
9452f78 to
400f4f5
Compare
asher
marked this pull request as ready for review
October 16, 2026 00:51
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.
Rebase the six
edera/v53.xfork commits onto upstream v54.0 and bumprustls, as the base for KVM zone fork, export and import in protect.Merge this PR with "Create a merge commit", as
edera/v53.xdoes. Do not rebase or squash it, so that the seven commits keep their shas and signatures and the next rebase can carry them one by one.Why v54.0
Upstream v54.0 contains the four fixes that KVM snapshot and restore need, so this branch carries none of them as backports:
4c6bb7951virtio-devices: pci: Skip ring index restore for unused queues. Without it, an aarch64 restore panics for a virtio device whose queues the guest never set up.b47c26fa5virtio-devices: Resume vhost-user devices after snapshot. Without it, a snapshot stops the source VM's virtio-fs.efa34d789and18366e1b7: derive the vCPU MPIDR and the per-vCPU GICR_TYPER values. Without them, an aarch64 snapshot saves the redistributor and ICC state of vCPU 0 for every vCPU, and the restored guest stalls.v54.0 also adds the VM generation ID device and
preserve_source.Commits
Each commit is a rebase of the
edera/v53.xcommit in parentheses:7f1d3468fDNM: vmm: Rename ConsoleConfig.file to output_file (5948abda1)c98229153DNM: vmm: Support console input_file option (504bccf73). Conflict in thevmm/src/config.rstests only: theconsole_configtest helper takes the v54IommuTypeand the fork'soutput_fileandinput_file.530738d7farch: x86_64: derive guest cache topology from the synthesized topology (eaafe4dae)ef7a922cbarch, vmm: vNUMA-aware x2APIC IDs for unbalanced NUMA layouts (6a482e476)e414c7b3earch: x86_64: clear SSBD CPUID bit when SPEC_CTRL is absent (59afbd425)4943d564eblock: flush the image with fdatasync instead of a full fsync (596d2f1bd)One new commit:
400f4f5d7build: Bump rustls to 0.23.46. It fixes RUSTSEC-2026-0346 to 0349, which make the audit check fail on the v54.0Cargo.lock. Onlyvm-migration/src/tls.rsusesrustls, for migration over TLS.Changes from the
edera/v53.xoriginals, for CI:7f1d3468fandc98229153also update the console configs infuzz/fuzz_targets/http_api.rs, andc98229153drops a needless borrow inFile::open(input_file_path). Without them, fuzz-build and every quality job fail.ef7a922cbalso puts#[allow(clippy::too_many_arguments)]onCpuManager::configure, because its newx2apic_idargument makes 8 withigvmon x86_64. Without it, thekvm,sev_snpclippy step fails.530738d7fhas a shorter title, andef7a922cband4943d564ehave bodies rewrapped at 72 characters, for gitlint.Known CI failure
gitlint refuses the
DNMcomponent in the titles of7f1d3468fandc98229153. A new title needs the owners' decision on theDNMconvention.Testing
cargo build --release -p cloud-hypervisor --locked --features ivshmemfor aarch64 and amd64.-c 3, from a suspended parent, a grandchild, a child with no network), export and import of a 4-vCPU zone, a 20-import GIC stall check, host mounts through virtio-fs, and the protect fork and snapshot e2e suites.de78ff894. The current tip differs from it only in the fuzz target, the removed borrow, the clippyallowand therustlsversion. On the current tip,cargo auditpassed, CI clippy passed for aarch64 (kvm) and for the x86_64 steps fromkvm,sev_snpto the end of the job, and a fuzzhttp_apicheck passed on amd64.edera/vNN.xbranch tips, so that run comes after this merge. protect pins no v54 image yet, so a fix that the run needs goes toedera/v54.xin a new PR.Generated with Claude Code