diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-28 06:17:07 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:09 -0500 |
commit | 382a04afa075927d843f11e9fb8c450a084bbfa8 (patch) | |
tree | 566397c376216fced1e90480381e5c68becc1684 /target/s390x/mmu_helper.c | |
parent | 82e69054656f86d00b263437ad04395a5f834248 (diff) |
s390x: do not use ram_size global
Use the machine properties instead.
Cc: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/s390x/mmu_helper.c')
-rw-r--r-- | target/s390x/mmu_helper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 7d9f3059cd..d492b23a17 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -27,6 +27,7 @@ #include "trace.h" #include "hw/hw.h" #include "hw/s390x/storage-keys.h" +#include "hw/boards.h" /* Fetch/store bits in the translation exception code: */ #define FS_READ 0x800 @@ -292,10 +293,11 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) { static S390SKeysClass *skeyclass; static S390SKeysState *ss; + MachineState *ms = MACHINE(qdev_get_machine()); uint8_t key; int rc; - if (unlikely(addr >= ram_size)) { + if (unlikely(addr >= ms->ram_size)) { return; } |