target/riscv: Set access as data_load when validating stage-2 PTEs

Backports commit efe9f9c820d1322729957a60ff785c9527a79ddf from qemu
This commit is contained in:
Alistair Francis 2021-02-25 11:54:20 -05:00 committed by Lioncash
parent 5c3a2f391c
commit a6c323c912

View file

@ -429,7 +429,7 @@ restart:
hwaddr vbase;
/* Do the second stage translation on the base PTE address. */
get_physical_address(env, &vbase, &vbase_prot, base, access_type,
get_physical_address(env, &vbase, &vbase_prot, base, MMU_DATA_LOAD,
mmu_idx, false, true);
pte_addr = vbase + idx * ptesize;