]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_pci_modern: reduce number of mappings
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 14 Jan 2015 16:50:55 +0000 (18:50 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 21 Jan 2015 05:58:55 +0000 (16:28 +1030)
commit4b962923c7d33e7cff48bb0496e0b2e4918bcf3e
treef916c7f35438e2213640c3db90bac2caa4e31adc
parentff33d5fb1d2305564e5a75b6f894f317d601782f
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 <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_pci_common.h
drivers/virtio/virtio_pci_modern.c