[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 02/11] hvf: Add execute to dirty log permission bitmap
From: |
Alexander Graf |
Subject: |
[PATCH v9 02/11] hvf: Add execute to dirty log permission bitmap |
Date: |
Mon, 13 Sep 2021 01:07:48 +0200 |
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>
---
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 d1691be989..71cc2fa70f 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.30.1 (Apple Git-130)
- [PATCH v9 00/11] hvf: Implement Apple Silicon Support, Alexander Graf, 2021/09/12
- [PATCH v9 01/11] arm: Move PMC register definitions to cpu.h, Alexander Graf, 2021/09/12
- [PATCH v9 02/11] hvf: Add execute to dirty log permission bitmap,
Alexander Graf <=
- [PATCH v9 03/11] hvf: Introduce hvf_arch_init() callback, Alexander Graf, 2021/09/12
- [PATCH v9 05/11] arm/hvf: Add a WFI handler, Alexander Graf, 2021/09/12
- [PATCH v9 04/11] hvf: Add Apple Silicon support, Alexander Graf, 2021/09/12
- [PATCH v9 08/11] arm: Add Hypervisor.framework build target, Alexander Graf, 2021/09/12
- [PATCH v9 10/11] arm: tcg: Adhere to SMCCC 1.3 section 5.2, Alexander Graf, 2021/09/12
- [PATCH v9 09/11] hvf: arm: Add rudimentary PMC support, Alexander Graf, 2021/09/12
- [PATCH v9 06/11] hvf: arm: Implement -cpu host, Alexander Graf, 2021/09/12
- [PATCH v9 07/11] hvf: arm: Implement PSCI handling, Alexander Graf, 2021/09/12