]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio-pci: alloc only resources actually used.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 24 Jun 2015 05:54:15 +0000 (07:54 +0200)
committerJim Quigley <Jim.Quigley@oracle.com>
Tue, 7 Nov 2017 16:14:49 +0000 (11:14 -0500)
commit8df4b256cd64ea98806e87867d2423b1f0e33d2b
tree7ecd31d297b7ed35d15bfc65c9a0d5b3dcc13efc
parent9d749c2c85002cc69734a003422c2bbe7b1e836d
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>
(cherry picked from commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee)

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Jim Quigley <Jim.Quigley@oracle.com>
Orabug: 27054871

Conflicts:
drivers/virtio/virtio_pci_legacy.c

This was a minor contextual change introduced because upstream
applied the following patches in the order :-

vring: Use the DMA API on Xen (Andy Lutomirski)  [Orabug: 26388044]
virtio_pci: Use the DMA API if enabled (Andy Lutomirski)  [Orabug: 26388044]
virtio_mmio: Use the DMA API if enabled (Andy Lutomirski)  [Orabug: 26388044]
virtio: Add improved queue allocation API (Andy Lutomirski)  [Orabug: 26388044]
virtio_ring: Support DMA APIs (Andy Lutomirski)  [Orabug: 26388044]
vring: Introduce vring_use_dma_api() (Andy Lutomirski) Orabug: 26388044]
virtio-pci: alloc only resources actually used.

and we are now applying them as :-

virtio-pci: alloc only resources actually used.
vring: Use the DMA API on Xen (Andy Lutomirski)  [Orabug: 26388044]
virtio_pci: Use the DMA API if enabled (Andy Lutomirski)  [Orabug: 26388044]
....
drivers/virtio/virtio_pci_common.c
drivers/virtio/virtio_pci_common.h
drivers/virtio/virtio_pci_legacy.c
drivers/virtio/virtio_pci_modern.c