#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kthread.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <asm/acrn.h>
#include "acrn_drv.h"
static void ioreq_pause(void);
static void ioreq_resume(void);
static void ioreq_dispatcher(struct work_struct *work);
static struct workqueue_struct *ioreq_wq;
static DECLARE_WORK(ioreq_work, ioreq_dispatcher);
static inline bool has_pending_request(struct acrn_ioreq_client *client)
{ … }
static inline bool is_destroying(struct acrn_ioreq_client *client)
{ … }
static int ioreq_complete_request(struct acrn_vm *vm, u16 vcpu,
struct acrn_io_request *acrn_req)
{ … }
static int acrn_ioreq_complete_request(struct acrn_ioreq_client *client,
u16 vcpu,
struct acrn_io_request *acrn_req)
{ … }
int acrn_ioreq_request_default_complete(struct acrn_vm *vm, u16 vcpu)
{ … }
int acrn_ioreq_range_add(struct acrn_ioreq_client *client,
u32 type, u64 start, u64 end)
{ … }
void acrn_ioreq_range_del(struct acrn_ioreq_client *client,
u32 type, u64 start, u64 end)
{ … }
static int ioreq_task(void *data)
{ … }
void acrn_ioreq_request_clear(struct acrn_vm *vm)
{ … }
int acrn_ioreq_client_wait(struct acrn_ioreq_client *client)
{ … }
static bool is_cfg_addr(struct acrn_io_request *req)
{ … }
static bool is_cfg_data(struct acrn_io_request *req)
{ … }
#define PCI_LOWREG_MASK …
#define PCI_HIGHREG_MASK …
#define PCI_FUNCMAX …
#define PCI_SLOTMAX …
#define PCI_BUSMAX …
#define CONF1_ENABLE …
static bool handle_cf8cfc(struct acrn_vm *vm,
struct acrn_io_request *req, u16 vcpu)
{ … }
static bool acrn_in_range(struct acrn_ioreq_range *range,
struct acrn_io_request *req)
{ … }
static struct acrn_ioreq_client *find_ioreq_client(struct acrn_vm *vm,
struct acrn_io_request *req)
{ … }
struct acrn_ioreq_client *acrn_ioreq_client_create(struct acrn_vm *vm,
ioreq_handler_t handler,
void *priv, bool is_default,
const char *name)
{ … }
void acrn_ioreq_client_destroy(struct acrn_ioreq_client *client)
{ … }
static int acrn_ioreq_dispatch(struct acrn_vm *vm)
{ … }
static void ioreq_dispatcher(struct work_struct *work)
{ … }
static void ioreq_intr_handler(void)
{ … }
static void ioreq_pause(void)
{ … }
static void ioreq_resume(void)
{ … }
int acrn_ioreq_intr_setup(void)
{ … }
void acrn_ioreq_intr_remove(void)
{ … }
int acrn_ioreq_init(struct acrn_vm *vm, u64 buf_vma)
{ … }
void acrn_ioreq_deinit(struct acrn_vm *vm)
{ … }