Due 1/27/2012 [start of section]
Virtualization uses a hypervisor running in privileged mode to create a virtual machine that runs in unprivileged mode. Then, unmodified guest operating systems can run in the virtual machine. The hypervisor can provide the illusion that each guest operating system is running on its own machine in privileged mode.
Early versions of the x86 architecture (pre-2006) were not completely virtualizable -- these system could not guarantee to run unmodified guest operating systems properly. One problem was the popf ``pop flags'' instruction. When popf was run in privileged mode, it could change both the ALU flags (e.g., ZF) and the systems flags (e.g., IF, which controls interrupt delivery), and when popf was run in unprivileged mode, it could change just the ALU flags.
(a) Why do instructions like popf prevent transparent virtualization of the (old) x86 architecture?
(b) How would you change the x86 hardware to fix this problem?
Anderson and Dahlin OSPP Chapter: 4 Problem: 10
Anderson and Dahlin OSPP Chapter: 4 Problem: 11