Commit-ID: f84fdc806056a72bc99266f0b81f4604dfba9576 Gitweb: http://git.kernel.org/tip/f84fdc806056a72bc99266f0b81f4604dfba9576 Author: Matt Evans <matt@xxxxxxxxxx> AuthorDate: Tue, 6 Dec 2011 14:42:29 +1100 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Tue, 6 Dec 2011 13:38:35 +0200 kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM The field size is currently wrong, read into a 32bit word instead of 16. This casues trouble when BE. Acked-by: Asias He <asias.hejun@xxxxxxxxx> Signed-off-by: Matt Evans <matt@xxxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/virtio/pci.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c index 3d9a7f8..d9fc3a5 100644 --- a/tools/kvm/virtio/pci.c +++ b/tools/kvm/virtio/pci.c @@ -115,8 +115,7 @@ static bool virtio_pci__io_in(struct ioport *ioport, struct kvm *kvm, u16 port, break; case VIRTIO_PCI_QUEUE_NUM: val = vtrans->virtio_ops->get_size_vq(kvm, vpci->dev, vpci->queue_selector); - ioport__write32(data, val); - break; + ioport__write16(data, val); break; case VIRTIO_PCI_STATUS: ioport__write8(data, vpci->status); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html