PatentTips - Handling shared interrupts in bios under a virtualization technology environment

BACKGROUND

This relates to the operation of software under a virtualization technology (VT) environment.

In a VT environment, such as the Intel VT or AMD Pacifica, an infrastructure may be provided to execute applications in an isolated and protected partition, called the service partition, using the VT capability. The operating system that is visible to end users runs in another partition, called the user partition. For example, a firewall application running in service partition is forwarding the inspected/verified data packets to the user partition. A typical flow of a network packet consist of a) processing and inspection of the network packet by the firewall application in service partition, and b) subsequent forwarding of the network packet to the user partition through the inter-communication channel. The network packet eventually reaches the end-user application running in user partition (as it would happen in a non-VT environment).

In a particular VT environment, Windows CE can be used in the service partition and Windows XP in the user partition. The control flow of boot process can be summarized as follows: a) Basic input/output system passes the control to VT loader; b) VT loader loads itself and prepares the environments for the service partition and user partition for both guests Windows CE and Windows XP respectively; c) VT loader launches Windows CE in service partition, Windows CE completes its boot, and requests VT loader to launch Windows XP; d) VT loader then launches Windows XP and Windows XP starts booting.

During initial stages of a boot process, the XP operating system uses different basic input/output system services as usual. However, the XP operating system is unaware that it is running within a partition isolated and supervised by another entity. Although the control flow of the XP operating system in the VT aware environment remains identical to that of the non-VT environment, the underlying hardware environment differs as far as the device ownership is concerned.

Typically, devices are fully owned by one operating system or guest running in a particular partition (service partition or user partition), and, therefore, are isolated from one another. For example, network controllers may be owned by the Windows CE operating system running in service partition, that handles all incoming and outgoing packets, while storage devices, like hard disks, may be owned by the XP operating system running in user partition. However, some devices, like programmable interrupt controller, may be shared between the two operating systems and are thereby exposed to both guests via the underlying software models.

When an interrupt request is shared by different devices, owned by different guests, in level-triggered interrupt environments, the interrupt may be conveyed to both guests under the assumption that the service routine of both guests will be invoked; the service routine of a particular guest will check the interrupt source for the device it controls; if several devices raise a shared interrupt request simultaneously, all devices will be checked as possible interrupt sources and serviced as necessary; and if a guest detects that the interrupt source for the device it controls, it will service the interrupt or, otherwise, it will ignore the interrupt by sending an end of interrupt.

The basic input/output system (BIOS) installs a default interrupt request handler for all hardware interrupts. If no other entity installs a handler for a particular interrupt request, the basic input/output system default interrupt service routine remains as the only active interrupt handler for the concerned interrupt request. In a shared interrupt environment, when an entity installs a handler for a particular interrupt request, the concerned handler is installed in a chained fashion so that the last installed handler gets control first on the occurrence of the concerned interrupt request and the basic input/output system default interrupt service routine remains at the bottom of the interrupt handler chain. Thus, if no handler claims and services the generated interrupt request, the basic input/output system default interrupt service routine eventually gets control and finds the interrupt request that has been generated, but not claimed and, hence, not serviced by anybody, and disables the request, treating it like a spurious interrupt.

DETAILED DESCRIPTION

Some virtualization technology (VT) capabilities may expect that an interrupt request will be ignored if no owner is found, while the basic input/output system (BIOS) expects that the interrupt request will be disabled if no owner is found. The conflicting requirements regarding the handling of a shared interrupt request gives rise to a situation where the interrupt request may be disabled by the basic input/output system default interrupt service routine if no owner claims it. For example, where an interrupt request is shared by a network controller and a hard disk controller, if the interrupt is generated by the network controller in the virtualized environment when one operating system Windows XP is booting up in the user partition, the interrupt is injected into both operating system guests.

In an environment where one operating system Windows XP is booting in the user partition, the interrupt handlers that are installed by the basic input/output system (or other entities) is invoked. However, the installed interrupt handlers for the hard disk may not service the interrupt because it is not generated by a hard disk operation, but, instead, is generated by a network operation. Even though the other operating system guest Windows CE running in service partition installs a network driver and processes the interrupt as expected, no entity may install the interrupt handler for the network controller during the boot process of the operating system in the user partition. Hence, the basic input/output system default interrupt service routine is invoked as the last entry in the chained interrupt handlers, disabling the interrupt request which may subsequently result in an error while accessing the hard disk and possibly in the failure to boot the system.

This situation may be overcome by installing on demand a custom interrupt service routine. The BIOS may be requested to install the custom interrupt handler as required, allowing the basic input/output system default interrupt service routine to remain unchanged, while allowing installation of a custom interrupt service routine for a particular interrupt request as needed.

Thus, a custom interrupt service routine may be active only for a concerned shared interrupt request between two guests and existing basic input/output system default interrupt service routines will be active for all other interrupt requests. In a non-VT environment, the existing basic input/output system default interrupt service routine remains active for all interrupts as usual. This allows development of a single basic input/output system that works in both VT and non-VT environments, while maintaining the compatibility with all existing environments.

The invocation of a callback method by VT loader is illustrated in FIG. 1. The callback function?26?may be implemented in the basic input/output system in one embodiment. The basic input/output system may also implement the custom interrupt service routine that does not disable the interrupt request if no owner is found, but just issues an end of interrupt and keep the custom interrupt service routine inactive and make it active only when asked by the caller (e.g. VT loader). The basic input/output system may provide the pointer to the callback function when the basic input/output system passes the control to the VT loader (loader of VT environment), as indicated by the arrow adjacent to block?10?in FIG. 1.

Then in diamond?12, the loader validates the basic input/output system provided callback function. If the function is not valid, an error message may be displayed, as indicated at?50. Otherwise, the loader performs the normal operation of checking and validating and configuring other system parameters as indicated in block?14.

A check at diamond?16?determines whether the boot is to a controlled environment. If not, the normal boot path is followed as indicated in block?32. Otherwise, the loader determines the interrupt request for which a custom interrupt service routine needs to be installed, as indicated in block?18. A check at diamond?20?determines whether to install custom interrupt routines to service any interrupt requests. If so, the callback function is invoked by the loader, as indicated in block?26.

The loader thus uses a callback function to install and activate the custom interrupt service routine, as indicated in block?28, for a particular interrupt request during the boot process. A check at diamond?22?determines whether the custom interrupt service routine installation was successful. If so, booting continues in the controlled environment, as indicated in block?24.

The custom interrupt service routine operates, as indicated in FIG. 2, in accordance with one embodiment. The custom interrupt service routine is invoked when no owner claims or services the generated interrupt request, as indicated in block?36. The pending interrupt request level is then identified, as indicated in block?38. If the custom interrupt service routine is active for the request, as determined in diamond?40, an end of interrupt is issued to the interrupt controller, as indicated in block?44. Then there is an exit from the interrupt service routine.

If the custom interrupt service routine is not active, the interrupt request is masked off and disabled in their interrupt controller, as indicated in block?42. Then an end of interrupt is issued to the interrupt controller, as indicated in block?44?and there is an exit from the interrupt service routine.

When active, the interrupt service routine finds the unclaimed interrupt request and whether the custom interrupt service routine has been activated for the unclaimed request. If the custom interrupt service routine has been activated for the unclaimed request, it issues an end of interrupt without disabling the interrupt request, as indicated in FIG. 2, block?44. The loader can also optionally uninstall a custom interrupt service routine when the boot process is complete. The loader may supply a new custom interrupt service routine or use a built-in custom interrupt service routine in the basic input/output system.

In some embodiments, the use of a custom interrupt service routine makes the basic input/output system compatible with various environments, including both VT and non-VT environments. A custom interrupt service routine may be installed on demand and may be installed for one or more interrupt requests. It may also be uninstalled in some embodiments.

SRC=http://www.freepatentsonline.com/7562173.html

PatentTips - Handling shared interrupts in bios under a virtualization technology environment

时间: 2024-08-29 03:19:20

PatentTips - Handling shared interrupts in bios under a virtualization technology environment的相关文章

Android Studio 安装及常见问题

今年放假比去年早了一些,就提前回来了.感觉挺爽,结果教研室电脑没有带回来,悲剧是导师让我维护一下以前的项目,只能屁颠屁颠的搞起呀.只能用自己的笔记本搭建android开发环境.由于前阶段听说Android Studio用着爽歪歪,于是尝试在超卡的笔记本上跑Android Studio.哇咔咔,费了九牛二虎之力终于将Android Studio玩转了.先上个图,快过年了,祝大家新年快乐! Android官网也开始推广Android Studio了,以前官网好像提供Eclipse和ADT打包下载,现

安卓创建硬件加速

Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android Studio的安装包,并且兴高采烈地创建了我的第一个android项目.但是当运行的时候就他么悲催了. emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is

移动WebApp利用Chrome浏览器进行调试

详细的请看这个(HBuilder是我长期使用,而且值得支持的国内前端开发编辑器) http://ask.dcloud.net.cn/article/151 http://ask.dcloud.net.cn/article/69 对于上面教程要注意的问题: 1,不需要考虑run in device问题,因为他们的软件设计改变了. 2,你必须要新建一个“移动App”,我这里的是h5+. 我主要是分析我遇到的问题: (这几天,我会把一整套上传百度云盘,如果可以的话,然后共享) 共享的文件可以让你不需要

Android Studio模拟器启动工程时报错:HAX kernel module is not installed!

Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android Studio的安装包,并且兴高采烈地创建了我的第一个android项目.但是当运行的时候就他么悲催了,一启动模拟器就开始报错: 错误信息: emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ens

Android Studio安装及常见错误

Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android Studio的安装包,并且兴高采烈地创建了我的第一个android项目.但是当运行的时候就他么悲催了. emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is

高可用性的XenServer环境

高可用性的XenServer环境应包括最少两台XenServer服务器和一个共享存储设备.XenServer的硬件,我采用的是Dell PowerEdge R710,内存加至16GB.iSCSI的存储设备则用下面4种硬/软件设备构成: 1. 一台旧PC(Dell PowerEdge SC1420,内存加至4GB)装上windows 2003,再装上SANmelody 2. Highpoint的RAID卡RocketRAID2314 3. Century的支持e-SATA的外置硬盘抽取盒EX35P

Genymotion模拟器安装问题及解决

安装Genymotion模拟器安装后启动不了,报错: 百度的解决方法是打开VMVBirtualox选中自己的设备点击设置-常规-将版本设置为图中箭头所指的: 但是我这样做的时候发现我的下拉列表中没有64这个选项,解决办法:电脑进入BIOS 将 Intel Virtualization Technology 设置成 Enabled 保存 参考博客:http://www.askmaclean.com/archives/vbox-virtualbox-64-bit.html 我的是联想小新,进入BIO

KVM 虚拟化技术

简介: KVM 是 kernel-based Virtual Machine 的简称,是一个开源的系统虚拟化模块,是 Linux 下 x86 硬件平台上的全功能虚拟化解决方案,包含一个可加载的内核模块 kvm.ko 提供虚拟化核心架构和处理器规范模块. 自 Linux 内核 2.6.20 之后集成在 Linux 的各个主要发行版本中.它使用 Linux 自身的调度器进行管理,所以相对于 Xen ,其核心源码很少.KVM 已成为学术界的主流 VMM 之一. KVM的虚拟化需要硬件支持(如 Inte

CentOS7 安装xen(在虚拟机上成功,实体机测试死机!)

此文章只做操作记录,其中有些地方可能漏了!!我只贴出自己的操作过程!其它有差别的地方请自己网上查找参考! 只有在全虚拟化下才能安装Windows,这就需要有硬件支持,并在BIOS中开启Virtualization Technology的选项.在安装Xen之前,可以用以下命令检查是否支持全虚拟化: Intel CPU:grep vmx /proc/cpuinfo --color=always AMD CPU: grep svm /proc/cpuinfo --color=always 若有输出,说