Re: [kvm-ppc-devel] booting from virtio-blk

Benjamin Herrenschmidt
2008-04-01T20:36:39Z

On Tue, 2008-04-01 at 12:09 -0500, Anthony Liguori wrote:

> It's the unfortunate side-effect of using PCI config space without
> passing it's semantics through to the virtio devices. Right now, you do
> a config_get which is basically a memcpy. If we didn't do accesses with
> ioread8(), you could potentially have a caller than did a config_get()
> of size 4 that didn't intend on having endian conversion applied.
>
> The other option would have been to provide config_get() and
> config_get8/16/32/64() the later performing endian conversion.

Config space should be 8/16/32. Is that ever bridged to real PCI config
space anyway ? Or only virtio ? And it should be endian swapped at the
low level, either by your HV calls or by the low level kernel. Always.
That's how PCI config space is supposed to work.

Ben.