Home Database Mysql Tutorial X86服务器虚拟化的三种技术(2)

X86服务器虚拟化的三种技术(2)

Jun 07, 2016 pm 03:20 PM
in x86 technology server Virtualization

在上一讲中我介绍了:Intel的VT(Virtual Technology)和AMD的AMD-V(AMD Virtualization)技术对X86架构处理器打了硬件补丁之后,X86平台在虚拟CPU与内部存储器方面变成了一个支持完全虚拟化的平台,在这方面,Citrix Xen,MS Hyper-V(在旁边的虚拟化)与V

在上一讲中我介绍了:Intel的VT(Virtual Technology)和AMD的AMD-V(AMD Virtualization)技术对X86架构处理器打了硬件补丁之后,X86平台在虚拟CPU与内部存储器方面变成了一个支持完全虚拟化的平台,在这方面,Citrix Xen,MS Hyper-V(“在旁边的虚拟化”)与VMware ESX(全虚拟化)之间的差别已不复存在。但我必须提醒:前两者与后者在虚拟输入输出设备(IO Devices)方面仍然存在着一个根本的重要的差别。本讲揭示这一差别。

与虚拟CPU和内存的情况一样,虚拟一个IO设备也是让一个虚拟机(VM)感觉到它是在独享该设备。所以IO设备虚拟化任务也是替每一个VM分别管理好所用设备的服务状态(service state)。设想当一个设备(如网卡)在某个时间片断为VM1提供了一个服务片断(读入一页网页),在下一个时间片断要转而向VM2提供服务时,此时系统就必须先记住该设备为VM1提供当前服务片断后的状态,才可以让设备转向服务于VM2。只有这样做该设备才会知道以后再回到VM1时怎样继续提供尚未完成的服务。因为每一个IO设备都完全受控于一个叫做设备驱动器的软件,所以对一个设备和一个VM之间进行状态跟踪管理也就是针对相应驱动软件的服务状态进行跟踪管理。

“在旁边的虚拟化”(Para-Virtualization, Citrix Xen与MS Hyper-V都是)采用了非常简单实用的“在旁边有驱动器”之方法:让所有的客户(guest)VM 都去使用安装在那个“管理OS”(Xen的Dom0,Hyper-V的Parent Partition)里面现成的设备驱动器。这样一来整个平台上的IO设备就可以步调一致井井有条地为每一个客户VM服务了。当一个客户VM中的OS(中自有的设备驱动器)向硬件发出IO设备使用指令时,这些指令会被trap到hypervisor里,再被转到管理OS去使用它里面相应的设备驱动器。

与这个方法不同,VMware ESX选择在hypervisor里面置入并管理平台上所有的IO设备驱动器。ESX上的管理OS(又叫做Host OS或Service Console)只负责让系统管理员来管理客户VMs,比如创立、启动客户VM,启动VMotion操作等等,而不负责虚拟任何IO驱动器。另外我们知道ESXi压根就不带有管理OS,系统管理员是通过网络进入hypervisor来管理客户VM的。

上回我还讲道:Intel和AMD在给X86架构打硬件补丁的工作还实现了统一控制平台上IO设备对内存的直接访问(Direct Memory Access, DMA)。这改变了以前机器上IO设备可以随意对主机内存进行直接访问的无政府主义危险状况。诸位不要以为只有中央处理器(CPU)才是平台上唯一的脑子可以对内存进行访问操作。CPU的确可以被看作是平台上的“大脑”,然而平台上还有诸多“小脑”们:几乎每一个现代IO设备都自身带有固件,里面装有可执行指令可对主机内存进行读写访问。在以前的X86硬件上这些小脑们对主机内存进行DMA读写操作根本不必听从大脑的指挥。幸亏在非虚拟情况下平台上只跑一个操作系统,如果某个小脑对主机内存做了错误操作,造成的破坏也许还可以容忍,因为大不了平台崩溃只不过毁掉了跑在一台机器上的应用(一定遇到过Windows的蓝屏吧!)。如今在一个虚拟化的服务器平台上跑着许多不同虚拟机和不同操作系统,无政府主义的危害就不再那么单纯无邪了。小脑的一个误操作有可能打破不同虚拟机之间的隔离,轻者造成所模拟的操作系统出错,重者导致平台上所有的虚拟机全部崩溃。最近在X86硬件上的补丁工作(Intel的 VT-d, AMD的 IOMMU)对主板进行了重新布线,将所有小脑们的IO连线都统一联到北桥上的一个硬件部件IOMMU,于是大脑就可以使用该部件,采用MMU同样的方法统一协调管理小脑们对内存的IO访问了。有了大脑统一协调管理IOMMU,小脑即使误操作也应该无法穿越不同VM之间的隔离。但是这个说法只适用于通常的非恶意系统软硬件错误情形,不适用于在计算机安全上出错的情形。在考虑安全问题时所谓错误都是恶意攻击的结果,是攻击者有意引入的。在考虑安全问题时小脑们的驱动器软件(请回忆,IO设备都是受驱动器控制的)身处于系统软件栈的哪个权限层次就是一个非常重要的问题。这些软件所处的权限层次越接近硬件层,攻击者对它们进行攻击的手段就越有限也越困难。

对于“在旁边的虚拟化”方法( Citrix Xen与MS Hyper-V),前面我们说过所有设备驱动器软件都安装在管理OS里面。这个管理OS虽然跑在一个低特权态(hypervisor之上的非内核态),却由于需要向平台上所有客户VMs提供设备驱动器服务因而必须可以操控所有这些客户VMs。于是这个处于低特权态的管理OS就自然形成了一个可以被利用来对任一客户VM进行DMA攻击的最薄弱环节。所有对一般OS有效的攻击方法(我们知道有大量这样的方法)都可以被利用来攻击这个OS中的驱动器软件,对客户VM实施DMA攻击。

而VMware ESX的情况不同:平台上所有设备驱动器都是在hypervisor中模拟得到的。我们知道hypervisor是直接跑在硬件上的,即处于最高特权态。一般攻击OS的用户态手段都不能对hypervisor产生有效攻击。另外Intel VT-d和AMD IOMMU都格外注重对hypervisor代码与数据施加保护。如果想要通过攻击hypervisor中设备驱动器的方法来对客户VM实施DMA攻击,那要远比这些设备驱动器处身于用户态OS中的情况困难得多。

业界诸多专家已经认可如下为不争事实:用可信计算技术来保护hypervisor是一个可行方法,Intel的Trusted eXecution Technology(TXT)就是一个典型案例。而用可信计算技术来保护用户态OS是一个不可行方法,MS的Vista OS中的BitLocker技术就是尝试这一方法的一个典型失败案例。

下一讲将介绍可信计算技术并讨论为什么使用可信计算技术来保护hypervisor,尤其是保护象VMware ESX那种自身含有IO设备驱动器的hypervisor,这种技术方法可以在云计算或基于服务架构的安全保护上找到重要有效的应用。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

This article is enough for you to read about autonomous driving and trajectory prediction! This article is enough for you to read about autonomous driving and trajectory prediction! Feb 28, 2024 pm 07:20 PM

Trajectory prediction plays an important role in autonomous driving. Autonomous driving trajectory prediction refers to predicting the future driving trajectory of the vehicle by analyzing various data during the vehicle's driving process. As the core module of autonomous driving, the quality of trajectory prediction is crucial to downstream planning control. The trajectory prediction task has a rich technology stack and requires familiarity with autonomous driving dynamic/static perception, high-precision maps, lane lines, neural network architecture (CNN&GNN&Transformer) skills, etc. It is very difficult to get started! Many fans hope to get started with trajectory prediction as soon as possible and avoid pitfalls. Today I will take stock of some common problems and introductory learning methods for trajectory prediction! Introductory related knowledge 1. Are the preview papers in order? A: Look at the survey first, p

The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? Mar 06, 2024 pm 05:34 PM

StableDiffusion3’s paper is finally here! This model was released two weeks ago and uses the same DiT (DiffusionTransformer) architecture as Sora. It caused quite a stir once it was released. Compared with the previous version, the quality of the images generated by StableDiffusion3 has been significantly improved. It now supports multi-theme prompts, and the text writing effect has also been improved, and garbled characters no longer appear. StabilityAI pointed out that StableDiffusion3 is a series of models with parameter sizes ranging from 800M to 8B. This parameter range means that the model can be run directly on many portable devices, significantly reducing the use of AI

Best Practice Guide for Building IP Proxy Servers with PHP Best Practice Guide for Building IP Proxy Servers with PHP Mar 11, 2024 am 08:36 AM

In network data transmission, IP proxy servers play an important role, helping users hide their real IP addresses, protect privacy, and improve access speeds. In this article, we will introduce the best practice guide on how to build an IP proxy server with PHP and provide specific code examples. What is an IP proxy server? An IP proxy server is an intermediate server located between the user and the target server. It acts as a transfer station between the user and the target server, forwarding the user's requests and responses. By using an IP proxy server

How to configure Dnsmasq as a DHCP relay server How to configure Dnsmasq as a DHCP relay server Mar 21, 2024 am 08:50 AM

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! Mar 21, 2024 pm 05:21 PM

This paper explores the problem of accurately detecting objects from different viewing angles (such as perspective and bird's-eye view) in autonomous driving, especially how to effectively transform features from perspective (PV) to bird's-eye view (BEV) space. Transformation is implemented via the Visual Transformation (VT) module. Existing methods are broadly divided into two strategies: 2D to 3D and 3D to 2D conversion. 2D-to-3D methods improve dense 2D features by predicting depth probabilities, but the inherent uncertainty of depth predictions, especially in distant regions, may introduce inaccuracies. While 3D to 2D methods usually use 3D queries to sample 2D features and learn the attention weights of the correspondence between 3D and 2D features through a Transformer, which increases the computational and deployment time.

What are the virtualization software? What are the virtualization software? Feb 23, 2024 pm 02:42 PM

What are the virtualization software? With the continuous development of technology, virtualization technology has become an important concept in the field of modern computer science. The goal of virtualization is to logically divide physical resources such as CPU, memory and storage to form multiple virtual environments so that multiple operating systems and applications can run on the same physical computer at the same time. As a key tool to achieve this goal, virtualization software has received increasing attention and application. This article will introduce some common virtualization software. VMwarevSphere: VMw

What should I do if I can't enter the game when the epic server is offline? Solution to why Epic cannot enter the game offline What should I do if I can't enter the game when the epic server is offline? Solution to why Epic cannot enter the game offline Mar 13, 2024 pm 04:40 PM

What should I do if I can’t enter the game when the epic server is offline? This problem must have been encountered by many friends. When this prompt appears, the genuine game cannot be started. This problem is usually caused by interference from the network and security software. So how should it be solved? The editor of this issue will explain I would like to share the solution with you, I hope today’s software tutorial can help you solve the problem. What to do if the epic server cannot enter the game when it is offline: 1. It may be interfered by security software. Close the game platform and security software and then restart. 2. The second is that the network fluctuates too much. Try restarting the router to see if it works. If the conditions are OK, you can try to use the 5g mobile network to operate. 3. Then there may be more

How to install PHP FFmpeg extension on server? How to install PHP FFmpeg extension on server? Mar 28, 2024 pm 02:39 PM

How to install PHPFFmpeg extension on server? Installing the PHPFFmpeg extension on the server can help us process audio and video files in PHP projects and implement functions such as encoding, decoding, editing, and processing of audio and video files. This article will introduce how to install the PHPFFmpeg extension on the server, as well as specific code examples. First, we need to ensure that PHP and FFmpeg are installed on the server. If FFmpeg is not installed, you can follow the steps below to install FFmpe

See all articles