#include <linux/pci.h>
#include <linux/vdpa.h>
#include <uapi/linux/vdpa.h>
#include <linux/virtio_pci_modern.h>
#include <linux/pds/pds_common.h>
#include <linux/pds/pds_core_if.h>
#include <linux/pds/pds_adminq.h>
#include <linux/pds/pds_auxbus.h>
#include "vdpa_dev.h"
#include "aux_drv.h"
#include "cmds.h"
#include "debugfs.h"
static u64 pds_vdpa_get_driver_features(struct vdpa_device *vdpa_dev);
static struct pds_vdpa_device *vdpa_to_pdsv(struct vdpa_device *vdpa_dev)
{ … }
static int pds_vdpa_notify_handler(struct notifier_block *nb,
unsigned long ecode,
void *data)
{ … }
static int pds_vdpa_register_event_handler(struct pds_vdpa_device *pdsv)
{ … }
static void pds_vdpa_unregister_event_handler(struct pds_vdpa_device *pdsv)
{ … }
static int pds_vdpa_set_vq_address(struct vdpa_device *vdpa_dev, u16 qid,
u64 desc_addr, u64 driver_addr, u64 device_addr)
{ … }
static void pds_vdpa_set_vq_num(struct vdpa_device *vdpa_dev, u16 qid, u32 num)
{ … }
static void pds_vdpa_kick_vq(struct vdpa_device *vdpa_dev, u16 qid)
{ … }
static void pds_vdpa_set_vq_cb(struct vdpa_device *vdpa_dev, u16 qid,
struct vdpa_callback *cb)
{ … }
static irqreturn_t pds_vdpa_isr(int irq, void *data)
{ … }
static void pds_vdpa_release_irq(struct pds_vdpa_device *pdsv, int qid)
{ … }
static void pds_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, u16 qid, bool ready)
{ … }
static bool pds_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid)
{ … }
static int pds_vdpa_set_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
const struct vdpa_vq_state *state)
{ … }
static int pds_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
struct vdpa_vq_state *state)
{ … }
static struct vdpa_notification_area
pds_vdpa_get_vq_notification(struct vdpa_device *vdpa_dev, u16 qid)
{ … }
static int pds_vdpa_get_vq_irq(struct vdpa_device *vdpa_dev, u16 qid)
{ … }
static u32 pds_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
{ … }
static u32 pds_vdpa_get_vq_group(struct vdpa_device *vdpa_dev, u16 idx)
{ … }
static u64 pds_vdpa_get_device_features(struct vdpa_device *vdpa_dev)
{ … }
static int pds_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 features)
{ … }
static u64 pds_vdpa_get_driver_features(struct vdpa_device *vdpa_dev)
{ … }
static void pds_vdpa_set_config_cb(struct vdpa_device *vdpa_dev,
struct vdpa_callback *cb)
{ … }
static u16 pds_vdpa_get_vq_num_max(struct vdpa_device *vdpa_dev)
{ … }
static u32 pds_vdpa_get_device_id(struct vdpa_device *vdpa_dev)
{ … }
static u32 pds_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev)
{ … }
static u8 pds_vdpa_get_status(struct vdpa_device *vdpa_dev)
{ … }
static int pds_vdpa_request_irqs(struct pds_vdpa_device *pdsv)
{ … }
void pds_vdpa_release_irqs(struct pds_vdpa_device *pdsv)
{ … }
static void pds_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
{ … }
static void pds_vdpa_init_vqs_entry(struct pds_vdpa_device *pdsv, int qid,
void __iomem *notify)
{ … }
static int pds_vdpa_reset(struct vdpa_device *vdpa_dev)
{ … }
static size_t pds_vdpa_get_config_size(struct vdpa_device *vdpa_dev)
{ … }
static void pds_vdpa_get_config(struct vdpa_device *vdpa_dev,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static void pds_vdpa_set_config(struct vdpa_device *vdpa_dev,
unsigned int offset, const void *buf,
unsigned int len)
{ … }
static const struct vdpa_config_ops pds_vdpa_ops = …;
static struct virtio_device_id pds_vdpa_id_table[] = …;
static int pds_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
const struct vdpa_dev_set_config *add_config)
{ … }
static void pds_vdpa_dev_del(struct vdpa_mgmt_dev *mdev,
struct vdpa_device *vdpa_dev)
{ … }
static const struct vdpa_mgmtdev_ops pds_vdpa_mgmt_dev_ops = …;
int pds_vdpa_get_mgmt_info(struct pds_vdpa_aux *vdpa_aux)
{ … }