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

[Xen-devel] [PATCH v3 00/38] arm/altp2m: Introducing altp2m to ARM



Hello all,

The following patch series can be found on Github[0] and is part of my
contribution to this year's Google Summer of Code (GSoC)[1]. My project is
managed by the organization The Honeynet Project. As part of GSoC, I am being
supervised by the Xen developer Tamas K. Lengyel <tamas@xxxxxxxxxxxxx>, George
D. Webster, and Steven Maresca.

In this patch series, we provide an implementation of the altp2m subsystem for
ARM. Our implementation is based on the altp2m subsystem for x86, providing
additional --alternate-- views on the guest's physical memory by means of the
ARM 2nd stage translation mechanism. The patches introduce new HVMOPs and
extend the p2m subsystem. Also, we extend libxl to support altp2m on ARM and
modify xen-access to test the suggested functionality.

To be more precise, altp2m allows to create and switch to additional p2m views
(i.e. gfn to mfn mappings). These views can be manipulated and activated as
will through the provided HVMOPs. In this way, the active guest instance in
question can seamlessly proceed execution without noticing that anything has
changed. The prime scope of application of altp2m is Virtual Machine
Introspection, where guest systems are analyzed from the outside of the VM.

Altp2m can be activated by means of the guest control parameter "altp2m" on x86
and ARM architectures. For use-cases requiring purely external access to
altp2m, this patch allows to specify if the altp2m interface should be external
only.

The current code-base is based on Julien Grall's branch p2m-rfc[2].

Please note: To work properly, the provided patch must include the fix that has
been presented in [3]. The fix makes sure that the flag p2m->mem_access_enabled
is considered during the manipulation of (alt)p2m entries.

Best regards,
~Sergej

[0] https://github.com/sergej-proskurin/xen (branch arm-altp2m-v3)
[1] https://summerofcode.withgoogle.com/projects/#4970052843470848
[2] git://xenbits.xen.org/people/julieng/xen-unstable.git (branch p2m-rfc)
[3] https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg01870.html

Sergej Proskurin (37):
  arm/p2m: Cosmetic fixes - apply p2m_get_hostp2m
  arm/p2m: Expose p2m_*lock helpers
  arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags
  arm/p2m: Add first altp2m HVMOP stubs
  arm/p2m: Add hvm_allow_(set|get)_param
  arm/p2m: Add HVMOP_altp2m_get_domain_state
  arm/p2m: Introduce p2m_is_(hostp2m|altp2m)
  arm/p2m: Free p2m entries only in the hostp2m
  arm/p2m: Add backpointer to the domain in p2m_domain
  arm/p2m: Move hostp2m init/teardown to individual functions
  arm/p2m: Cosmetic fix - function prototype of p2m_alloc_table
  arm/p2m: Rename parameter in p2m_alloc_vmid
  arm/p2m: Change func prototype and impl of p2m_(alloc|free)_vmid
  arm/p2m: Add altp2m init/teardown routines
  arm/p2m: Add altp2m table flushing routine
  arm/p2m: Add HVMOP_altp2m_set_domain_state
  arm/p2m: Add HVMOP_altp2m_create_p2m
  arm/p2m: Add HVMOP_altp2m_destroy_p2m
  arm/p2m: Add HVMOP_altp2m_switch_p2m
  arm/p2m: Add p2m_get_active_p2m macro
  arm/p2m: Make p2m_restore_state ready for altp2m
  arm/p2m: Make get_page_from_gva ready for altp2m
  arm/p2m: Cosmetic fixes -- __p2m_get_mem_access
  arm/p2m: Make p2m_mem_access_check ready for altp2m
  arm/p2m: Cosmetic fixes - function prototypes
  arm/p2m: Introduce helpers managing altp2m entries
  arm/p2m: Introduce p2m_lookup_attr
  arm/p2m: Modify reference count only if hostp2m active
  arm/p2m: Add HVMOP_altp2m_set_mem_access
  arm/p2m: Add altp2m_propagate_change
  altp2m: Introduce altp2m_switch_vcpu_altp2m_by_id
  arm/p2m: Code movement in instr/data abort handlers
  arm/p2m: Add altp2m paging mechanism
  arm/p2m: Add HVMOP_altp2m_change_gfn
  arm/p2m: Adjust debug information to altp2m
  arm/p2m: Extend xen-access for altp2m on ARM
  arm/p2m: Add test of xc_altp2m_change_gfn

Tamas K Lengyel (1):
  altp2m: Allow specifying external-only use-case

 docs/man/xl.cfg.pod.5.in            |  37 ++-
 tools/libxl/libxl.h                 |  10 +-
 tools/libxl/libxl_create.c          |   7 +-
 tools/libxl/libxl_dom.c             |  30 +-
 tools/libxl/libxl_types.idl         |  13 +
 tools/libxl/xl_cmdimpl.c            |  25 +-
 tools/tests/xen-access/xen-access.c | 183 ++++++++++-
 xen/arch/arm/Makefile               |   1 +
 xen/arch/arm/altp2m.c               | 627 ++++++++++++++++++++++++++++++++++++
 xen/arch/arm/hvm.c                  | 210 +++++++++++-
 xen/arch/arm/p2m.c                  | 452 +++++++++++++++++++-------
 xen/arch/arm/traps.c                |  65 +++-
 xen/arch/x86/hvm/hvm.c              |  20 +-
 xen/arch/x86/mm/altp2m.c            |   6 +
 xen/arch/x86/mm/p2m.c               |   6 -
 xen/common/vm_event.c               |   3 +-
 xen/include/asm-arm/altp2m.h        |  77 ++++-
 xen/include/asm-arm/domain.h        |  16 +
 xen/include/asm-arm/p2m.h           |  85 ++++-
 xen/include/asm-x86/altp2m.h        |   3 +
 xen/include/asm-x86/p2m.h           |   3 -
 xen/include/public/hvm/params.h     |  10 +-
 xen/include/xsm/dummy.h             |  14 +-
 xen/include/xsm/xsm.h               |   6 +-
 xen/xsm/flask/hooks.c               |   2 +-
 25 files changed, 1718 insertions(+), 193 deletions(-)
 create mode 100644 xen/arch/arm/altp2m.c

--
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.