]> git.proxmox.com Git - mirror_qemu.git/commit
riscv: Make sure an exception is raised if a pte is malformed
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Thu, 20 Apr 2023 15:02:20 +0000 (17:02 +0200)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 5 May 2023 00:49:50 +0000 (10:49 +1000)
commit190e9f8ec1b79f22097e9bf4aaa93aad7bd7fe69
tree4fa45b0c32d79c3fd51ae273ae0e831ed4ea61ed
parent7bf14a2f3792a421321ba1087f1b8b16773bf9cd
riscv: Make sure an exception is raised if a pte is malformed

As per the specification, in 64-bit, if any of the pte reserved bits
60-54 is set an exception should be triggered (see 4.4.1, "Addressing and
Memory Protection"). In addition, we must check the napot/pbmt bits are
not set if those extensions are not active.

Reported-by: Andrea Parri <andrea@rivosinc.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230420150220.60919-1-alexghiti@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_bits.h
target/riscv/cpu_helper.c