Commit c29addd9 authored by Vincent Donnefort's avatar Vincent Donnefort Committed by Treehugger Robot
Browse files

ANDROID: KVM: arm64: Guest page CMOs with PMD_SIZE fixmap at EL2



With the introduction of THP support in the pKVM hypervisor, guest pages
COM is needed for PMD_SIZE mapping. Fixmap only supports PAGE_SIZE and
iterating over the huge-page is time consuming (mostly due to TLBI on
hyp_fixmap_unmap) which is a problem for EL2 latency.

Introduce a shared PMD_SIZE fixmap (hyp_fixblock_map/hyp_fixblock_unmap)
to improve guest page CMOs with THP support.

The iterative solution resulted in a latency of ~700us on Pixel6, while
the shared PMD_SIZE fixmap reduces it to ~100us.

Bug: 357781595
Bug: 278011447
Change-Id: I2ee5034ce6c6e63c4a385c884fc3b6fa378e8155
Signed-off-by: default avatarVincent Donnefort <vdonnefort@google.com>
[ qperret: reworked the private range allocation to avoid transiently
  releasing the page-table lock and remove the ->level member ]
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
parent 78b312e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment