linux/drivers/vdpa/virtio_pci/vp_vdpa.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * vDPA bridge driver for modern virtio-pci device
 *
 * Copyright (c) 2020, Red Hat Inc. All rights reserved.
 * Author: Jason Wang <[email protected]>
 *
 * Based on virtio_pci_modern.c.
 */

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/vdpa.h>
#include <linux/virtio.h>
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_pci.h>
#include <linux/virtio_pci_modern.h>
#include <uapi/linux/vdpa.h>

#define VP_VDPA_QUEUE_MAX
#define VP_VDPA_DRIVER_NAME
#define VP_VDPA_NAME_SIZE

struct vp_vring {};

struct vp_vdpa {};

struct vp_vdpa_mgmtdev {};

static struct vp_vdpa *vdpa_to_vp(struct vdpa_device *vdpa)
{}

static struct virtio_pci_modern_device *vdpa_to_mdev(struct vdpa_device *vdpa)
{}

static struct virtio_pci_modern_device *vp_vdpa_to_mdev(struct vp_vdpa *vp_vdpa)
{}

static u64 vp_vdpa_get_device_features(struct vdpa_device *vdpa)
{}

static int vp_vdpa_set_driver_features(struct vdpa_device *vdpa, u64 features)
{}

static u64 vp_vdpa_get_driver_features(struct vdpa_device *vdpa)
{}

static u8 vp_vdpa_get_status(struct vdpa_device *vdpa)
{}

static int vp_vdpa_get_vq_irq(struct vdpa_device *vdpa, u16 idx)
{}

static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
{}

static irqreturn_t vp_vdpa_vq_handler(int irq, void *arg)
{}

static irqreturn_t vp_vdpa_config_handler(int irq, void *arg)
{}

static int vp_vdpa_request_irq(struct vp_vdpa *vp_vdpa)
{}

static void vp_vdpa_set_status(struct vdpa_device *vdpa, u8 status)
{}

static int vp_vdpa_reset(struct vdpa_device *vdpa)
{}

static u16 vp_vdpa_get_vq_num_max(struct vdpa_device *vdpa)
{}

static int vp_vdpa_get_vq_state(struct vdpa_device *vdpa, u16 qid,
				struct vdpa_vq_state *state)
{}

static int vp_vdpa_set_vq_state_split(struct vdpa_device *vdpa,
				      const struct vdpa_vq_state *state)
{}

static int vp_vdpa_set_vq_state_packed(struct vdpa_device *vdpa,
				       const struct vdpa_vq_state *state)
{}

static int vp_vdpa_set_vq_state(struct vdpa_device *vdpa, u16 qid,
				const struct vdpa_vq_state *state)
{}

static void vp_vdpa_set_vq_cb(struct vdpa_device *vdpa, u16 qid,
			      struct vdpa_callback *cb)
{}

static void vp_vdpa_set_vq_ready(struct vdpa_device *vdpa,
				 u16 qid, bool ready)
{}

static bool vp_vdpa_get_vq_ready(struct vdpa_device *vdpa, u16 qid)
{}

static void vp_vdpa_set_vq_num(struct vdpa_device *vdpa, u16 qid,
			       u32 num)
{}

static u16 vp_vdpa_get_vq_size(struct vdpa_device *vdpa, u16 qid)
{}

static int vp_vdpa_set_vq_address(struct vdpa_device *vdpa, u16 qid,
				  u64 desc_area, u64 driver_area,
				  u64 device_area)
{}

static void vp_vdpa_kick_vq(struct vdpa_device *vdpa, u16 qid)
{}

static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
{}

static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
{}

static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
{}

static u32 vp_vdpa_get_vq_align(struct vdpa_device *vdpa)
{}

static size_t vp_vdpa_get_config_size(struct vdpa_device *vdpa)
{}

static void vp_vdpa_get_config(struct vdpa_device *vdpa,
			       unsigned int offset,
			       void *buf, unsigned int len)
{}

static void vp_vdpa_set_config(struct vdpa_device *vdpa,
			       unsigned int offset, const void *buf,
			       unsigned int len)
{}

static void vp_vdpa_set_config_cb(struct vdpa_device *vdpa,
				  struct vdpa_callback *cb)
{}

static struct vdpa_notification_area
vp_vdpa_get_vq_notification(struct vdpa_device *vdpa, u16 qid)
{}

static const struct vdpa_config_ops vp_vdpa_ops =;

static void vp_vdpa_free_irq_vectors(void *data)
{}

static int vp_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
			   const struct vdpa_dev_set_config *add_config)
{}

static void vp_vdpa_dev_del(struct vdpa_mgmt_dev *v_mdev,
			    struct vdpa_device *dev)
{}

static const struct vdpa_mgmtdev_ops vp_vdpa_mdev_ops =;

static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void vp_vdpa_remove(struct pci_dev *pdev)
{}

static struct pci_driver vp_vdpa_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();