From 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 24 Jun 2015 07:54:15 +0200 Subject: 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 Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/virtio/virtio_pci_common.h') diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h index 28ee4e56badf..b976d968e793 100644 --- a/drivers/virtio/virtio_pci_common.h +++ b/drivers/virtio/virtio_pci_common.h @@ -75,6 +75,8 @@ struct virtio_pci_device { /* Multiply queue_notify_off by this value. (non-legacy mode). */ u32 notify_offset_multiplier; + int modern_bars; + /* Legacy only field */ /* the IO mapping for the PCI config space */ void __iomem *ioaddr; -- cgit v1.2.3