Hi, To track the memory being used by an application running in DomU, is it better to make tweaks in Dom0 or the hypervisor layer? Is it possible to just put some hooks in the do_mmu_update hypercall? Also, how does one enable log-dirty shadow mode? Does this actually createa log file somewhere? -Craig --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. --0-1981736309-1160270516=:19847 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi,<br><br>To track the memory being used by an application running in DomU,<br>is it better to make tweaks in Dom0 or the hypervisor layer?<br><br>Is it possible to just put some hooks in the do_mmu_update hypercall?<br><br>Also, how does one enable log-dirty shadow mode?<br>Does this actually createa log file somewhere?<br><br>-Craig<br><p>  <hr size=1>How low will we go? Check out Yahoo! Messengers low <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> PC-to-Phone call rates. --0-1981736309-1160270516=:19847-- --===============1070359519=Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============1070359519==--
What do you ACTUALLY want to do? log-dirty doesn''t log to a file - it keeps track of "dirty" pages in a list in memory, but doesn''t actually store it in a file [ever, at all]. do_mmu_update is possibly a good place to hook into, but it depends on what you want to do... [And it''s non-trivial code, so beware of complications from changing it]. You may want to look at ptwr_emulated_update, as that''s used when the do_mmu_update() hypercall isn''t used to update a page-table-entry. -- Mats ________________________________ From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Security Initiative Team Sent: 08 October 2006 02:22 To: xen-users@lists.xensource.com Subject: [Xen-users] Tracking DomU memory Hi, To track the memory being used by an application running in DomU, is it better to make tweaks in Dom0 or the hypervisor layer? Is it possible to just put some hooks in the do_mmu_update hypercall? Also, how does one enable log-dirty shadow mode? Does this actually createa log file somewhere? -Craig ________________________________ How low will we go? Check out Yahoo! Messenger''s low PC-to-Phone call rates. <http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.co m/evt=39663/*http://voice.yahoo.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
My main purpose is to know when a user-level application in DomU is updating its memory. (Tracking changes to the stack segment might be too hard due to frequent memory updates, so maybe only the "text" segment). I want to be able to track this from either Dom0 or the hypervisor layer, whichever is easier. When is ptwr_emulated_update() used and when is do_mmu_update() used? Thanks, -Criag "Petersson, Mats" <Mats.Petersson@amd.com> wrote: What do you ACTUALLY want to do? log-dirty doesn''t log to a file - it keeps track of "dirty" pages in a list in memory, but doesn''t actually store it in a file [ever, at all]. do_mmu_update is possibly a good place to hook into, but it depends on what you want to do... [And it''s non-trivial code, so beware of complications from changing it]. You may want to look at ptwr_emulated_update, as that''s used when the do_mmu_update() hypercall isn''t used to update a page-table-entry. -- Mats --------------------------------- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Security Initiative Team Sent: 08 October 2006 02:22 To: xen-users@lists.xensource.com Subject: [Xen-users] Tracking DomU memory Hi, To track the memory being used by an application running in DomU, is it better to make tweaks in Dom0 or the hypervisor layer? Is it possible to just put some hooks in the do_mmu_update hypercall? Also, how does one enable log-dirty shadow mode? Does this actually createa log file somewhere? -Craig --------------------------------- How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates. --------------------------------- Do you Yahoo!? Get on board. You''re invited to try the new Yahoo! Mail. --0-1094923197-1160412586=:38333 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit My main purpose is to know when a user-level application in DomU<br>is updating its memory.<br>(Tracking changes to the stack segment might be too hard due to frequent<br>memory updates, so maybe only the "text" segment).<br><br>I want to be able to track this from either Dom0 or the hypervisor layer,<br>whichever is easier.<br><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">When is </span><font face="Arial"><font color="#0000ff"><font size="2"><span class="709152510-09102006"><span style="color: rgb(0, 0, 0);">ptwr_emulated_update() used and when is do_mmu_update()</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">used?</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Thanks,</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">-Criag</span><br></span></font></font></font><br><br><b><i>"Petersson, Mats" <Mats.Petersson@amd.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <meta content="MSHTML 6.00.2900.2963" name="GENERATOR"> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2">What do you ACTUALLY want to do?</font></span></div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2">log-dirty doesn''t log to a file - it keeps track of "dirty" pages in a list in memory, but doesn''t actually store it in a file [ever, at all]. </font></span></div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2">do_mmu_update is possibly a good place to hook into, but it depends on what you want to do... [And it''s non-trivial code, so beware of complications from changing it]. </font></span></div> <div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"></font> </div> <div dir="ltr" align="left"><font face="Arial"><font color="#0000ff"><font size="2">Y<span class="709152510-09102006">ou may want to look at ptwr_emulated_update, as that''s used when the do_mmu_update() hypercall isn''t used to update a page-table-entry. </span></font></font></font></div> <div dir="ltr" align="left"><font face="Arial"><font color="#0000ff"><font size="2"><span class="709152510-09102006"></span></font></font></font> </div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2">--</font></span></div> <div dir="ltr" align="left"><span class="709152510-09102006"><font color="#0000ff" face="Arial" size="2">Mats</font></span></div><br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] <b>On Behalf Of </b>Security Initiative Team<br><b>Sent:</b> 08 October 2006 02:22<br><b>To:</b> xen-users@lists.xensource.com<br><b>Subject:</b> [Xen-users] Tracking DomU memory<br></font><br></div> <div></div>Hi,<br><br>To track the memory being used by an application running in DomU,<br>is it better to make tweaks in Dom0 or the hypervisor layer?<br><br>Is it possible to just put some hooks in the do_mmu_update hypercall?<br><br>Also, how does one enable log-dirty shadow mode?<br>Does this actually createa log file somewhere?<br><br>-Craig<br> <div> </div><hr size="1"> How low will we go? Check out Yahoo! Messengers low <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">PC-to-Phone call rates.</a></blockquote></blockquote><br><p>  <hr size=1>Do you Yahoo!?<br> Get on board. <a href="http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/mailbeta">You''re invited</a> to try the new Yahoo! Mail. --0-1094923197-1160412586=:38333-- --===============0312586944=Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============0312586944==--
I actually want do to something similar, but simpler. I''m only interested in keeping track of pages that a guest domain is accessing (both reads and writes). I''m _not_ looking for the *exact* memory address -- just the physical page being accessed. Can log dirty be modified to keep track of read accesses as well? Thanks, Diwaker On 10/9/06, Security Initiative Team <passrete@yahoo.com> wrote:> My main purpose is to know when a user-level application in DomU > is updating its memory. > (Tracking changes to the stack segment might be too hard due to frequent > memory updates, so maybe only the "text" segment). > > I want to be able to track this from either Dom0 or the hypervisor layer, > whichever is easier. > > When is ptwr_emulated_update() used and when is do_mmu_update() > used? > > Thanks, > -Criag > > > "Petersson, Mats" <Mats.Petersson@amd.com> wrote: > > What do you ACTUALLY want to do? > > log-dirty doesn''t log to a file - it keeps track of "dirty" pages in a list > in memory, but doesn''t actually store it in a file [ever, at all]. > > do_mmu_update is possibly a good place to hook into, but it depends on what > you want to do... [And it''s non-trivial code, so beware of complications > from changing it]. > > You may want to look at ptwr_emulated_update, as that''s used when the > do_mmu_update() hypercall isn''t used to update a page-table-entry. > > -- > Mats > > > ________________________________-- Web/Blog/Gallery: http://floatingsun.net/blog _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Diwaker Gupta > Sent: 15 December 2006 22:56 > To: Security Initiative Team > Cc: Petersson, Mats; xen-users@lists.xensource.com > Subject: Re: [Xen-users] Tracking DomU memory > > I actually want do to something similar, but simpler. I''m only > interested in keeping track of pages that a guest domain is accessing > (both reads and writes). I''m _not_ looking for the *exact* memory > address -- just the physical page being accessed. Can log dirty be > modified to keep track of read accesses as well?This isn''t far from what I''m doing (except I need to look at one or a few pages, which makes life somewhat easier). You''d have to change the page-table writes so that they are written with "not present", and then update your statistics based on the page-fault. You''ll have to "fix" the fault and then reset the page-table, which is probably easiest done by using the x86_emulate_memop() function [alternatively, set the trace-bit in the flags on stack before exiting the PF-handler, take the trace-interrupt, reset the page-table and continue]. However, if you''re doing this for every memory access of the guest, you''ll not get much work done... :-( -- mats> > Thanks, > Diwaker > > On 10/9/06, Security Initiative Team <passrete@yahoo.com> wrote: > > My main purpose is to know when a user-level application in DomU > > is updating its memory. > > (Tracking changes to the stack segment might be too hard > due to frequent > > memory updates, so maybe only the "text" segment). > > > > I want to be able to track this from either Dom0 or the > hypervisor layer, > > whichever is easier. > > > > When is ptwr_emulated_update() used and when is do_mmu_update() > > used? > > > > Thanks, > > -Criag > > > > > > "Petersson, Mats" <Mats.Petersson@amd.com> wrote: > > > > What do you ACTUALLY want to do? > > > > log-dirty doesn''t log to a file - it keeps track of "dirty" > pages in a list > > in memory, but doesn''t actually store it in a file [ever, at all]. > > > > do_mmu_update is possibly a good place to hook into, but it > depends on what > > you want to do... [And it''s non-trivial code, so beware of > complications > > from changing it]. > > > > You may want to look at ptwr_emulated_update, as that''s > used when the > > do_mmu_update() hypercall isn''t used to update a page-table-entry. > > > > -- > > Mats > > > > > > ________________________________ > -- > Web/Blog/Gallery: http://floatingsun.net/blog > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users