palacios_spinlock_lock_irqsave(&(dev->lock),f);
+
+ // register ourselves on the user wait queue
+ poll_wait(filp, &(dev->user_wait_queue), poll_tb);
+
if (dev->waiting) {
// Yes, we have a request if you want it!
palacios_spinlock_unlock_irqrestore(&(dev->lock),f);
// No request yet, so we need to wait for one to show up.
- // register ourselves on the user wait queue
- poll_wait(filp, &(dev->user_wait_queue), poll_tb);
-
palacios_spinlock_unlock_irqrestore(&(dev->lock),f);
DEEP_DEBUG_PRINT("palacios: hostdev: poll delayed\n");
}
+static int host_dev_deinit(void) {
+ // nothing to do
+ return 0;
+}
+
static int host_dev_guest_init(struct v3_guest * guest, void ** vm_data ) {
struct palacios_host_dev * host_dev = palacios_alloc(sizeof(struct palacios_host_dev));
static struct linux_ext host_dev_ext = {
.name = "HOST_DEVICE_INTERFACE",
.init = host_dev_init,
- .deinit = NULL,
+ .deinit = host_dev_deinit,
.guest_init = host_dev_guest_init,
.guest_deinit = host_dev_guest_deinit
};