google / alioth

Experimental KVM-based type-2 hypervisor in Rust implemented from scratch.
Apache License 2.0
164 stars 10 forks source link

fix(virtio): prevent MSI-X change if irqfd linked #33

Closed Lencerf closed 6 months ago

Lencerf commented 6 months ago

If the MSI-X table entry 0 is mapped to queue 0, and queue 0 is offloaded to a vhost backend, and later the guest maps table entry 1 to queue 0, we will need to find out the iqrfd of table entry 1, and send a message to the vhost backend to update the irqfd. This is much more complicated than just updating table entry 0, which only involves updating the GSI table at the VMM side.

For now we simply prevent such changes if a queue is already mapped to an MSI-X entry that is linked to an irqfd.