| commit | 32279ef5c46ab5081638e87d8d4c89d940a1b4c1 | [log] [tgz] |
|---|---|---|
| author | Pierre-Clément Tosi <ptosi@google.com> | Thu Jun 29 10:46:59 2023 +0000 |
| committer | Pierre-Clément Tosi <ptosi@google.com> | Fri Jul 07 10:40:59 2023 +0000 |
| tree | bc13543d3dae82a9dfb8cf2c1a0e3253db51cea0 | |
| parent | 5ad1e8c18fcb86175f483d664a19f0604b28ec67 [diff] |
vmbase: Only lazy-map MMIO if hyp has MMIO_GUARD
Instead of MMIO_GUARD_MAP-ing all MMIO pages described in the DT (e.g.
for PCI), we lazy-map them in the MMU and only MMIO_GUARD_MAP in the
handler. This results in a greatly reduced number of pages being
mapped/unmapped with the hypervisor.
However, there is no point in doing so on hypervisors that don't support
MMIO_GUARD and the current architecture forces their backends to provide
stub mmio_guard_{,un}map() functions. Instead, create valid mappings for
those MMIO pages from the start, which will remove the need for the
stubs (addressed in a later commit) and won't involve the fault handler
on those platforms, in turn reducing the number of page table updates,
potentially improving performance.
No functional change intended on hypervisors that support MMIO_GUARD.
Test: atest DebugPolicyHostTests#testNoAdbInDebugPolicy_withDebugLevelNone_boots
Test: atest rialto_test vmbase_example.integration_test
Change-Id: Idde59d24c8bf848eac0ae5c38b3f7dede47863e3
This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.