分类: C/C++
2012-03-17 14:08:27
~rs/talks/LLRB/RedBlack.pdf
这是红黑树的发明人对红黑树的描述,亮点是:以2-3-4树为引子来介绍,思路同CLRS完全不一样。在作者的描述中红和黑有了新的意义(相比CLRS)。
/>
6 Context Switching
When a guest OS wishes to context switch between two processes, it can use
the page table and segmentation hypercalls described above to perform the
the bulk of the privileged work. In addition, however, it will need to invoke
Xen to switch the kernel (ring 1) stack pointer:
stack_switch(unsigned long ss, unsigned long esp)
requests kernel stack switch from hypervisor; ss is the new stack segment,
esp is the new stack pointer.
[Xen-devel] Really need to pin page tables?
> In extras/mini-os/arch/x86/mm.c:new_pt_frame, Mini-OS pins its L1,
> L2, and L3 page tables. Does that really make a difference from the
> Hypervisor point of view? I mean, once L4 is pinned, pointing to these,
> and thus their content has been checked, is there any performance
> difference?
>
> Samuel
No, there's not really any need to pin anything other than the top-level directory.
-- Keir
Shouldn't be. Pinning an L4 implicitly pins everything else below it. The only reason to pin the leafy parts of a pagetable is if you want to play games with incrementally pinning the pagetable, or if you want to pull them apart and rearrange the pieces for some reason. For example, I do incremental pagetable pins in the Xen/pvops kernel to limit the number of pte locks I need to hold at any one time.
DOm0 works in ring 1 root VMX mode. Anyway can switch from ring 1 to ring 0 can be used for accessing privileged resource such as INT xx, or thru exception like I/O. But HVM works in non root VMX mode though ring=0, so you need to switch from non root VMX mode to root VMX mode to access privileged resource. VM Exit is the only way to do this.
Dom0 always runs paravirtualised, it can't be an HVM domain. So it just uses the normal paravirtualised interface, regardless of whether VMX is available in the hardware.
the shadow_set_l1e() function is where the read-only mapping will be