So control transfer in a fully virtualized
setting happens implicitly from the guest to
the hypervisor. How? When the guest operating
system executes any privileged instruction. Because it
thinks it can do it, it'll result in a trap and hypervisor will catch it.
And then do the appropriate thing. That's how control is transferred from the
guest to the hypervisor implicitly. And in
the other direction, control transfer happens as
we already mentioned, via software interrupts or
events, from the hypervisor to the guest. In
a para virtualized setting, the control transfer.
Happen explicitly via hypercalls from the guest into
the hypervisor. I gave the you the example of page table updates that the guest
operating system may want to communicate to
the hypervisor through the API calls. When it
executes the API call corresponding to that, that
results in control transfer from the guest into
the hypervisor. And similar to the full
virtualization case In para virtualization, in the other
direction, that is, going from the hypervisor to
the guest, it is done through software interrupts.
So that's how control transfer is handled
in both the fully virtualized and paravirtualized
environments. The additional facility that you have
in a paravirtualized environment Is the fact that,
the guest has control, via hypercalls on
when event notifications need to be delivered, in
the case of full virtualization, since the
operating system is unaware of the existence of
the hypervisor, events are going to be delivered
as and when they occur, by the hypervisor
to the guest. But in a para virtualization
[INAUDIBLE]. The guest, via hypercalls, can indicate to the
hypervisor that leave me alone don't send me
any event notifications now or it can say
now is a good time to send me
event notifications. So that level of control exists in
a paravirtualized environment, which doesn't exist in a
full virtualized environment. So this is sort of
similar to an operating system disabling interrupts. That's
exactly the same facility that's available in a
para virtualized environment at the granularity of the
operating system. The operating system can say that
I don't want any event notifications. I'll come
ask you when I need some event notifications.