summaryrefslogtreecommitdiffstats
path: root/target/riscv/cpu.h
diff options
context:
space:
mode:
authorAlistair Francis2020-02-01 02:01:54 +0100
committerPalmer Dabbelt2020-02-27 22:45:29 +0100
commitc7b1bbc80fc2af17395d3986c346fd2307e57829 (patch)
treeefc0b420295dc152e2d5fa47dfd500a4611d6871 /target/riscv/cpu.h
parenttarget/riscv: Add the virtulisation mode (diff)
downloadqemu-c7b1bbc80fc2af17395d3986c346fd2307e57829.tar.gz
qemu-c7b1bbc80fc2af17395d3986c346fd2307e57829.tar.xz
qemu-c7b1bbc80fc2af17395d3986c346fd2307e57829.zip
target/riscv: Add the force HS exception mode
Add a FORCE_HS_EXCEP mode to the RISC-V virtulisation status. This bit specifies if an exeption should be taken to HS mode no matter the current delegation status. This is used when an exeption must be taken to HS mode, such as when handling interrupts. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'target/riscv/cpu.h')
-rw-r--r--target/riscv/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index a9cbd8584e..42720d65f9 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -273,6 +273,8 @@ bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt_request);
bool riscv_cpu_fp_enabled(CPURISCVState *env);
bool riscv_cpu_virt_enabled(CPURISCVState *env);
void riscv_cpu_set_virt_enabled(CPURISCVState *env, bool enable);
+bool riscv_cpu_force_hs_excep_enabled(CPURISCVState *env);
+void riscv_cpu_set_force_hs_excep(CPURISCVState *env, bool enable);
int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch);
hwaddr riscv_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
void riscv_cpu_do_unaligned_access(CPUState *cs, vaddr addr,