Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/nvmm/nvmm-all.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
index ed424251673..2e442baf4b7 100644
--- a/target/i386/nvmm/nvmm-all.c
+++ b/target/i386/nvmm/nvmm-all.c
@@ -15,6 +15,7 @@
#include "accel/accel-ops.h"
#include "system/nvmm.h"
#include "system/cpus.h"
+#include "system/memory.h"
#include "system/runstate.h"
#include "qemu/main-loop.h"
#include "qemu/error-report.h"
@@ -516,7 +517,9 @@ nvmm_io_callback(struct nvmm_io *io)
static void
nvmm_mem_callback(struct nvmm_mem *mem)
{
- cpu_physical_memory_rw(mem->gpa, mem->data, mem->size, mem->write);
+ /* TODO: Get CPUState via mem->vcpu? */
+ address_space_rw(&address_space_memory, mem->gpa, MEMTXATTRS_UNSPECIFIED,
+ mem->data, mem->size, mem->write);
/* Needed, otherwise infinite loop. */
current_cpu->vcpu_dirty = false;
--
2.51.0