aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/misc_helper.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-27 19:00:27 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-06 10:53:02 +0200
commit86b5ab390992fd57f3a23764994a7e082bcc2fc4 (patch)
tree1570306d38b7d38701b8dd5884f725c6d23fc544 /target/s390x/misc_helper.c
parentf42dc44a1481949e900cd50846a42c60d756758e (diff)
s390x/tcg: make STFL store into the lowcore
Using virtual memory access is wrong and will soon include low-address protection checks, which is to be bypassed for STFL. STFL is a privileged instruction and using LowCore requires !CONFIG_USER_ONLY, so add the ifdef and move the declaration to the right place. This was originally part of a bigger STFL(E) refactoring. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170927170027.8539-4-david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r--target/s390x/misc_helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 293fc8428a..0b93381188 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -541,13 +541,18 @@ static unsigned do_stfle(CPUS390XState *env, uint64_t words[MAX_STFL_WORDS])
return max_bit / 64;
}
+#ifndef CONFIG_USER_ONLY
void HELPER(stfl)(CPUS390XState *env)
{
uint64_t words[MAX_STFL_WORDS];
+ LowCore *lowcore;
+ lowcore = cpu_map_lowcore(env);
do_stfle(env, words);
- cpu_stl_data(env, 200, words[0] >> 32);
+ lowcore->stfl_fac_list = cpu_to_be32(words[0] >> 32);
+ cpu_unmap_lowcore(lowcore);
}
+#endif
uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr)
{