summary refs log tree commit diff stats
path: root/target/i386/kvm/xen-emu.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-29 15:47:18 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-10-07 05:03:56 +0200
commit12a65afbbfd8bef09cafb1e0e7883c30ddc1c956 (patch)
tree2588c6f05232563b98e0303528bf09cece3eb109 /target/i386/kvm/xen-emu.c
parent04979ddde45f1064aa98317172b0a5b99b4b4d39 (diff)
downloadfocaccia-qemu-12a65afbbfd8bef09cafb1e0e7883c30ddc1c956.tar.gz
focaccia-qemu-12a65afbbfd8bef09cafb1e0e7883c30ddc1c956.zip
target/i386/kvm: 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-11-philmd@linaro.org>
Diffstat (limited to 'target/i386/kvm/xen-emu.c')
-rw-r--r--target/i386/kvm/xen-emu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c
index 284c5ef6f6..52de019834 100644
--- a/target/i386/kvm/xen-emu.c
+++ b/target/i386/kvm/xen-emu.c
@@ -21,6 +21,7 @@
 #include "system/address-spaces.h"
 #include "xen-emu.h"
 #include "trace.h"
+#include "system/memory.h"
 #include "system/runstate.h"
 
 #include "hw/pci/msi.h"
@@ -75,6 +76,7 @@ static bool kvm_gva_to_gpa(CPUState *cs, uint64_t gva, uint64_t *gpa,
 static int kvm_gva_rw(CPUState *cs, uint64_t gva, void *_buf, size_t sz,
                       bool is_write)
 {
+    AddressSpace *as = cpu_addressspace(cs, MEMTXATTRS_UNSPECIFIED);
     uint8_t *buf = (uint8_t *)_buf;
     uint64_t gpa;
     size_t len;
@@ -87,7 +89,7 @@ static int kvm_gva_rw(CPUState *cs, uint64_t gva, void *_buf, size_t sz,
             len = sz;
         }
 
-        cpu_physical_memory_rw(gpa, buf, len, is_write);
+        address_space_rw(as, gpa, MEMTXATTRS_UNSPECIFIED, buf, len, is_write);
 
         buf += len;
         sz -= len;