Hello Razvan,
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 <rcojoc...@bitdefender.com>
---
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.
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel