]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/i386/whpx: Replace legacy cpu_physical_memory_rw() call
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Sep 2025 13:51:33 +0000 (15:51 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 7 Oct 2025 03:03:56 +0000 (05:03 +0200)
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>

target/i386/whpx/whpx-all.c

index 2a85168ed51a5d7221847a973ecb0d642e0dd93f..256761834c9759079ad778f9b5069b314b6ba6f7 100644 (file)
@@ -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;
 }