在手臂虚拟化的情况下TTBR0 / 1 WRT多个国家的客人 [英] state of TTBR0/1 wrt to multiple guests in case of virtualization in arm

查看:402
本文介绍了在手臂虚拟化的情况下TTBR0 / 1 WRT多个国家的客人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TTBR0 / 1是这是由PL1 OS编程CP15寄存器。现在,如果PL1 OS1程序TTBR0,然后在相同的核心PL1 OS2计划,将在PL1 OS2看到TTBR0 / 1设置OS1值

TTBR0/1 are CP15 registers which are programmed by PL1 OS. Now If PL1 OS1 programs TTBR0 and then on the same core the PL1 OS2 is scheduled, would the PL1 OS2 see the value of TTBR0/1 set the OS1

我肯定有天晓得了理智得住,如下是真的吗?

I am sure there is someway that the sanity is maintained, is the following is true?

虽然管理程序来宾之间切换保存在来宾环境中的所有CP15寄存器和后来切换客人面前恢复

While switching between guests the hypervisor saves all cp15 regs in guest context and later restores before switching the guest

如果是的话难道不费时的管理程序作为CP15暂存器名单会很长。

if yes then wouldnt it be time consuming for hypervisor as the list of cp15 regs would be very long

推荐答案

您可以阅读的ARMv7-AR体系结构参考手册中的寄存器的描述 - 与注册可下载从的这里

You can read the description of the registers in the ARMv7-AR Architecture Reference Manual - downloadable with registration from here.

在总结,是的 - TTBR0 / TTBR1只有一个副本(每个),这是由虚拟机管理程序切换时,客人更新存在。该管理程序本身有其自身的使用VTTBR。这当然是可能的举办客人无限数量的唯一途径。 (该AArch64模型有些不同,但相同的基本事实仍然如此。)

In summary, yes - TTBR0/TTBR1 exist in only one copy (each), which is updated by the hypervisor when switching guests. The hypervisor itself has the VTTBR for its own use. This is of course the only way it is possible to host an unlimited number of guests. (The AArch64 model is somewhat different, but the same basic fact remains true.)

显然,这是一个代价高昂的操作,而不是切换客人要求只有一个,所以你肯定不希望这样做过于频繁。但是,这需要preserving寄存器的列表可能会比你想象的要短。

Clearly this is a costly operation, and not the only one required on switching guests, so you certainly don't want to do it too frequently. But the list of registers that need preserving may be shorter than you think.

您可以看到KVM实际执行<一个href=\"https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/kvm/interrupts_head.S?id=refs/tags/v3.13-rc3\"相对=nofollow>这里。

You can see the actual implementation for KVM here.

这篇关于在手臂虚拟化的情况下TTBR0 / 1 WRT多个国家的客人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆