diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-04-03 15:54:59 -0700 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-06-19 08:24:07 -0700 |
commit | 2761db5fc20943bbd606b6fd49640ac000398de6 (patch) | |
tree | 68ceab5f2c048cdb72f43e69b41a8bbbf3b183f1 /target/riscv/helper.h | |
parent | b8429ded723ec52568e05f6a24ed78c93224687c (diff) | |
download | qemu-2761db5fc20943bbd606b6fd49640ac000398de6.zip qemu-2761db5fc20943bbd606b6fd49640ac000398de6.tar.gz qemu-2761db5fc20943bbd606b6fd49640ac000398de6.tar.bz2 |
target/riscv: Implement checks for hfence
Call the helper_hyp_tlb_flush() function on hfence instructions which
will generate an illegal insruction execption if we don't have
permission to flush the Hypervisor level TLBs.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/riscv/helper.h')
-rw-r--r-- | target/riscv/helper.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/riscv/helper.h b/target/riscv/helper.h index debb22a..b36be97 100644 --- a/target/riscv/helper.h +++ b/target/riscv/helper.h @@ -76,3 +76,8 @@ DEF_HELPER_2(mret, tl, env, tl) DEF_HELPER_1(wfi, void, env) DEF_HELPER_1(tlb_flush, void, env) #endif + +/* Hypervisor functions */ +#ifndef CONFIG_USER_ONLY +DEF_HELPER_1(hyp_tlb_flush, void, env) +#endif |