On 07.04.25 10:44, Michael S. Tsirkin wrote:
Wow great job digging through all these hypervisors!
On Mon, Apr 07, 2025 at 10:38:59AM +0200, David Hildenbrand wrote:
crossvm:
https://github.com/google/crosvm/blob/main/devices/src/virtio/balloon.rs
-> Hard-codes queue numbers; does *not* offer/implement
VIRTIO_BALLOON_F_STATS_VQ but does offer VIRTIO_BALLOON_F_STATS_VQ
and VIRTIO_BALLOON_F_DEFLATE_ON_OOM.
-> Implements something that is not in the virtio-spec
const VIRTIO_BALLOON_F_WS_REPORTING: u32 = 8; // Working Set Reporting
virtqueues
and
const WS_DATA_VQ: usize = 5;
const WS_OP_VQ: usize = 6;
IIUC, Linux inside cross-vm might actually be problematic? They would
disagree on the virtqueue for free-page-reporting
That's why things must be tied to negotiated features, not to offered
ones.
cross-vm also has this weird comment:
"
const VIRTIO_BALLOON_F_PAGE_REPORTING: u32 = 5; // Page reporting virtqueue
// TODO(b/273973298):
this should maybe be bit 6? to be changed later
"
Not sure why that should be bit 6, the spec says 5 ...
So maybe whatever they run inside the VM is also out of spec ... Really
hard to tell.
--
Cheers,
David / dhildenb