aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_pci_common.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-21virtio_pci: add module param to force legacy modeMichael S. Tsirkin1-4/+21
If set, try legacy interface first, modern one if that fails. Useful to work around device/driver bugs, and for compatibility testing. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-01-21virtio_pci: modern driverMichael S. Tsirkin1-3/+11
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>
2015-01-21virtio_pci: move probe/remove code to commonMichael S. Tsirkin1-2/+67
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>
2015-01-06virtio_pci: device-specific release callbackMichael S. Tsirkin1-9/+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>
2015-01-06virtio: make del_vqs idempotentMichael S. Tsirkin1-0/+1
Our code calls del_vqs multiple times, assuming it's idempotent. commit 3ec7a77bb3089bb01032fdbd958eb5c29da58b49 virtio_pci: free up vq->priv broke this assumption, by adding kfree there, so multiple calls cause double free. Fix it up. Fixes: 3ec7a77bb3089bb01032fdbd958eb5c29da58b49 Reported-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-17virtio_pci: restore module attributesHerbert Xu1-0/+5
When the virtio_pci driver was moved into virtio_pci_legacy.c the module licence and other attributes went AWOL. This patch restores them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-14virtio_pci: move probe to common fileMichael S. Tsirkin1-1/+33
It turns out this make everything easier. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-09virtio_pci: rename virtio_pci -> virtio_pci_commonMichael S. Tsirkin1-0/+464
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>