[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v2 0/4] Add mem_access support for PV domains
This patch series adds mem_access support for PV domains. To do this the PV domain domain has to be run with shadow paging. A p2m implementation for mem_access has been added to track the access permissions. Since special ring pages are not created for PV domains, this is done as part of enabling mem_access.This page is freed when mem_access is disabled or when the domain is destroyed. When mem_access is enabled for a PV domain, shadow paging is turned on and all the shadows are dropped. In the resulting pagefaults, the entries are created with the default access permissions. On future pagefaults, if there is a violation, a mem_event is sent to the mem_access listener who will then resolve it. The access permissions for individual pages are stored in the shadow_flags field in the page_info structure. To get the access permissions for individual pages, this field is referenced. To set the access permission of individual pages, the new permission is set in the shadow_flags and the shadow for the gmfn is dropped. On the resulting fault, the new PTE entry will be created with the new permission. A new API has been added to set the default access permissions for PV domains. Patches are based on top of commit f9cff088. Signed-off-by: Aravindh Puthiyaparambil <aravindp@xxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> x86/mm: Shadow and p2m changes for PV mem_access x86/mem_access: mem_access and mem_event changes to support PV domains tools/libxc: Add APIs for PV mem_access tool/xen-access: Add support for PV domains tools/libxc/xc_mem_access.c | 42 ++++++ tools/libxc/xc_mem_event.c | 23 +++- tools/libxc/xc_private.h | 9 ++ tools/libxc/xenctrl.h | 28 +++- tools/tests/xen-access/xen-access.c | 104 +++++++++------ xen/arch/x86/domain.c | 12 ++ xen/arch/x86/mm/Makefile | 2 +- xen/arch/x86/mm/mem_access.c | 244 ++++++++++++++++++++++++++++++++++- xen/arch/x86/mm/mem_event.c | 62 +++++++-- xen/arch/x86/mm/p2m-ma.c | 148 +++++++++++++++++++++ xen/arch/x86/mm/p2m.c | 52 +++++--- xen/arch/x86/mm/paging.c | 7 + xen/arch/x86/mm/shadow/common.c | 75 ++++++++++- xen/arch/x86/mm/shadow/multi.c | 101 ++++++++++++++- xen/arch/x86/mm/shadow/private.h | 7 + xen/arch/x86/srat.c | 1 + xen/arch/x86/usercopy.c | 12 ++ xen/common/page_alloc.c | 3 + xen/drivers/video/vesa.c | 1 + xen/include/asm-x86/domain.h | 9 ++ xen/include/asm-x86/mem_access.h | 3 + xen/include/asm-x86/mm.h | 1 - xen/include/asm-x86/p2m.h | 17 +++ xen/include/asm-x86/paging.h | 1 + xen/include/asm-x86/shadow.h | 15 +++ xen/include/asm-x86/x86_64/uaccess.h | 7 + xen/include/public/memory.h | 3 + 27 files changed, 899 insertions(+), 90 deletions(-) create mode 100644 xen/arch/x86/mm/p2m-ma.c -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |