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

[Xen-devel] [RFC PATCH 0/4] arm/mem_access: Walk guest page tables in SW if mem_access is active



Hi all,

The function p2m_mem_access_check_and_get_page is called from the function
get_page_from_gva if mem_access is active and the hardware-aided translation of
the given guest virtual address (gva) into machine address fails. That is, if
the stage-2 translation tables constrain access to the guests's page tables,
hardware-assisted translation will fail. The idea of the function
p2m_mem_access_check_and_get_page is thus to translate the given gva and check
the requested access rights in software. However, as the current implementation
of p2m_mem_access_check_and_get_page makes use of the hardware-aided gva to ipa
translation, the translation might also fail because of reasons stated above
and will become equally relevant for the altp2m implementation on ARM.  As
such, we provide a software guest translation table walk to address the above
mentioned issue. We submit this patch series as an RFC to discuss the
appropriate location for the code and further functionality required to fix the
above concerns. 

Please note: The current implementation supports 64-bit and 32-bit guest
domains which use the long-descriptor translation table format. A software page
table walk for the 32-bit guests with a short-descriptor translation table
format is not yet supported.

The following patch series can be found on Github[0].

Cheers,
~Sergej

[0] https://github.com/sergej-proskurin/xen (branch arm-gpt-walk-v1)

Sergej Proskurin (4):
  arm/mem_access: Move TTBCR_SZ_MASK to processor.h
  arm/mem_access: Change value of TTBCR_SZ_MASK
  arm/mem_access: Add further TCR_EL1/TTBCR defines
  arm/mem_access: Add software guest-page-table walk

 xen/arch/arm/mem_access.c          | 140 ++++++++++++++++++++++++++++++++++++-
 xen/drivers/passthrough/arm/smmu.c |   1 -
 xen/include/asm-arm/processor.h    |   6 ++
 3 files changed, 145 insertions(+), 2 deletions(-)

-- 
2.12.2


_______________________________________________
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®.