[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] virtio: Introduce virtio-testdev
From: |
Andrew Jones |
Subject: |
Re: [Qemu-devel] [PATCH v3] virtio: Introduce virtio-testdev |
Date: |
Thu, 30 Jan 2014 13:56:52 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jan 30, 2014 at 07:44:59AM -0500, Mike Day wrote:
>
> Andrew Jones <address@hidden> writes:
>
> > This is a virtio version of hw/misc/debugexit and should evolve into a
> > virtio version of pc-testdev. pc-testdev uses the PC's ISA bus, whereas
> > this testdev can be plugged into a virtio-mmio transport, which is
> > needed for kvm-unit-tests/arm. virtio-testdev uses the virtio device
> > config space as a communication channel, and implements an RTAS-like
> > protocol through it allowing guests to execute commands. Only three
> > commands are currently implemented;
> > 1) VERSION: for version compatibility checks
> > 2) CLEAR: set all the config space back to zero
> > 3) EXIT: exit() from qemu with a status code
>
> > +static uint32_t virtio_testdev_get_features(VirtIODevice *vdev, uint32_t f)
> > +{
> > + return f;
> > +}
> > +
>
> Is this meant to be a stub currently?
>
Something like that. *_get_features() must be supplied by all virtio
devices. Just returning the requested features, f, rather than zero,
is how virtio-rng does it. So I went that way too.
drew