Min Lee
2010-Aug-01 16:01 UTC
[Xen-devel] [Q] guest and user protection on x86-64 by paging
Hi, folks. one question. I''ll read source code, but if one can give me brief overview, it would be so helpful. On x86-64, guest and user runs both in ring 3, and protect from each other by paging mechanism. but, how? Then page table should be modified and TLB would be flushed for every system call. This would be some overhead, I think. Is this what Xen is doing? If not, how paging mechanism protect guest from its application? Thanks Min _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-Aug-02 06:31 UTC
Re: [Xen-devel] [Q] guest and user protection on x86-64 by paging
On 08/01/2010 09:01 AM, Min Lee wrote:> Hi, folks. > one question. I''ll read source code, but if one can give me brief > overview, it would be so helpful. On x86-64, guest and user runs both > in ring 3, and protect from each other by paging mechanism. but, how? > Then page table should be modified and TLB would be flushed for every > system call. This would be some overhead, I think. Is this what Xen is > doing?Yes it is. 64-bit PV guests run at a considerable disadvantage. The only mitigating factor is that it sets the Global bit on usermode ptes, so that they don''t get flushed from tlb during the transition. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Min Lee
2010-Aug-02 14:35 UTC
Re: [Xen-devel] [Q] guest and user protection on x86-64 by paging
I see.. Thanks for your help, Jeremy. Min On 8/2/2010 2:31 AM, Jeremy Fitzhardinge wrote:> On 08/01/2010 09:01 AM, Min Lee wrote: >> Hi, folks. >> one question. I''ll read source code, but if one can give me brief >> overview, it would be so helpful. On x86-64, guest and user runs both in >> ring 3, and protect from each other by paging mechanism. but, how? Then >> page table should be modified and TLB would be flushed for every system >> call. This would be some overhead, I think. Is this what Xen is doing? > > Yes it is. 64-bit PV guests run at a considerable disadvantage. The only > mitigating factor is that it sets the Global bit on usermode ptes, so that > they don''t get flushed from tlb during the transition. > > J >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel