#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "accel/accel-ops.h"
+#include "exec/cpu-common.h"
#include "system/address-spaces.h"
#include "system/memory.h"
#include "system/hvf.h"
static void do_hv_vm_protect(hwaddr start, size_t size,
hv_memory_flags_t flags)
{
+ intptr_t page_mask = qemu_real_host_page_mask();
hv_return_t ret;
trace_hvf_vm_protect(start, size, flags,
flags & HV_MEMORY_READ ? 'R' : '-',
flags & HV_MEMORY_WRITE ? 'W' : '-',
flags & HV_MEMORY_EXEC ? 'X' : '-');
+ g_assert(!((uintptr_t)start & ~page_mask));
+ g_assert(!(size & ~page_mask));
ret = hv_vm_protect(start, size, flags);
assert_hvf_ok(ret);