summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-29 15:51:33 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-10-07 05:03:56 +0200
commit04979ddde45f1064aa98317172b0a5b99b4b4d39 (patch)
tree3ef8f86db255315e1605078a1724a590f838e5af
parent2fd38d9c2944efef3b96fe9047b3c0f4d4e25eb4 (diff)
downloadfocaccia-qemu-04979ddde45f1064aa98317172b0a5b99b4b4d39.tar.gz
focaccia-qemu-04979ddde45f1064aa98317172b0a5b99b4b4d39.zip
target/i386/whpx: Replace legacy cpu_physical_memory_rw() call
Get the vCPU address space and convert the legacy
cpu_physical_memory_rw() by address_space_rw().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251002084203.63899-10-philmd@linaro.org>
-rw-r--r--target/i386/whpx/whpx-all.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 2a85168ed5..256761834c 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -788,8 +788,11 @@ static HRESULT CALLBACK whpx_emu_mmio_callback(
     void *ctx,
     WHV_EMULATOR_MEMORY_ACCESS_INFO *ma)
 {
-    cpu_physical_memory_rw(ma->GpaAddress, ma->Data, ma->AccessSize,
-                           ma->Direction);
+    CPUState *cs = (CPUState *)ctx;
+    AddressSpace *as = cpu_addressspace(cs, MEMTXATTRS_UNSPECIFIED);
+
+    address_space_rw(as, ma->GpaAddress, MEMTXATTRS_UNSPECIFIED,
+                     ma->Data, ma->AccessSize, ma->Direction);
     return S_OK;
 }