cloud-hypervisor/virtio-devices
Davíð Steinn Geirsson 480bfb7095 virtio-devices: balloon: add statistics virtqueue support
Implement the virtio balloon statistics virtqueue per the VIRTIO spec,
exposing guest memory statistics through a new /vm.balloon-statistics
API endpoint.

Device layer: add stats virtqueue constants and types, wire up the
stats queue in the balloon handler, implement stats request/response
handlers, and expose a public request_balloon_statistics function.

VMM layer: plumb statistics through device manager, VM, and VMM,
add HTTP and D-Bus API endpoints, add ServiceUnavailable (503) to
api_client, add balloon-statistics subcommand to ch-remote, and add
the endpoint to the OpenAPI spec.

The response includes both guest-reported stats and host-known values
(balloon_actual_bytes, balloon_target_bytes, balloon_total_ram_bytes)
so consumers can understand balloon utilization without querying
/vm.info separately.

Also fixes pre-existing rustfmt issues and adds clippy+rustfmt to the
flake devShell.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:05:19 +00:00
..
src virtio-devices: balloon: add statistics virtqueue support 2026-03-22 10:05:19 +00:00
build.rs build: Add "fuzzing" as a valid cfg(..) attribute 2024-05-08 08:10:28 +00:00
Cargo.toml misc: improve developer experience of cargo clippy 2025-11-17 16:59:49 +00:00