#include <linux/vmw_vmci_defs.h>
#include <linux/vmw_vmci_api.h>
#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/highmem.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/processor.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/smp.h>
#include <linux/io.h>
#include <linux/vmalloc.h>
#include "vmci_datagram.h"
#include "vmci_doorbell.h"
#include "vmci_context.h"
#include "vmci_driver.h"
#include "vmci_event.h"
#define PCI_DEVICE_ID_VMWARE_VMCI …
#define VMCI_UTIL_NUM_RESOURCES …
#define VMCI_DMA_DG_BUFFER_SIZE …
static bool vmci_disable_msi;
module_param_named(disable_msi, vmci_disable_msi, bool, 0);
MODULE_PARM_DESC(…) …;
static bool vmci_disable_msix;
module_param_named(disable_msix, vmci_disable_msix, bool, 0);
MODULE_PARM_DESC(…) …;
static u32 ctx_update_sub_id = …;
static u32 vm_context_id = …;
struct vmci_guest_device { … };
static bool use_ppn64;
bool vmci_use_ppn64(void)
{ … }
struct pci_dev *vmci_pdev;
static struct vmci_guest_device *vmci_dev_g;
static DEFINE_SPINLOCK(vmci_dev_spinlock);
static atomic_t vmci_num_guest_devices = …;
bool vmci_guest_code_active(void)
{ … }
u32 vmci_get_vm_context_id(void)
{ … }
static unsigned int vmci_read_reg(struct vmci_guest_device *dev, u32 reg)
{ … }
static void vmci_write_reg(struct vmci_guest_device *dev, u32 val, u32 reg)
{ … }
static void vmci_read_data(struct vmci_guest_device *vmci_dev,
void *dest, size_t size)
{ … }
static int vmci_write_data(struct vmci_guest_device *dev,
struct vmci_datagram *dg)
{ … }
int vmci_send_datagram(struct vmci_datagram *dg)
{ … }
EXPORT_SYMBOL_GPL(…);
static void vmci_guest_cid_update(u32 sub_id,
const struct vmci_event_data *event_data,
void *client_data)
{ … }
static int vmci_check_host_caps(struct pci_dev *pdev)
{ … }
static void vmci_dispatch_dgs(struct vmci_guest_device *vmci_dev)
{ … }
static void vmci_process_bitmap(struct vmci_guest_device *dev)
{ … }
static irqreturn_t vmci_interrupt(int irq, void *_dev)
{ … }
static irqreturn_t vmci_interrupt_bm(int irq, void *_dev)
{ … }
static irqreturn_t vmci_interrupt_dma_datagram(int irq, void *_dev)
{ … }
static void vmci_free_dg_buffers(struct vmci_guest_device *vmci_dev)
{ … }
static int vmci_guest_probe_device(struct pci_dev *pdev,
const struct pci_device_id *id)
{ … }
static void vmci_guest_remove_device(struct pci_dev *pdev)
{ … }
static const struct pci_device_id vmci_ids[] = …;
MODULE_DEVICE_TABLE(pci, vmci_ids);
static struct pci_driver vmci_guest_driver = …;
int __init vmci_guest_init(void)
{ … }
void __exit vmci_guest_exit(void)
{ … }