Re: [PATCH v3] virtio: Add platform bus driver for memory mapped virtio device

From: Rusty Russell
Date: Tue Oct 18 2011 - 23:05:19 EST


On Tue, 18 Oct 2011 10:44:35 +0100, Pawel Moll <pawel.moll@xxxxxxx> wrote:
> > or actually specify it as
> > the power of 2 to use, (ie. valid values are 1 through 16, with 12 being
> > the value that virtio PCI would use).
> >
> > Otherwise you have to do a divide on the qemu side.
>
> Oh, really? My host-side implementation is just doing that:
>
> addr += align - 1;
> addr &= ~(align - 1);

OK, so you're assuming power of 2. Make sure you kill the guest or at
least the device if it's not though.

> \item The dynamic configuration changes, as described in p. 2.4.3
> ``Dealing With Configuration Changes'' are not permitted.

This means some devices simply won't work, at least in theory. Why
don't you support this?

Thanks!
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/