On Thu, Aug 04, 2016 at 03:57:40PM +0530, Akshay Jaggi wrote: > Hi, > > I've been working on unmap notifications for the grant table user space > device (check progress: https://reviews.freebsd.org/D7293). > > I've added and tested unmap_clear_byte notification and unmap_send_event > notification is left. > > I was implementing the unmap_send_notify on event-channel, but I am stuck. > Basically, linux grabs a reference to the event-channel port, in case it is > deallocated, so that it can still send a notify. I could not find such a > reference-grabbing mechanism for event channel in FreeBSD. What should I do > now? > Should I add notify, adding the constraint that you cannot deallocate your > reference to that port till the notify is sent (ie, after an unmap).
No, that would be quite bad because user-space applications could cause page faults in the kernel. You should look into adding reference counts to FreeBSD event channels. You probably want to add a refcount(9) to struct xenisrc that you increment/decrement in order to count references. A helper function to pick extra references to event channels should also be added to the interface exposed by xen_intr. Roger. _______________________________________________ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"