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

Re: [Xen-devel] [PATCH] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access


  • To: Ian Campbell <ian.campbell@xxxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Tamas K Lengyel <tlengyel@xxxxxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 25 Jun 2015 14:35:31 +0300
  • Cc: Keir Fraser <keir@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, xen-devel@xxxxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Thu, 25 Jun 2015 11:35:28 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=sNo/losVn3+3vyYToerxnhos1C0EYyEa36Wi0fGkWPcGILAOgGKk2ffljmv64eKsqg85o/66jNGYm2HOTPKd5qhm22zswr7UaCE2e1tCGluMewvGtdu47pGR2Xy8w3kbH/IbIJNRmhNuu+2FOsP9PCW5deop8/ehXwLo0QXv+IyFXJKOuzQ7+2GI4kBJuIt+bNaFimSSsJHgUz/KiopcqPOPSeIvrUQjEWGyxhXVHhVFSyDBoNkr6akfX3luDYyWDBqUjjEPEQ/Fpp/azwY9gDkn2vWFSgIVxkG2bjDTuMPy1nl6fWIrYD9k7O/0q87szrRAg8IHz1z1hvV/AKnebA==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 06/25/2015 01:27 PM, Ian Campbell wrote:
> On Tue, 2015-06-23 at 18:25 +0200, Vitaly Kuznetsov wrote:
>> "Jan Beulich" <JBeulich@xxxxxxxx> writes:
>>
>>>>>> On 26.05.15 at 15:32, <vkuznets@xxxxxxxxxx> wrote:
>>>> --- a/xen/arch/arm/p2m.c
>>>> +++ b/xen/arch/arm/p2m.c
>>>> @@ -1709,9 +1709,9 @@ bool_t p2m_mem_access_check(paddr_t gpa, vaddr_t 
>>>> gla, 
>>>> const struct npfec npfec)
>>>>  
>>>>  /*
>>>>   * Set access type for a region of pfns.
>>>> - * If start_pfn == -1ul, sets the default access type.
>>>> + * If start_gfn == -1ul, sets the default access type.
>>>>   */
>>>> -long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
>>>> +long p2m_set_mem_access(struct domain *d, unsigned long start_gfn, 
>>>> uint32_t nr,
>>>>                          uint32_t start, uint32_t mask, xenmem_access_t 
>>>> access)
>>>>  {
>>>>      struct p2m_domain *p2m = p2m_get_hostp2m(d);
>>>> @@ -1752,14 +1752,15 @@ long p2m_set_mem_access(struct domain *d, unsigned 
>>>> long pfn, uint32_t nr,
>>>>      p2m->mem_access_enabled = true;
>>>>  
>>>>      /* If request to set default access. */
>>>> -    if ( pfn == ~0ul )
>>>> +    if ( start_gfn == ~0ul )
>>>>      {
>>>>          p2m->default_access = a;
>>>>          return 0;
>>>>      }
>>>>  
>>>>      rc = apply_p2m_changes(d, MEMACCESS,
>>>> -                           pfn_to_paddr(pfn+start), pfn_to_paddr(pfn+nr),
>>>> +                           pfn_to_paddr(start_gfn + start),
>>>
>>> Particularly due to this expression I'm not really happy about the
>>> start_ prefix that you're adding here, but I'll let the maintainers
>>> of the respective pieces of code decide if they're happy with it.
>>
>> Sorry for the ping but it has been almost one month...
> 
> Sorry, I must have missed this one, pinging was absolutely the right
> thing to do (after a week or two would have been fine, no need to wait a
> month).
> 
> I'm not super keen on the start_ prefix either, but I would prefer
> consistency between arm and x86 here more than I object to the prefix.
> IOW my preference would be to drop it everywhere, but if x86 folks
> prefer to keep it then I don't mind but ARM should keep it too.
> 
> I've also copied the (new) mem access maintainers in case they have an
> opinion.

FWIW, I agree with you and Jan, the start_ prefix makes it a bit
confusing. And again FWIW, I have no problem with this being changed for
both x86 and ARM.


Regards,
Razvan

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


 


Rackspace

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