mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
Revert "Revert "ANDROID: KVM: arm64: Unmap S2MPU MMIO regions in MPT""
This reverts commit d52e3e4473.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I465cb99696ef1aba22a8cb575736b81773e47831
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
#include <nvhe/memory.h>
|
||||
#include <nvhe/mem_protect.h>
|
||||
#include <nvhe/mm.h>
|
||||
#include <nvhe/spinlock.h>
|
||||
#include <nvhe/trap_handler.h>
|
||||
@@ -452,6 +453,11 @@ static int s2mpu_init(void)
|
||||
*/
|
||||
for_each_powered_s2mpu(dev)
|
||||
initialize_with_mpt(dev, &kvm_hyp_host_mpt);
|
||||
|
||||
/* Prevent DMA to the S2MPU MMIO regions. */
|
||||
for_each_s2mpu(dev)
|
||||
s2mpu_host_stage2_set_owner(dev->pa, S2MPU_MMIO_SIZE, pkvm_hyp_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user