os virtual machine
After taking a glance at QEMU, I decide to review this lecture to gain more understandings of virtual machine.
what and why¶
- Virtual machine: simulation of a computer
- Why: we want run lots of guest service in one physical machine
Trap and emulate¶
procedure¶
Page table¶
Shadow page table in VMM
Problem: It can’t be allowed that guest pgtbl satp escapes and modifies host pgtbl
To prevent guest escaping from VMM, guest can’t run in host supervisor mode. VMM will modify virtual state to provide illusions for guests.
device¶
- emulation: trap and emulate
- Virtual device: device interface is designed to decrease trap times, which saves houndreds of CPU cycles
- Pass-through: NIC