virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map
commit54790d71e4adcfaae95dac3c7019b10721e609de
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Jun 2015 10:34:36 +0000 (4 12:34 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 Jun 2015 16:15:06 +0000 (10 18:15 +0200)
treec2125eaba5e9305f41e2273a237b0950df5421a3
parenta3cc2e81592aba6d818005c078b94b16ba47a02c
virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map

Also fill offset and length automatically,
from VirtIOPCIRegion->offset and region size.

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