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. Also open code memblock_addrs_overlap() which doesn't exist in 5.15 and earlier. Bug: 278749606 Bug: 424382332 Reported-by:Bartłomiej Grzesik <bgrzesik@google.com> Suggested-by:
Will Deacon <willdeacon@google.com> Change-Id: I8f5498df25debb432b7dffd1e40a8910bcec7b49 Signed-off-by:
Quentin Perret <qperret@google.com>
Loading
Please sign in to comment