Hardware and Software Support for Virtualization

15 Nov 2024 | virtualization, notes, wip

修订历史

  • 2024.11.15 创建笔记
  • 2025.01.18 补充

定义

虚拟化

Virtualization is the application of the layering principle through enforced modularity, whereby the exposed virtual resource is identical to the underlying physical resource being virtualized.

虚拟化增加中间层,通过模块化保证隔离。

以 RAID 为例,RAID 作为中间层,兼容块设备接口。对上层应用(文件系统)无感知。

因此广义的虚拟化并不局限虚拟机。

虚拟化由三种方式实现:

虚拟机

A virtual machine is an abstraction of a complete compute environment through the com bined virtualization of the processor, memory, and I/O components of a computer.

Hypervisor

the hypervisor is a specialized piece of system software that manages and runs virtual machines.

hypervisor 在虚拟机之间对物理资源进行分配和调度,在计算机上应用分层原则,确保:

Type-1 and Type-2 Hypervisors

hypervisors 继续分类:

A SKETCH HYPERVISOR: MULTIPLEXING AND EMULATION

书里 hypervisor 草图,使用三种关键虚拟化技术中的复用与模拟。

machine simulator 和 hypervisor 之间的主要区别在于,前者模拟虚拟机的 isa,而后者则复用 isa。cpu 复用类似操作系统调度进程,这允许虚拟 cpu 直接在真实处理器上执行指令。

当 guest os 执行特权指令会 trap,hypervisor 需要模拟 trap

NAMES FOR MEMORY

为避免名词混淆,这里定义

APPROACHES TO VIRTUALIZATION AND PARAVIRTUALIZATION

早期的虚拟化方式:

优势

The Popek/Goldberg Theorem

验证是否可以使用复用 VMM 来虚拟化给定 ISA 的理论。防止体系结构的设计方案不支持虚拟化

主要是讲论文的内容,跳过

模型

理论

RECURSIVE VIRTUALIZATION AND HYBRID VIRTUAL MACHINES

用分页代替分段

WELL-KNOWN VIOLATIONS

讨论 MIPS、x86-32、ARM 架构虚拟化的可能性:在 MIPS, X86-32 和 ARM 上无法按照 popek/Goldberg 的思路(以 trap-emulate+direct execution 的形式执行)构建VMM。

无需架构支持的虚拟化

本章介绍硬件虚拟化支持之前 VMM 是如何设计的

参考


Older · View Archive (39)

安全风控中领域特定语言的探索与实现

Newer

MySQL实战45讲