K.C. Lee
2010-Sep-27 03:35 UTC
[Xen-devel] accumulate_guest_flags no longer exists in xen 3.4.3
Hi, I found that accumulate_guest_flags(struct vcpu *v, walk_t *gw) defined in xen 3.1.0 could not be found in xen 3.4.3. Also, I found that guest_walk_tables(struct vcpu *v, unsigned long va, walk_t *gw, ...) in xen 3.4.3 contanis code block: "guest_l1e_get_flags(gw->eff_l1e) ^ _PAGE_NX_BIT" which can only be found in accumulate_guest_flags. Besides, I also found a comment in "We will accumulate, in rc, the set of flags that are missing". I want to know if accumulate_guest_flags integrated into guest_walk_tables in the version of xen 3.4.3? And if so, how can I use guest_walk_tables instead of accumulate_guest_flags to get the same return value and walk_t *gw? Any suggestion is appreciated. Thank you very much. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2010-Sep-27 09:51 UTC
Re: [Xen-devel] accumulate_guest_flags no longer exists in xen 3.4.3
At 04:35 +0100 on 27 Sep (1285562121), K.C. Lee wrote:> Hi, > > I found that accumulate_guest_flags(struct vcpu *v, walk_t *gw) defined in xen 3.1.0 could not be found in xen 3.4.3. > > Also, I found that guest_walk_tables(struct vcpu *v, unsigned long va, walk_t *gw, ...) in xen 3.4.3 contanis code block: "guest_l1e_get_flags(gw->eff_l1e) ^ _PAGE_NX_BIT" which can only be found in accumulate_guest_flags. Besides, I also found a comment in "We will accumulate, in rc, the set of flags that are missing". > > I want to know if accumulate_guest_flags integrated into guest_walk_tables in the version of xen 3.4.3?Yes. The HAP code had introduced its own pagetable-walking routines which were missing some logic; they were merged with the original shadow-code pagetable walker.> And if so, how can I use guest_walk_tables instead of accumulate_guest_flags to get the same return value and walk_t *gw? >What exactly are you trying to do? For most purposes the function you need is paging_gva_to_gfn(), which will find and walk the guest''s pagetables for you, and figure out the pagefault error code if you need to inject a pagefault. Cheers, Tim.> Any suggestion is appreciated. > > Thank you very much.Content-Description: ATT00001..txt> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
K.C. Lee
2010-Sep-29 07:08 UTC
Re: [Xen-devel] accumulate_guest_flags no longer exists in xen 3.4.3
On Mon, Sep 27, 2010 at 5:51 PM, Tim Deegan <Tim.Deegan@citrix.com> wrote:> At 04:35 +0100 on 27 Sep (1285562121), K.C. Lee wrote: > > Hi, > > > > I found that accumulate_guest_flags(struct vcpu *v, walk_t *gw) defined > in xen 3.1.0 could not be found in xen 3.4.3. > > > > Also, I found that guest_walk_tables(struct vcpu *v, unsigned long va, > walk_t *gw, ...) in xen 3.4.3 contanis code block: > "guest_l1e_get_flags(gw->eff_l1e) ^ _PAGE_NX_BIT" which can only be found in > accumulate_guest_flags. Besides, I also found a comment in "We will > accumulate, in rc, the set of flags that are missing". > > > > I want to know if accumulate_guest_flags integrated into > guest_walk_tables in the version of xen 3.4.3? > > Yes. The HAP code had introduced its own pagetable-walking routines > which were missing some logic; they were merged with the original > shadow-code pagetable walker. > > > And if so, how can I use guest_walk_tables instead of > accumulate_guest_flags to get the same return value and walk_t *gw? > > > > What exactly are you trying to do? For most purposes the function you > need is paging_gva_to_gfn(), which will find and walk the guest''s > pagetables for you, and figure out the pagefault error code if you need > to inject a pagefault. >Dear Tim, I''m a beginner of xen. I''m trying to figure out what xen does when a page fault happened so I trace sh_page_fault() and then have many questions about what these functions do and how can I use them. Would you please show me what paging_gva_to_gfn(), guest_walk_tables() and accumulate_guest_flags() do? Is there any references to these functions? Thank you very much. Sincerely, K.C.> Cheers, > > Tim. > > > Any suggestion is appreciated. > > > > Thank you very much. > > Content-Description: ATT00001..txt > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > -- > Tim Deegan <Tim.Deegan@citrix.com> > Principal Software Engineer, XenServer Engineering > Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2010-Sep-29 08:45 UTC
Re: [Xen-devel] accumulate_guest_flags no longer exists in xen 3.4.3
Hi, At 08:08 +0100 on 29 Sep (1285747691), K.C. Lee wrote:> On Mon, Sep 27, 2010 at 5:51 PM, Tim Deegan <Tim.Deegan@citrix.com<mailto:Tim.Deegan@citrix.com>> wrote: > At 04:35 +0100 on 27 Sep (1285562121), K.C. Lee wrote: > I''m trying to figure out what xen does when a page fault happened so I > trace sh_page_fault() and then have many questions about what these > functions do and how can I use them.I hope you''re not trying to understand the shadow pagetable code jsut for fun! What is it that you want to do with it? I''m not going to try to explain the entire pagefault path but if you''re trying to add a feature then maybe I can help you with it - and with sending your changes upstream when they''re done, of course!> Would you please show me what paging_gva_to_gfn(), guest_walk_tables() > and accumulate_guest_flags() do? Is there any references to these functions?I admit that the shadow code is often, let''s say, opaque; but those functions have block comments right above where they''re declared. Cheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel