That's what Xen does (I'm not sure about the timer, but they do avoid
unnecessary interrupts). As you can have memory shared between the
guest and host, it's quite simple:
0. host puts data in ring
1. host sets interrupt timer
2. guest wakes up for unrelated reasons
3. guest sees data in ring, consumes it, and bumps the consumer pointer
4. timer fires, host sees consumer == producer, no need to issue interrupt
They have that code abstracted out and reusable by multiple drivers.
--
error compiling committee.c: too many arguments to function
-