On 10/28/25 06:42, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  target/i386/hvf/hvf.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 16febbac48f..c0b2352b988 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -76,7 +76,7 @@
  #include "qemu/main-loop.h"
  #include "qemu/accel.h"
  #include "target/i386/cpu.h"
-#include "exec/target_page.h"
+#include "exec/cpu-common.h"
static Error *invtsc_mig_blocker; @@ -137,9 +137,9 @@ static bool ept_emulation_fault(hvf_slot *slot, uint64_t gpa, uint64_t ept_qual) if (write && slot) {
          if (slot->flags & HVF_SLOT_LOG) {
-            uint64_t dirty_page_start = gpa & ~(TARGET_PAGE_SIZE - 1u);
+            uint64_t dirty_page_start = gpa & qemu_real_host_page_mask();
              memory_region_set_dirty(slot->region, gpa - slot->start, 1);
-            hv_vm_protect(dirty_page_start, TARGET_PAGE_SIZE,
+            hv_vm_protect(dirty_page_start, qemu_real_host_page_size(),
                            HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC);
          }
      }

Call qemu_real_host_page_size once -- page_mask is -size.

We could get away with TARGET_PAGE_SIZE here, due to x86 and it's fixed 4k page size. But it's better for consistency.


Reviewed-by: Richard Henderson <[email protected]>


r~

Reply via email to