From: Anatol Belski <anbelski@linux.microsoft.com>
To: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC] virtio-villain: Guest fault injection for VMM robustness
Date: Sat, 11 Jul 2026 00:27:08 +0200 [thread overview]
Message-ID: <7f7d22fc2ddfa25d9f10ee928dfef302eabde6d4.camel@linux.microsoft.com> (raw)
In-Reply-To: <alDrJiFzJsf04RFT@fedora>
Hi Matias,
On Fri, 2026-07-10 at 14:52 +0200, Matias Ezequiel Vara Larsen wrote:
>
> Thanks for sharing it. I am also interesting on finding violations of
> the virtio specification. I presented something two years ago in LPC
> (see https://lpc.events/event/18/contributions/1897/). As a result of
> that work, we worked adding kani proofs in rust-vmm devices. The
> validation of the spec is coded in RUST and by using kani we verify
> that
> the implemented devices follows the specification. For some
> requirements, we were able to prove that the device is conform. The
> proofs are written together with the implementation of the device
> like
> tests.
Thanks for the pointer. The virtio-sound case is a good example of why
this matters. The driver was exposing buffers back into the avail ring
while still owned by the device, and nothing caught it until it was
traced by hand.
The work you describe verifies that the rust-vmm device implementations
follow the spec both through formal proofs and runtime observation.
virtio-villain comes at it from the other end by acting as a
deliberately broken guest driver against any VMM and checking whether
the device handles the violation gracefully. Different sides of the
same medal.
>
> Feel free to file patches to the virtio specification in cases you
> think
> the spec is too permissive.
That would be worth doing. Several of the divergences I see between
VMMs come down to the spec being silent on what the device should do,
so tightening the normative text would help everyone.
One example is that the spec defines the descriptor addr and len fields
in virtio 1.4 section 2.7.5 but never states what the device must do
when addr plus len falls outside guest physical memory. Every VMM needs
to handle this, and Cloud Hypervisor already fixed it after the harness
surfaced the issue. A normative statement there would save each
implementation from rediscovering the same gap on its own.
>
> At some point, I wanted to add some checks in QEMU to inform user
> when
> guest violates the spec. That would help to catch some issues with
> less
> testing. For example, two years ago the virtio-sound driver was
> silently
> violating the spec by writing the content of the buffers that were
> already in the available ring.
That lines up with the discussion in your talk about placing the
observer on the device side. virtio-villain already classifies each
case as pass, reject, or wedge, so the cases where QEMU silently
tolerates a violation instead of flagging it are straightforward to
spot.
Regards
Anatol
>
prev parent reply other threads:[~2026-07-10 22:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 13:37 [RFC] virtio-villain: Guest fault injection for VMM robustness Anatol Belski
2026-07-06 8:29 ` Daniel P. Berrangé
2026-07-06 19:22 ` Anatol Belski
2026-07-07 10:39 ` Daniel P. Berrangé
2026-07-07 21:09 ` Anatol Belski
2026-07-08 8:09 ` Daniel P. Berrangé
2026-07-08 18:25 ` Anatol Belski
2026-07-09 7:17 ` Daniel P. Berrangé
2026-07-09 10:02 ` Anatol Belski
2026-07-10 12:52 ` Matias Ezequiel Vara Larsen
2026-07-10 22:27 ` Anatol Belski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f7d22fc2ddfa25d9f10ee928dfef302eabde6d4.camel@linux.microsoft.com \
--to=anbelski@linux.microsoft.com \
--cc=mvaralar@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.