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

Re: [Xen-devel] [PATCH for-4.5 v8 19/19] tools/tests: Enable xen-access on ARM





On Wed, Sep 24, 2014 at 5:12 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
On Tue, 2014-09-23 at 15:14 +0200, Tamas K Lengyel wrote:
> Define the ARM specific test_and_set_bit functions and switch
> to use maximum gpfn as the limit to setting permissions. Also,
> move HAS_MEM_ACCESS definition into config.

Please could you mention the removal of the x86 comment about atomicity
here, since the reasoning for its correctness will be of interest to
future code archaeologists.

Ack. I'm still hoping we can figure out if its the code or the comments that's wrong. I tend to think its the comment as it smells like a copy-paste.
 

> -    rc = xc_set_mem_access(xch, domain_id, default_access, 0,
> -                           xenaccess->domain_info->max_pages);
> +    rc = xc_set_mem_access(xch, domain_id, default_access, START_PFN,
> +                           (xenaccess->max_gpfn - START_PFN) );

So the reason why info->max_pages is no use any more is because ARM
starts at non-zero and has multiple banks?

I suppose that's fair enough.

Ian.


Yeap. It's not a problem to start at 0, this is just a bit of optimization from the user's side that I would consider best-practice. The user could also include some logic to skip the hole in-between the banks (if there are multiple banks), but that I felt is too much complexity to include here.

Tamas
_______________________________________________
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®.