At 02:42 +0100 on 30 Mar (1301452953), KennyChen wrote:
> Hi, Tim:
> One more doubt here.
> In the Linux concept, each process all share a common part of kernel page
> tables, e.g., 3-4GB address mapping are the same among all processes. Thus
> switching to kernel, there is no need to change hardware CR3.
> But when going to PV guest, is that the same way?
> I thought Xen prepares the page tables for PV guest in such a way that
> some portion of address mapping is reserved particularly for
> hypervisor, which can be used for translation inside hypervisor.
Yes, PV guests share an address space with the hypervisor, as described
in the original "Xen and the art of virtualization" paper.
> For PV, it might be ok because the page table is directly translated to
> physical address. So when switching to hypervisor, this page table (same cr3)
> can still be used for address translation.
> But how about HVM guest (assume EPT is enabled)?
> When vmexit happens, does the hardware CR3 switches to some other value
Yes; it's called the "host cr3" in the APMs and PRMs.
> points to a special page table for Xen's use? If no switching happens, then
> hardware MMU would walk through guest page table for translation which is
> to me.
> If such special page table exists, could you point it out?
It's called the "monitor table" in the Xen code.
> Xen-devel mailing list
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
Xen-devel mailing list