[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/27] hvf: Add execute to dirty log permission bitmap
From: |
Peter Maydell |
Subject: |
[PULL 08/27] hvf: Add execute to dirty log permission bitmap |
Date: |
Mon, 20 Sep 2021 15:19:28 +0100 |
From: Alexander Graf <agraf@csgraf.de>
Hvf's permission bitmap during and after dirty logging does not include
the HV_MEMORY_EXEC permission. At least on Apple Silicon, this leads to
instruction faults once dirty logging was enabled.
Add the bit to make it work properly.
Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20210916155404.86958-3-agraf@csgraf.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
accel/hvf/hvf-accel-ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index d1691be9896..71cc2fa70fa 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -239,12 +239,12 @@ static void hvf_set_dirty_tracking(MemoryRegionSection
*section, bool on)
if (on) {
slot->flags |= HVF_SLOT_LOG;
hv_vm_protect((uintptr_t)slot->start, (size_t)slot->size,
- HV_MEMORY_READ);
+ HV_MEMORY_READ | HV_MEMORY_EXEC);
/* stop tracking region*/
} else {
slot->flags &= ~HVF_SLOT_LOG;
hv_vm_protect((uintptr_t)slot->start, (size_t)slot->size,
- HV_MEMORY_READ | HV_MEMORY_WRITE);
+ HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC);
}
}
--
2.20.1
- [PULL 00/27] target-arm queue, Peter Maydell, 2021/09/20
- [PULL 03/27] target/arm: Don't skip M-profile reset entirely in user mode, Peter Maydell, 2021/09/20
- [PULL 06/27] hw/intc: Set GIC maintenance interrupt level to only 0 or 1, Peter Maydell, 2021/09/20
- [PULL 04/27] target/arm: Always clear exclusive monitor on reset, Peter Maydell, 2021/09/20
- [PULL 07/27] arm: Move PMC register definitions to internals.h, Peter Maydell, 2021/09/20
- [PULL 12/27] hvf: arm: Implement -cpu host, Peter Maydell, 2021/09/20
- [PULL 10/27] hvf: Add Apple Silicon support, Peter Maydell, 2021/09/20
- [PULL 01/27] elf2dmp: Check curl_easy_setopt() return value, Peter Maydell, 2021/09/20
- [PULL 09/27] hvf: Introduce hvf_arch_init() callback, Peter Maydell, 2021/09/20
- [PULL 08/27] hvf: Add execute to dirty log permission bitmap,
Peter Maydell <=
- [PULL 05/27] target/arm: Consolidate ifdef blocks in reset, Peter Maydell, 2021/09/20
- [PULL 11/27] arm/hvf: Add a WFI handler, Peter Maydell, 2021/09/20
- [PULL 13/27] hvf: arm: Implement PSCI handling, Peter Maydell, 2021/09/20
- [PULL 15/27] hvf: arm: Add rudimentary PMC support, Peter Maydell, 2021/09/20
- [PULL 20/27] target/arm: Optimize MVE arithmetic ops, Peter Maydell, 2021/09/20
- [PULL 21/27] target/arm: Optimize MVE VNEG, VABS, Peter Maydell, 2021/09/20
- [PULL 24/27] target/arm: Optimize MVE VSHL, VSHR immediate forms, Peter Maydell, 2021/09/20
- [PULL 16/27] target/arm: Avoid goto_tb if we're trying to exit to the main loop, Peter Maydell, 2021/09/20
- [PULL 26/27] target/arm: Optimize MVE VSLI and VSRI, Peter Maydell, 2021/09/20
- [PULL 19/27] target/arm: Optimize MVE logic ops, Peter Maydell, 2021/09/20