On Fri, Dec 14, 2012 at 9:48 AM, Lukas Humbel <
lukas....@gmail.com> wrote:
> Hi Peter
>
> Thanks for your reply. I agree, the interface can't get much smaller. Just
> some brainstorming from my side: I wasn't thinking about a smaller interface
> but more an alternative, maybe providing an additional hook which calls one
> specific (small) function which does all the privileged operations. A user
> space implementation could set up a hook which performs a syscall and
> executes the function in kernel space, while in the monolithic case, the
> hook would just directly point to the function.
>
True.
> Apart from executing the VM directly I dont see what else is needed to be
> run in kernel space, page tables can be manipulated in user space as long as
> they are mapped somewhere, interrupts can be routed to userspace (of course,
> the OS has to support this, but there is no change needed to palacios).
>
> Is the interrupt reception used for something else than receiving IPI (if we
> ignore device pass through for now)? If so, then using a messaging
> primitive from the OS should be sufficient and no new kernel routine is
> needed.
>
Ignoring passthrough, the interrupt model has two things that I think
would require careful design and thought in a microkernel model.
First, the VM execution loop disables interrupts on the physical core
and sets interrupt exiting on the underlying machine. This means that
from just before an entry to sometime after exit, the core is running
with interrupts disabled. When an interrupt occurs, the hardware
exits and returns control to us. We then have the first chance to
respond to the interrupt. In the normal case, we just turn interrupts
back on and the interrupt is dispatched in the normal way for the host
OS. In essence, we can delay interrupts. The second thing to note
is that we use IPIs to make it possible to force an exit on a
particular core. More generally, the host must expose some mechanism
that allows us to force the hardware to do an exit on a remote core.
--
Dr. Peter A. Dinda
Professor
Head, Computer Engineering and Systems Division
Department of Electrical Engineering and Computer Science
Northwestern University
2145 Sheridan Avenue
Evanston, IL 60208
847-467-7859 (voice)
http://www.eecs.northwestern.edu/~pdinda
pdi...@northwestern.edu