From 3909213cfd9224cb1827d557fb6eb5ebdb8ddcbe Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 14 Jan 2015 18:50:55 +0200 Subject: virtio_pci_modern: reduce number of mappings We don't know the # of VQs that drivers are going to use so it's hard to predict how much memory we'll need to map. However, the relevant capability does give us an upper limit. If that's below a page, we can reduce the number of required mappings by mapping it all once ahead of the time. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell --- drivers/virtio/virtio_pci_common.h | 3 +++ 1 file changed, 3 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 610c43f..d391805 100644 --- a/drivers/virtio/virtio_pci_common.h +++ b/drivers/virtio/virtio_pci_common.h @@ -62,8 +62,11 @@ struct virtio_pci_device { struct virtio_pci_common_cfg __iomem *common; /* Device-specific data (non-legacy mode) */ void __iomem *device; + /* Base of vq notifications (non-legacy mode). */ + void __iomem *notify_base; /* So we can sanity-check accesses. */ + size_t notify_len; size_t device_len; /* Capability for when we need to map notifications per-vq. */ -- cgit v1.1