[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6/7] x86/pagewalk: Consistently use guest_walk_*() helpers for translation



>>> On 01.03.17 at 17:33, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 01/03/17 16:22, Jan Beulich wrote:
>>>>> On 27.02.17 at 15:03, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> --- a/xen/arch/x86/mm/hap/guest_walk.c
>>> +++ b/xen/arch/x86/mm/hap/guest_walk.c
>>> @@ -98,7 +98,7 @@ unsigned long hap_p2m_ga_to_gfn(GUEST_PAGING_LEVELS)(
>>>      /* Interpret the answer */
>>>      if ( missing == 0 )
>>>      {
>>> -        gfn_t gfn = guest_l1e_get_gfn(gw.l1e);
>>> +        gfn_t gfn = guest_walk_to_gfn(&gw);
>>>          struct page_info *page;
>>>          page = get_page_from_gfn_p2m(p2m->domain, p2m, gfn_x(gfn), &p2mt,
>>>                                       NULL, P2M_ALLOC | P2M_UNSHARE);
>>> --- a/xen/arch/x86/mm/shadow/multi.c
>>> +++ b/xen/arch/x86/mm/shadow/multi.c
>>> @@ -3109,7 +3109,7 @@ static int sh_page_fault(struct vcpu *v,
>>>      }
>>>  
>>>      /* What mfn is the guest trying to access? */
>>> -    gfn = guest_l1e_get_gfn(gw.l1e);
>>> +    gfn = guest_walk_to_gfn(&gw);
>>>      gmfn = get_gfn(d, gfn, &p2mt);
>>>  
>>>      if ( shadow_mode_refcounts(d) &&
>> With these adjusted, guest_l1e_get_gfn() uses left are in shadow's
>> multi.c (presumably okay to stay)
> 
> Yes - they are purposefully looking at the L1 entry.
> 
>> and at the end of guest_walk_tables() itself. Is that latter one not also in 
>> need of
>> conversion, considering the PSE36 reference in the description?
> 
> Well - it gets swallowed up in "Re-implement the pagetable walker", but
> inside guest_walk_tables() itself, it is reasonable to rely on the
> internal details.

Okay, if it's left alone intentionally, then
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.