On Mon, Jan 19, 2015 at 05:04:37PM +0000, Stefan Hajnoczi wrote: > The vring.c code was written under the assumption that virtio devices > have the same endianness as the host. > > This is wrong when emulating targets that differ in endianness from the > host. > > It is also wrong when emulating bi-endian targets like POWER 8 > processors, which support both little- and big-endian at run-time. In > this case the virtio device knows which endianness to use. > > This change requires the virtio-access.h APIs and therefore builds > vring.o for each target (obj-y instead of common-obj-y). > > Note that $(CONFIG_VIRTIO) for dataplane/ was dropped in > hw/virtio/Makefile.objs because hw/Makefile.objs conditionally includes > hw/virtio/ on $(CONFIG_VIRTIO) already. > > Only a small change is needed to the vring.h interface: vring_push() now > takes a VirtIODevice *vdev argument. > > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Fam Zheng <f...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
Without this patch adding an iothread to a secondary virtio-blk disk caused the kernel to jam up during boot. With this patch it booted up and I was able to do things with the disk. I'm still not able to add an iothread to a primary virtio-blk device: SLOF (guest firmware) gets errors attempting to read the kernel to boot. However, SLOF is always big endian, so I think that's an unrelated bug. Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Tested-by: David Gibson <da...@gibson.dropbear.id.au> -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
pgpNrWlpLs0gH.pgp
Description: PGP signature