linux/drivers/virt/acrn/irqfd.c

// SPDX-License-Identifier: GPL-2.0
/*
 * ACRN HSM irqfd: use eventfd objects to inject virtual interrupts
 *
 * Copyright (C) 2020 Intel Corporation. All rights reserved.
 *
 * Authors:
 *	Shuo Liu <[email protected]>
 *	Yakui Zhao <[email protected]>
 */

#include <linux/eventfd.h>
#include <linux/file.h>
#include <linux/poll.h>
#include <linux/slab.h>

#include "acrn_drv.h"

static LIST_HEAD(acrn_irqfd_clients);

/**
 * struct hsm_irqfd - Properties of HSM irqfd
 * @vm:		Associated VM pointer
 * @wait:	Entry of wait-queue
 * @shutdown:	Async shutdown work
 * @eventfd:	Associated eventfd
 * @list:	Entry within &acrn_vm.irqfds of irqfds of a VM
 * @pt:		Structure for select/poll on the associated eventfd
 * @msi:	MSI data
 */
struct hsm_irqfd {};

static void acrn_irqfd_inject(struct hsm_irqfd *irqfd)
{}

static void hsm_irqfd_shutdown(struct hsm_irqfd *irqfd)
{}

static void hsm_irqfd_shutdown_work(struct work_struct *work)
{}

/* Called with wqh->lock held and interrupts disabled */
static int hsm_irqfd_wakeup(wait_queue_entry_t *wait, unsigned int mode,
			    int sync, void *key)
{}

static void hsm_irqfd_poll_func(struct file *file, wait_queue_head_t *wqh,
				poll_table *pt)
{}

/*
 * Assign an eventfd to a VM and create a HSM irqfd associated with the
 * eventfd. The properties of the HSM irqfd are built from a &struct
 * acrn_irqfd.
 */
static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)
{}

static int acrn_irqfd_deassign(struct acrn_vm *vm,
			       struct acrn_irqfd *args)
{}

int acrn_irqfd_config(struct acrn_vm *vm, struct acrn_irqfd *args)
{}

int acrn_irqfd_init(struct acrn_vm *vm)
{}

void acrn_irqfd_deinit(struct acrn_vm *vm)
{}