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>
This commit is contained in:
parent
04979ddde4
commit
12a65afbbf
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue