[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] question about the differences for xen in x86_32 and x86_64
> I am confused about the differences betwoon xen in x86_32 and x86_64 > in x86_32,Ring 1 for guest OS, ring3 for user-space, Xen lives in top > 64MB of linear addr space, Segmentation used to protect Xen as switching > page tables too slow on standard x86, Hypercalls jump to Xen in ring 0, > Guest OS with ‘fast trap’ handler could direct user-space to guest OS > system calls, is it right? Yes, that's right. > while in x86_64 ,both guestos and userapplications seem to run in ring3, > and what about other thing memtioned above for x86_64? such as the > memory mapping for xen and guestos kernel and applications , system call > fast trap handling Xen still lives at the top of the address space; I'm not sure how much it reserves for itself. The guest kernel (when mapped) lives below Xen. Guest userspace lives below that. When running in guest usermode only the guest userspace and Xen are mapped into memory. Xen is protected from guest userspace using the supervisor protection bit in the pagetables. AFAIK, all system calls must bounce through Xen. I don't think it's possible for OSes to take syscalls directly anymore. This is because Xen has to map the guest kernel's pages into memory (by hooking an extra subtree into the current pagetable). Xen then kicks the guest kernel into action; the kernel can directly access userspace pages since they are still mapped. Xen is protected from the guest kernel by the supervisor protection bit in the pagetables. When the kernel finishes its work it has to execute a hypercall to instruct Xen to transfer control back to userspace. Xen has to flush the TLB at this point to remove the kernel mappings; otherwise it could be possible for the guest's userspace to interfere with the kernel's memory. I believe the "global" bit is set on guest userspace pagetable entries, which means that the userspace mappings are not flushed at this point (performance optimisation). Xen can still flush these mappings with a "global flush" if a switch of application running or of domain occurs. > I am confused about it > could you help me > Thanks in advance Hope that helps. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |