Database Reference
In-Depth Information
A trap occurs
Dispatcher
Privileged
instruction
ese instructions desire to
change machine resources
(e.g., load relocation bounds
register)
Interpreter
routine 1
Privileged
instruction
Privileged
instruction
Interpreter
routine 2
Privileged
instruction
Allocator
ese instructions do not
change machine resources
but access privileged resources
(e.g., IN, OUT, Write TLB)
Interpreter
routine n
FIGURE 16.14 Demonstrating a trap to a hypervisor. The hypervisor includes three main
components, the dispatcher, the allocator, and the interpreter routines.
back to the guest software at the instruction that comes immediately after the one
that caused the trap.
16.6.2 F ull v irtualization anD P aravirtualization
A problem arises when an instruction that is sensitive but unprivileged is issued
by a process running on a VM in user mode. According to Popek and Goldberg
[48], sensitive instructions have to trap to the hypervisor if executed in user mode.
However, as explained earlier, sensitive instructions can be privileged (e.g., LPSW)
and unprivileged (e.g., POPF). Unprivileged instructions do not trap to the hypervi-
sor. Instructions that are sensitive and unprivileged are called critical (see Figure
16.13b). ISAs that contain critical instructions do not satisfy Popek and Goldberg's
theorem. The challenge becomes, can a hypervisor be constructed in the presence of
critical instructions? The answer is yes. Nonetheless, Smith and Nair [55] distinguish
between a hypervisor that complies with Popek and Goldberg's theorem and one that
does not, by referring to the former as a true or efficient hypervisor and to the latter
simply as a hypervisor.
A hypervisor can be typically constructed using full virtualization and/or para-
virtualization . Full virtualization emulates all instructions in the ISA. Emulation
degrades performance as it implies reproducing the behavior of every source instruc-
tion, by first translating it to a target instruction and then running it on a target ISA
(we describe emulation in the next section). Paravirtualization deals with critical
instructions by modifying guest OSs. Specifically, it entails rewriting every critical
instruction as a hypercall that traps to the hypervisor. As such, paravirtualization
Search WWH ::




Custom Search