irqfd = container_of(work, struct hsm_irqfd, shutdown);
vm = irqfd->vm;
mutex_lock(&vm->irqfds_lock); if (!list_empty(&irqfd->list))
hsm_irqfd_shutdown(irqfd);
mutex_unlock(&vm->irqfds_lock);
}
/* Called with wqh->lock held and interrupts disabled */ staticint hsm_irqfd_wakeup(wait_queue_entry_t *wait, unsignedint mode, int sync, void *key)
{ unsignedlong poll_bits = (unsignedlong)key; struct hsm_irqfd *irqfd; struct acrn_vm *vm;
irqfd = container_of(wait, struct hsm_irqfd, wait);
vm = irqfd->vm; if (poll_bits & POLLIN) /* An event has been signaled, inject an interrupt */
acrn_irqfd_inject(irqfd);
if (poll_bits & POLLHUP) /* Do shutdown work in thread to hold wqh->lock */
queue_work(vm->irqfd_wq, &irqfd->shutdown);
/* * 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.
*/ staticint acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)
{ struct eventfd_ctx *eventfd = NULL; struct hsm_irqfd *irqfd, *tmp;
__poll_t events; int ret = 0;
irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL); if (!irqfd) return -ENOMEM;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.