virtio-pci: alloc only resources actually used.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 24 Jun 2015 05:54:15 +0000 (07:54 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 24 Jun 2015 06:15:09 +0000 (08:15 +0200)
commit59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee
tree37e2f1dba713b5d1b835d05b3acf8d560678abbe
parent8b8e658b16336f0f50aba733f51db636ef121f50
virtio-pci: alloc only resources actually used.

Move resource allocation from common code to legacy and modern code.
Only request resources actually used, i.e. bar0 in legacy mode and
the bar(s) specified by capabilities in modern mode.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_pci_common.c
drivers/virtio/virtio_pci_common.h
drivers/virtio/virtio_pci_legacy.c
drivers/virtio/virtio_pci_modern.c