#include <linux/delay.h>
#define VIRTIO_PCI_NO_LEGACY
#define VIRTIO_RING_NO_LEGACY
#include "virtio_pci_common.h"
#define VIRTIO_AVQ_SGS_MAX …
static u64 vp_get_features(struct virtio_device *vdev)
{ … }
static int vp_avq_index(struct virtio_device *vdev, u16 *index, u16 *num)
{ … }
static bool vp_is_avq(struct virtio_device *vdev, unsigned int index)
{ … }
void vp_modern_avq_done(struct virtqueue *vq)
{ … }
static int virtqueue_exec_admin_cmd(struct virtio_pci_admin_vq *admin_vq,
u16 opcode,
struct scatterlist **sgs,
unsigned int out_num,
unsigned int in_num,
struct virtio_admin_cmd *cmd)
{ … }
int vp_modern_admin_cmd_exec(struct virtio_device *vdev,
struct virtio_admin_cmd *cmd)
{ … }
static void virtio_pci_admin_cmd_list_init(struct virtio_device *virtio_dev)
{ … }
static void vp_modern_avq_activate(struct virtio_device *vdev)
{ … }
static void vp_modern_avq_cleanup(struct virtio_device *vdev)
{ … }
static void vp_transport_features(struct virtio_device *vdev, u64 features)
{ … }
static int __vp_check_common_size_one_feature(struct virtio_device *vdev, u32 fbit,
u32 offset, const char *fname)
{ … }
#define vp_check_common_size_one_feature(vdev, fbit, field) …
static int vp_check_common_size(struct virtio_device *vdev)
{ … }
static int vp_finalize_features(struct virtio_device *vdev)
{ … }
static void vp_get(struct virtio_device *vdev, unsigned int offset,
void *buf, unsigned int len)
{ … }
static void vp_set(struct virtio_device *vdev, unsigned int offset,
const void *buf, unsigned int len)
{ … }
static u32 vp_generation(struct virtio_device *vdev)
{ … }
static u8 vp_get_status(struct virtio_device *vdev)
{ … }
static void vp_set_status(struct virtio_device *vdev, u8 status)
{ … }
static void vp_reset(struct virtio_device *vdev)
{ … }
static int vp_active_vq(struct virtqueue *vq, u16 msix_vec)
{ … }
static int vp_modern_disable_vq_and_reset(struct virtqueue *vq)
{ … }
static int vp_modern_enable_vq_after_reset(struct virtqueue *vq)
{ … }
static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector)
{ … }
static bool vp_notify_with_data(struct virtqueue *vq)
{ … }
static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
struct virtio_pci_vq_info *info,
unsigned int index,
void (*callback)(struct virtqueue *vq),
const char *name,
bool ctx,
u16 msix_vec)
{ … }
static int vp_modern_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
struct virtqueue *vqs[],
struct virtqueue_info vqs_info[],
struct irq_affinity *desc)
{ … }
static void del_vq(struct virtio_pci_vq_info *info)
{ … }
static int virtio_pci_find_shm_cap(struct pci_dev *dev, u8 required_id,
u8 *bar, u64 *offset, u64 *len)
{ … }
static bool vp_get_shm_region(struct virtio_device *vdev,
struct virtio_shm_region *region, u8 id)
{ … }
static const struct virtio_config_ops virtio_pci_config_nodev_ops = …;
static const struct virtio_config_ops virtio_pci_config_ops = …;
int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev)
{ … }
void virtio_pci_modern_remove(struct virtio_pci_device *vp_dev)
{ … }