[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2] tools/libxc, xen/x86: Added xc_set_mem_access_multi()
On 09/02/2016 04:26 PM, Julien Grall wrote: > > > On 02/09/16 14:22, Razvan Cojocaru wrote: >> On 09/02/2016 04:17 PM, Julien Grall wrote: >>> Hello Razvan, >> >> Hello Julien, thanks for the email! >> >>> On 02/09/16 09:51, Razvan Cojocaru wrote: >>>> Currently it is only possible to set mem_access restrictions only for >>>> a contiguous range of GFNs (or, as a particular case, for a single GFN). >>>> This patch introduces a new libxc function taking an array of GFNs. >>>> The alternative would be to set each page in turn, using a userspace-HV >>>> roundtrip for each call, and triggering a TLB flush per page set. >>>> >>>> Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> >>>> >>>> --- >>>> Changes since V1 / RFC: >>>> - Renamed xc_set_mem_access_sparse() to xc_set_mem_access_multi(), >>>> and XENMEM_access_op_set_access_sparse to >>>> XENMEM_access_op_set_access_multi. >>>> - Renamed the 'nr' parameter to 'size'. >>>> - Wrapped long line in the implementation of xc_set_mem_access_multi(). >>>> - Factored out common code in _p2m_set_mem_access() (and modified >>>> p2m_set_altp2m_mem_access() in the process, to take an unsigned >>>> long argument instead of a gfn_t). >>>> - Factored out xenmem_access_t to p2m_access_t conversion code in >>>> p2m_xenmem_access_to_p2m_access(). >>>> - Added hypercall continuation support. >>>> - Added compat translation support. >>>> - No longer allocating buffers (now using copy_from_guest_offset()). >>>> - Added support for setting an array of access restrictions, as >>>> suggested by Tamas Lengyel. >>>> - This patch incorporates Jan Beulich's "memory: fix compat handling >>>> of XENMEM_access_op". >>>> --- >>>> tools/libxc/include/xenctrl.h | 4 ++ >>>> tools/libxc/xc_mem_access.c | 38 ++++++++++ >>>> xen/arch/x86/mm/p2m.c | 161 >>>> ++++++++++++++++++++++++++++++++---------- >>>> xen/common/compat/memory.c | 24 +++++-- >>>> xen/common/mem_access.c | 11 +++ >>>> xen/include/public/memory.h | 14 +++- >>>> xen/include/xen/p2m-common.h | 6 ++ >>> >>> p2m-common.h contains prototype common between ARM and x86. I would have >>> expected to see a change in the ARM port because of that. >> >> The only change to p2m-common.h is the addition of a single function, >> p2m_set_mem_access_multi(). As long as the ARM bits don't make use of >> it, there's nothing to modify there. > > p2m_set_mem_access_multi is called from common code. If you had tried > to build Xen on ARM you would have noticed a compilation error: > > prelink.o: In function `mem_access_memop': > /local/home/julieng/works/xen/xen/common/mem_access.c:80: undefined reference > to `p2m_set_mem_access_multi' > aarch64-linux-gnu-ld: /local/home/julieng/works/xen/xen/.xen-syms.0: hidden > symbol `p2m_set_mem_access_multi' isn't defined I see. Sorry about that. I'll fix that in V3. Thanks, Razvan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |