The definitive guide to the xen hypervisor ---chapter 2

1、start_kernel(start_info_t *si)
 xen的起始信息页和共享信息页:
  1)起始信息页:
   2)共享信息页:由guest 自己将起始信息页中的shared info 映射到内存空间

2、Dom 0 为hypervisor提供两个用户接口: 
    1)The first is responsible for providing an administrative interface to the hypervisor, allowing a user to define policy. 
    2)The second provides the  back-end storage for the XenStore.

3、HVM 的DomU 不支持xen的分离设备驱动模型,
This means that Xen must emulate something that the guest is likely to support. A small number of devices are available in this way, using code from  QEMU.

4、HVM和PV的区别:
    1)客户机启动时,A paravirtualized guest begins in protected mode, with some memory pages containing boot information mapped by the hypervisor, whereas an HVM guest begins in real mode and gets configuration information 
from an emulated BIOS (SeaBIOS-).
    2)If an HVM guest wants to take advantage of Xen-specific features, it needs to use the CPUID instruction to access a (virtual) machine specific register and access the hypercall page.
    3) For virtualization-aware HVM guests, much of the information otherwise available is accessed via the platform PCI device,


5、系统启动时CPU的模式
1)booting with para-virtualization guest
现代的机器架构为了兼容8088之前的机器,CPU会先进入到实模式,然后切换为保护模式并安装一些终端句柄。xen也不例外,xen it enters protected mode and installs its own interrupt handlers。也就是说,在xen hypervisor上启动的虚拟机在启动时已经是处于保护模式。

在xen的 guest中是不允许访问BIOS的,因为BIOS会访问到物理硬件,破坏xen的隔离性,因此,出现一些方法来实现guest中的BIOS。The BIOS is replaced by a variety of different facilities in Xen.
第一种是, 起始信息页。 which contains basic information required by a guest to initialize the kernel.
第二种,共享信息页。which gives some more data and is updated while the guest is run.
第三种,xenstore。Among other things, this is used to determine which (virtual) devices are available.

6、hypercall
hypercalls are issued indirectly via the hypercall page. This is a memory page mapped in to the guest’s address space when the system is started.


7、event 机制
xen 的异步事件机制 作用是外部程序(外部kernel或其它应用程序)发送一些信息,告诉xen  “event n has occurred.”
One of the first things that a guest kernel should do is register a callback to be used for event delivery. When events 
are delivered to the guest, various flags are set to indicate which event is present.

xen 的一个guest 发送异步事件给另一个guest时,通常需要做以下几步:
1. Receiving guest creates a new, unbound port.
2. Receiving guest advertises the existence of the port (typically via the XenStore). 
3. The sending guest creates a new port if it doesn’t have any free.
4. The sending guest binds its port to the remote one.
5. The sending guest sends the event.


8、 共享内存
Xen supports two basic interdomain operations on memory pages: sharing and transferring.
xen的共享内存区域以一个整数interger的授权索引表示(grant reference), The value of this integer is communicated between domains using the XenStore,

9、分离设备驱动模型
This is typically done using ring buffers in shared memory segments. The front-end driver initializes a memory page with a ring data structure and exports it via the grant table mechanism. It then advertises the grant reference via the XenStore where the back end can retrieve it. The back end then maps it into its own address space, giving a shared communication channel into which the front end inserts requests and the back end places responses.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 《The Definitive Guide to ARM Cortex-M0 and Cortex-M0+ Processors (2nd Edition)》是一本权威的指南,旨在深入介绍ARM Cortex-M0和Cortex-M0+处理器的原理和应用。 这本书的第二版对第一版进行了全面修订和更新,以反映最新的技术发展。它面向的读者包括学生、工程师和嵌入式系统开发人员,完全涵盖了ARM Cortex-M0和Cortex-M0+处理器的所有方面。 第二版首先从处理器的基础知识开始,介绍了ARM架构和处理器核心的基本概念。它详细解释了指令集、寄存器、内存管理单元和中断处理等关键组件的功能和作用。 接下来,该书深入探讨了由ARM Cortex-M0和Cortex-M0+处理器支持的编程模型和开发工具。它提供了大量的示例代码和实际应用案例,帮助读者更好地理解如何编写高效的嵌入式软件。 此外,该书还介绍了处理器的性能特征、能源管理、调试技术和硬件外设等方面的内容。读者可以了解到如何最大限度地利用ARM Cortex-M0和Cortex-M0+处理器的特性,提升系统的性能和效率。 总的来说,这本书是学习和使用ARM Cortex-M0和Cortex-M0+处理器的最佳指南。它通过清晰的解释、丰富的示例和实用的技巧,帮助读者掌握这些处理器的核心知识和开发技能。无论是初学者还是有经验的开发人员,都会从中受益,并能够更好地应用ARM Cortex-M0和Cortex-M0+处理器来开发高质量的嵌入式系统。 ### 回答2: 《The Definitive Guide to ARM Cortex-M0 and Cortex-M0 Processors》(第二版)是一本关于ARM Cortex-M0和Cortex-M0处理器的权威指南。它提供了深入的理解和学习这些处理器的各个方面和功能。 本书首先介绍了ARM Cortex-M0和Cortex-M0处理器的基础知识,包括其体系结构、指令集和寄存器等。读者可以通过这些基本概念来建立对这些处理器的整体理解。 接着,书中详细讲解了ARM Cortex-M0和Cortex-M0处理器的内部工作原理和特性。它解释了处理器的各个组成部分,例如ALU、寄存器文件、内存管理单元等,以及它们如何协同工作来执行指令和管理资源。读者可以通过深入理解处理器的内部机制,从而更好地编写和优化相关的代码。 此外,本书还介绍了软件开发工具和环境,为读者提供了使用ARM Cortex-M0和Cortex-M0处理器进行软件开发的基本知识。它涵盖了编程语言、编译器、仿真器和调试器等方面的内容,使读者能够充分利用这些工具来开发高效且可靠的嵌入式系统。 《The Definitive Guide to ARM Cortex-M0 and Cortex-M0 Processors》(第二版)还提供了大量的实例和案例研究,帮助读者更好地应用所学知识。此外,还提供了一些实用的技巧和技术,帮助读者避免常见的错误和问题,并提供了优化代码和系统性能的建议。 总之,本书是一本非常有价值的学习资料,适用于对ARM Cortex-M0和Cortex-M0处理器感兴趣的学生、工程师和研究人员。通过阅读本书,读者可以获得深入的理解和应用这些处理器的能力,从而更好地进行嵌入式系统开发。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值