virtio-pci: use generic logic for command access
commit1129714ff43bd947740d587956a655210e8b93ed
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 27 Jul 2011 08:08:20 +0000 (27 11:08 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 27 Jul 2011 17:08:15 +0000 (27 20:08 +0300)
treeac4d0915be7f4d9f6630185dfe6e563f694f828e
parent42e4126b793d15ec40f3a84017e1d8afecda1b6d
virtio-pci: use generic logic for command access

In practice, guests don't generate config requests
that cross a word boundary, so the logic to
detect command word access is correct because
PCI_COMMAND is 0x4. But depending on this is
tricky, further, it will break with guests
that do try to generate a misaligned access
as we pass it to devices without splitting.

Better to use the generic range_covers_byte for this.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio-pci.c