All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Tamas K Lengyel <tlengyel@novetta.com>
Cc: Keir Fraser <keir@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>,
	xen-devel@lists.xen.org,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access
Date: Thu, 25 Jun 2015 11:27:37 +0100	[thread overview]
Message-ID: <1435228057.32500.30.camel@citrix.com> (raw)
In-Reply-To: <877fqu8k8s.fsf@vitty.brq.redhat.com>

On Tue, 2015-06-23 at 18:25 +0200, Vitaly Kuznetsov wrote:
> "Jan Beulich" <JBeulich@suse.com> writes:
> 
> >>>> On 26.05.15 at 15:32, <vkuznets@redhat.com> 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.

Ian.

  reply	other threads:[~2015-06-25 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 13:32 [PATCH] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access Vitaly Kuznetsov
2015-05-26 14:23 ` Jan Beulich
2015-06-23 16:25   ` Vitaly Kuznetsov
2015-06-25 10:27     ` Ian Campbell [this message]
2015-06-25 11:35       ` Razvan Cojocaru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435228057.32500.30.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=tlengyel@novetta.com \
    --cc=vkuznets@redhat.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.