mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-06 21:51:49 +00:00
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@gmail.com> Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
+1
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user