Commit 56cc2246 authored by Quentin Perret's avatar Quentin Perret Committed by Treehugger Robot
Browse files

ANDROID: BACKPORT: KVM: arm64: Always unmap the pvmfw region at stage-2



The donation of the pvmfw region to pKVM is currently done transparently
as part of fix_host_ownership(). However, this function only runs over PA
ranges covered by the memblock list, although there is no guarantee for
the pvmfw region to be advertised in a memory node in DT. In this case,
the pKVM init will appear to succeed while silently keeping valid host
stage-2 mappings to the pvmfw region.

Fix this by forcefully registering the pvmfw region in the pKVM memblock
list.

BACKPORT: Fix usage of pvmfw_size and pvmfw_base which are pointers in
6.6 and earlier.

Bug: 278749606
Bug: 424382332
Reported-by: default avatarBartłomiej Grzesik <bgrzesik@google.com>
Suggested-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: I8f5498df25debb432b7dffd1e40a8910bcec7b49
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
parent 3a0107a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment