#include "virtio_pci_common.h"
static bool force_legacy = …;
#if IS_ENABLED(CONFIG_VIRTIO_PCI_LEGACY)
module_param(force_legacy, bool, 0444);
MODULE_PARM_DESC(…) …;
#endif
void vp_synchronize_vectors(struct virtio_device *vdev)
{ … }
bool vp_notify(struct virtqueue *vq)
{ … }
static void vp_vring_slow_path_interrupt(int irq,
struct virtio_pci_device *vp_dev)
{ … }
static irqreturn_t vp_config_changed(int irq, void *opaque)
{ … }
static irqreturn_t vp_vring_interrupt(int irq, void *opaque)
{ … }
static irqreturn_t vp_interrupt(int irq, void *opaque)
{ … }
static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
bool per_vq_vectors, struct irq_affinity *desc)
{ … }
static bool vp_is_slow_path_vector(u16 msix_vec)
{ … }
static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned int index,
void (*callback)(struct virtqueue *vq),
const char *name,
bool ctx,
u16 msix_vec,
struct virtio_pci_vq_info **p_info)
{ … }
static void vp_del_vq(struct virtqueue *vq)
{ … }
void vp_del_vqs(struct virtio_device *vdev)
{ … }
enum vp_vq_vector_policy { … };
static struct virtqueue *
vp_find_one_vq_msix(struct virtio_device *vdev, int queue_idx,
vq_callback_t *callback, const char *name, bool ctx,
bool slow_path, int *allocated_vectors,
enum vp_vq_vector_policy vector_policy,
struct virtio_pci_vq_info **p_info)
{ … }
static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned int nvqs,
struct virtqueue *vqs[],
struct virtqueue_info vqs_info[],
enum vp_vq_vector_policy vector_policy,
struct irq_affinity *desc)
{ … }
static int vp_find_vqs_intx(struct virtio_device *vdev, unsigned int nvqs,
struct virtqueue *vqs[],
struct virtqueue_info vqs_info[])
{ … }
int vp_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
struct virtqueue *vqs[], struct virtqueue_info vqs_info[],
struct irq_affinity *desc)
{ … }
const char *vp_bus_name(struct virtio_device *vdev)
{ … }
int vp_set_vq_affinity(struct virtqueue *vq, const struct cpumask *cpu_mask)
{ … }
const struct cpumask *vp_get_vq_affinity(struct virtio_device *vdev, int index)
{ … }
#ifdef CONFIG_PM_SLEEP
static int virtio_pci_freeze(struct device *dev)
{ … }
static int virtio_pci_restore(struct device *dev)
{ … }
static bool vp_supports_pm_no_reset(struct device *dev)
{ … }
static int virtio_pci_suspend(struct device *dev)
{ … }
static int virtio_pci_resume(struct device *dev)
{ … }
static const struct dev_pm_ops virtio_pci_pm_ops = …;
#endif
static const struct pci_device_id virtio_pci_id_table[] = …;
MODULE_DEVICE_TABLE(pci, virtio_pci_id_table);
static void virtio_pci_release_dev(struct device *_d)
{ … }
static int virtio_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
{ … }
static void virtio_pci_remove(struct pci_dev *pci_dev)
{ … }
static int virtio_pci_sriov_configure(struct pci_dev *pci_dev, int num_vfs)
{ … }
static struct pci_driver virtio_pci_driver = …;
struct virtio_device *virtio_pci_vf_get_pf_dev(struct pci_dev *pdev)
{ … }
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;