From mboxrd@z Thu Jan 1 00:00:00 1970 From: weiming Subject: Re: where is writable page table implemented? Date: Tue, 1 Apr 2008 11:37:54 -0400 Message-ID: References: <20080324162510.GD30315@york.uk.xensource.com> <20080325104351.GA30991@york.uk.xensource.com> <20080401083825.GA4628@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1410835812==" Return-path: In-Reply-To: <20080401083825.GA4628@york.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============1410835812== Content-Type: multipart/alternative; boundary="----=_Part_10430_23402550.1207064274198" ------=_Part_10430_23402550.1207064274198 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Tim, Do you know under which situation we use writable page table instead of calling update_va_mapping? And do you know the purpose of the counter defined in page_info.u.in_use.type_info? I understand that xen needs to keep track of the type of each page (L1_page_table_page, L2_page_table_page, pinned, unpinned, validated, etc), but why do we need to use the lower 26 bits of "type_info" as a counter? (in "get_page_type()", the counter is increased. ) Similarly, get_page() / put_page() also increases/decreases the page.count_info. Could you please give me some hint about the usage of such counters? Thanks a lot! Weiming On Tue, Apr 1, 2008 at 4:38 AM, Tim Deegan wrote: > At 19:43 -0400 on 30 Mar (1206906207), weiming wrote: > > with writable page table, why guest os still calls update_va_mapping to > > update the pte? > > It's faster to call into Xen with an explicit modification, or a list of > them, than to have xen trap and do a full x86 instruction emaulation to > figure out what you werere doing. > > Cheers, > > Tim. > > -- > Tim Deegan > Principal Software Engineer, Citrix Systems (R&D) Ltd. > [Company #02300071, SL9 0DZ, UK.] > ------=_Part_10430_23402550.1207064274198 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Tim,

Do you know under which situation we use writable page table instead of calling update_va_mapping?

And do you know the purpose of the counter defined in page_info.u.in_use.type_info?
I understand that xen needs to keep track of the type of each page (L1_page_table_page, L2_page_table_page, pinned, unpinned, validated, etc), but why do we need to use the lower 26 bits of "type_info" as a counter? (in "get_page_type()", the counter is increased. )  Similarly,  get_page() / put_page() also increases/decreases the page.count_info. Could you please give me some hint about the usage of such counters?

Thanks a lot!
Weiming


On Tue, Apr 1, 2008 at 4:38 AM, Tim Deegan <Tim.Deegan@citrix.com> wrote:
At 19:43 -0400 on 30 Mar (1206906207), weiming wrote:
> with writable page table, why guest os still calls update_va_mapping to
> update the pte?

It's faster to call into Xen with an explicit modification, or a list of
them, than to have xen trap and do a full x86 instruction emaulation to
figure out what you werere doing.

Cheers,

Tim.

--
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

------=_Part_10430_23402550.1207064274198-- --===============1410835812== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1410835812==--