Xen的半虚拟化(Paravirtualization)

Xen通过调整操作系统运行在Ring1而非Ring0,减弱其权限并提升安全性。应用程序仍运行在Ring3。为实现这一目标,需在编译时对操作系统代码进行修改,将特权指令替换为Hypercall,请求VMM提供服务。

三个特权级

IA-32体系提供了4个特权级别,正常情况下只用了2个, 操作系统运行在Ring 0,而应用程序运行在Ring 3。

Xen让自己运行在Ring 0, 而操作系统运行在Ring 1, 应用程序运行在Ring 3,这样操作系统变成没有那么Powerful了,不能执行特权指令了。

 

改变的方法,就是对操作系统代码进行Patch,将原来需要运行在特权级别的指令,换成相应的Hypercall,像系统调用一样,请求VMM来提供相应的服务。

 

由于对操作系统的Patch是在Compile Time,而不是在Run Time,可以很大程序地提高效率。

转载于:https://www.cnblogs.com/long123king/p/3478981.html

In 1998, VMware figured out how to virtualize the x86 platform, once thought to be impossible, and created the market for x86 virtualization. The solution was a combination of binary translation and direct execution on the processor that allowed multiple guest OSes to run in full isolation on the same computer with readily affordable virtualization overhead. The savings that tens of thousands of companies have generated from the deployment of this technology is further driving the rapid adoption of virtualized computing from the desktop to the data center. As new vendors enter the space and attempt to differentiate their products, many are creating confusion with their marketing claims and terminology. For example, while hardware assist is a valuable technique that will mature and expand the envelope of workloads that can be virtualized, paravirtualization is not an entirely new technology that offers an “order of magnitude” greater performance. While this is a complex and rapidly evolving space, the technologies employed can be readily explained to help companies understand their options and choose a path forward. This white paper attempts to clarify the various techniques used to virtualize x86 hardware, the strengths and weaknesses of each, and VMware’s community approach to develop and employ the most effective of the emerging virtualization techniques. Figure 1 provides a summary timeline of x86 virtualization technologies from VMware’s binary translation to the recent application of kernel paravirtualization and hardware-assisted virtualization.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值