[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry
On Thu, Jul 28, 2016 at 8:51 AM, Julien Grall <julien.grall@xxxxxxx> wrote: > The function p2m_set_mem_access can be re-implemented using the generic > functions p2m_get_entry and __p2m_set_entry. > > Note that because of the implementation of p2m_get_entry, a TLB > invalidation instruction will be issued for each 4KB page. Therefore the > performance of memaccess will be impacted, however the function is now > safe on all the processors. > > Also the function apply_p2m_changes is dropped completely as it is not > unused anymore. Typo, (not *used*). [...] > @@ -2069,6 +1780,7 @@ long p2m_set_mem_access(struct domain *d, gfn_t gfn, > uint32_t nr, > { > struct p2m_domain *p2m = p2m_get_hostp2m(d); > p2m_access_t a; > + unsigned int order; > long rc = 0; > > static const p2m_access_t memaccess[] = { > @@ -2111,8 +1823,43 @@ long p2m_set_mem_access(struct domain *d, gfn_t gfn, > uint32_t nr, > return 0; > } > > - rc = apply_p2m_changes(d, MEMACCESS, gfn_add(gfn, start), > - (nr - start), INVALID_MFN, mask, 0, a); > + p2m_write_lock(p2m); > + > + for ( gfn = gfn_add(gfn, start); nr > start; gfn = gfn_add(gfn, 1UL << > order) ) Long line here (84 width). Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |