Re: [Qemu-devel] [PATCH v2 RFC] virtio-pci: fix LE host/BE guest capacity for blk

2013-06-13 Thread Alexander Graf
On 28.05.2013, at 12:18, Michael S. Tsirkin wrote: > When a BE guest reads capacity from an LE host virtio-blk device or vice > versa, it will get the dwords of the qword field swapped. > As virtio-blk is the only one with such a quirk, > and as non-pci transports don't do byte-swaps at all, > so

[Qemu-devel] [PATCH v2 RFC] virtio-pci: fix LE host/BE guest capacity for blk

2013-05-28 Thread Michael S. Tsirkin
When a BE guest reads capacity from an LE host virtio-blk device or vice versa, it will get the dwords of the qword field swapped. As virtio-blk is the only one with such a quirk, and as non-pci transports don't do byte-swaps at all, solve this with a bit of device-specific hackery in virtio-pci.