]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target/riscv/pmp.c
target/riscv: Deny access if access is partially inside the PMP entry
[mirror_qemu.git] / target / riscv / pmp.c
index 37e9985d6a3994af88400c4eb149c5f6ba8e3efe..418738afd8b8fcacb0fb0d649f2989c97d765352 100644 (file)
@@ -327,8 +327,8 @@ bool pmp_hart_has_privs(CPURISCVState *env, target_ulong addr,
         if ((s + e) == 1) {
             qemu_log_mask(LOG_GUEST_ERROR,
                           "pmp violation - access is partially inside\n");
-            ret = false;
-            break;
+            *allowed_privs = 0;
+            return false;
         }
 
         /* fully inside */