[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/33] s390x/tcg: make STFL store into the lowcore
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 25/33] s390x/tcg: make STFL store into the lowcore |
Date: |
Fri, 6 Oct 2017 11:59:48 +0200 |
From: David Hildenbrand <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/helper.h | 2 +-
target/s390x/misc_helper.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/s390x/helper.h b/target/s390x/helper.h
index 75ba04fc15..52c2963baa 100644
--- a/target/s390x/helper.h
+++ b/target/s390x/helper.h
@@ -104,7 +104,6 @@ DEF_HELPER_FLAGS_5(calc_cc, TCG_CALL_NO_RWG_SE, i32, env,
i32, i64, i64, i64)
DEF_HELPER_FLAGS_2(sfpc, TCG_CALL_NO_RWG, void, env, i64)
DEF_HELPER_FLAGS_2(sfas, TCG_CALL_NO_WG, void, env, i64)
DEF_HELPER_FLAGS_1(popcnt, TCG_CALL_NO_RWG_SE, i64, i64)
-DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env)
DEF_HELPER_2(stfle, i32, env, i64)
DEF_HELPER_FLAGS_2(lpq, TCG_CALL_NO_WG, i64, env, i64)
DEF_HELPER_FLAGS_4(stpq, TCG_CALL_NO_WG, void, env, i64, i64, i64)
@@ -153,6 +152,7 @@ DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i64,
i64)
DEF_HELPER_1(per_check_exception, void, env)
DEF_HELPER_FLAGS_3(per_branch, TCG_CALL_NO_RWG, void, env, i64, i64)
DEF_HELPER_FLAGS_2(per_ifetch, TCG_CALL_NO_RWG, void, env, i64)
+DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env)
DEF_HELPER_2(xsch, void, env, i64)
DEF_HELPER_2(csch, void, env, i64)
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)
{
--
2.13.6
- [Qemu-devel] [PULL 16/33] s390x/tcg: make idte/ipte use the new _real mmu, (continued)
- [Qemu-devel] [PULL 16/33] s390x/tcg: make idte/ipte use the new _real mmu, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 18/33] s390x/3270: IDA support for 3270 via CcwDataStream, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 17/33] Revert "s390x/ccw: create s390 phb conditionally", Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 20/33] MAINTAINERS: use KVM s390x maintainers for kvm-stubs.c and kvm_s390x.h, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 21/33] s390x: raise CPU hotplug irq after really hotplugged, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 19/33] s390x/3270: handle writes of arbitrary length, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 22/33] s390x/cpumodel: fix max STFL(E) bit number, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 23/33] target/s390x: get rid of next_core_id, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 24/33] s390x: introduce and use S390_MAX_CPUS, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 27/33] s390x/css: fix css migration compat handling, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 25/33] s390x/tcg: make STFL store into the lowcore,
Cornelia Huck <=
- [Qemu-devel] [PULL 26/33] s390x: sort some devices into categories, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 28/33] s390/kvm: Support for get/set of extended TOD-Clock for guest, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 31/33] s390x/sclp: mark sclp-cpu-hotplug as non-usercreatable, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 29/33] s390/kvm: make TOD setting failures fatal for migration, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 30/33] s390x/sclp: Mark the sclp device with user_creatable = false, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 32/33] s390x/tcg: initialize machine check queue, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 33/33] hw/s390x: Mark the "sclpquiesce" device with user_creatable = false, Cornelia Huck, 2017/10/06
- Re: [Qemu-devel] [PULL 00/33] next batch of s390x patches, Peter Maydell, 2017/10/06