提交 e26131c9 编写于 作者: D David Hildenbrand 提交者: Cornelia Huck

s390x/tcg: make testblock use the new _real mmu

Low address protection checks will be moved into the mmu later.
Signed-off-by: NDavid Hildenbrand <david@redhat.com>
Message-Id: <20170926183318.12995-6-david@redhat.com>
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: NThomas Huth <thuth@redhat.com>
Signed-off-by: NCornelia Huck <cohuck@redhat.com>
上级 4ae43341
...@@ -1688,17 +1688,9 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr) ...@@ -1688,17 +1688,9 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
{ {
uintptr_t ra = GETPC(); uintptr_t ra = GETPC();
CPUState *cs = CPU(s390_env_get_cpu(env)); CPUState *cs = CPU(s390_env_get_cpu(env));
uint64_t abs_addr;
int i; int i;
real_addr = wrap_address(env, real_addr); real_addr = wrap_address(env, real_addr) & TARGET_PAGE_MASK;
abs_addr = mmu_real2abs(env, real_addr) & TARGET_PAGE_MASK;
if (!address_space_access_valid(&address_space_memory, abs_addr,
TARGET_PAGE_SIZE, true)) {
cpu_restore_state(cs, ra);
program_interrupt(env, PGM_ADDRESSING, 4);
return 1;
}
/* Check low-address protection */ /* Check low-address protection */
if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) { if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) {
...@@ -1708,7 +1700,7 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr) ...@@ -1708,7 +1700,7 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
} }
for (i = 0; i < TARGET_PAGE_SIZE; i += 8) { for (i = 0; i < TARGET_PAGE_SIZE; i += 8) {
stq_phys(cs->as, abs_addr + i, 0); cpu_stq_real_ra(env, real_addr + i, 0, ra);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册