summaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_pci_common.h
Commit message (Collapse)AuthorAgeFilesLines
* virtio-pci: alloc only resources actually used.Gerd Hoffmann2015-06-241-0/+2
| | | | | | | | | | 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>
* virtio_pci: add an option to disable legacy driverMichael S. Tsirkin2015-01-211-0/+10
| | | | | | | | | Useful for testing device virtio 1 compatibility. Based on patch by Rusty - couldn't resist putting that flying car joke in there! Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_pci_modern: reduce number of mappingsMichael S. Tsirkin2015-01-211-0/+3
| | | | | | | | | | | 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>
* virtio_pci: modern driverMichael S. Tsirkin2015-01-211-3/+22
| | | | | | | | | | | | | | | | Lightly tested against qemu. One thing *not* implemented here is separate mappings for descriptor/avail/used rings. That's nice to have, will be done later after we have core support. This also exposes the PCI layout to userspace, and adds macros for PCI layout offsets: QEMU wants it, so why not? Trust, but verify. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio_pci: move probe/remove code to commonMichael S. Tsirkin2015-01-211-3/+2
| | | | | | | | Most of initialization is device-independent. Let's move it to common. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_pci: device-specific release callbackMichael S. Tsirkin2015-01-061-1/+0
| | | | | | | | | It turns out we need to add device-specific code in release callback. Move it to virtio_pci_legacy.c. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio_pci: move probe to common fileMichael S. Tsirkin2014-12-141-3/+3
| | | | | | It turns out this make everything easier. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACYMichael S. Tsirkin2014-12-111-1/+0
| | | | | | | Legacy drivers use virtio_pci_common.h too, we should not define VIRTIO_PCI_NO_LEGACY there. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio_pci: rename virtio_pci -> virtio_pci_commonMichael S. Tsirkin2014-12-091-0/+136
kbuild does not seem to like it when we name source files same as the module. Let's rename virtio_pci -> virtio_pci_common, and get rid of #include-ing c files. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud