mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (2/3)
Commit b7ecba0f6f ("docs/devel/loads-stores.rst: Document our
various load and store APIs") mentioned cpu_physical_memory_*()
methods are legacy, the replacement being address_space_*().
Replace the *_map() / *_unmap() methods in cpu_[un]map_lowcore().
No behavioral change expected.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251002091132.65703-7-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
committed by
Thomas Huth
parent
c35b166c1d
commit
64321858d0
@@ -26,6 +26,7 @@
|
||||
#include "hw/s390x/ioinst.h"
|
||||
#include "target/s390x/kvm/pv.h"
|
||||
#include "system/hw_accel.h"
|
||||
#include "system/memory.h"
|
||||
#include "system/runstate.h"
|
||||
#include "exec/target_page.h"
|
||||
#include "exec/watchpoint.h"
|
||||
@@ -107,11 +108,13 @@ LowCore *cpu_map_lowcore(CPUS390XState *env)
|
||||
{
|
||||
LowCore *lowcore;
|
||||
hwaddr len = sizeof(LowCore);
|
||||
CPUState *cs = env_cpu(env);
|
||||
const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
|
||||
|
||||
lowcore = cpu_physical_memory_map(env->psa, &len, true);
|
||||
lowcore = address_space_map(cs->as, env->psa, &len, true, attrs);
|
||||
|
||||
if (len < sizeof(LowCore)) {
|
||||
cpu_abort(env_cpu(env), "Could not map lowcore\n");
|
||||
cpu_abort(cs, "Could not map lowcore\n");
|
||||
}
|
||||
|
||||
return lowcore;
|
||||
@@ -119,7 +122,9 @@ LowCore *cpu_map_lowcore(CPUS390XState *env)
|
||||
|
||||
void cpu_unmap_lowcore(CPUS390XState *env, LowCore *lowcore)
|
||||
{
|
||||
cpu_physical_memory_unmap(lowcore, sizeof(LowCore), 1, sizeof(LowCore));
|
||||
AddressSpace *as = env_cpu(env)->as;
|
||||
|
||||
address_space_unmap(as, lowcore, sizeof(LowCore), true, sizeof(LowCore));
|
||||
}
|
||||
|
||||
void do_restart_interrupt(CPUS390XState *env)
|
||||
|
||||
Reference in New Issue
Block a user