[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 for-2.11 11/18] target/s390x: move psw_key_valid(
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v3 for-2.11 11/18] target/s390x: move psw_key_valid() to mem_helper.c |
Date: |
Fri, 18 Aug 2017 13:43:46 +0200 |
Only used in that file.
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/cpu.h | 11 -----------
target/s390x/mem_helper.c | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index c71a4bf..8300cb2 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -366,17 +366,6 @@ void s390x_cpu_debug_excp_handler(CPUState *cs);
#define MMU_SECONDARY_IDX 1
#define MMU_HOME_IDX 2
-static inline bool psw_key_valid(CPUS390XState *env, uint8_t psw_key)
-{
- uint16_t pkm = env->cregs[3] >> 16;
-
- if (env->psw.mask & PSW_MASK_PSTATE) {
- /* PSW key has range 0..15, it is valid if the bit is 1 in the PKM */
- return pkm & (0x80 >> psw_key);
- }
- return true;
-}
-
static inline int cpu_mmu_index(CPUS390XState *env, bool ifetch)
{
switch (env->psw.mask & PSW_MASK_ASC) {
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index c71dce4..b91c740 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -56,6 +56,17 @@ void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType
access_type,
#define HELPER_LOG(x...)
#endif
+static inline bool psw_key_valid(CPUS390XState *env, uint8_t psw_key)
+{
+ uint16_t pkm = env->cregs[3] >> 16;
+
+ if (env->psw.mask & PSW_MASK_PSTATE) {
+ /* PSW key has range 0..15, it is valid if the bit is 1 in the PKM */
+ return pkm & (0x80 >> psw_key);
+ }
+ return true;
+}
+
/* Reduce the length so that addr + len doesn't cross a page boundary. */
static inline uint32_t adj_len_to_page(uint32_t len, uint64_t addr)
{
--
2.9.4
- [Qemu-devel] [PATCH v3 for-2.11 08/18] target/s390x: move gtod_*() declarations to s390-virtio.h, (continued)
[Qemu-devel] [PATCH v3 for-2.11 09/18] target/s390x: move cc_name() to helper.c, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 10/18] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 12/18] target/s390x: move s390_do_cpu_reset() to diag.c, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 11/18] target/s390x: move psw_key_valid() to mem_helper.c,
David Hildenbrand <=
[Qemu-devel] [PATCH v3 for-2.11 13/18] target/s390x: move get_per_in_range() to misc_helper.c, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 14/18] target/s390x: introduce internal.h, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 16/18] s390x: avoid calling kvm_ functions outside of target/s390x/, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 15/18] target/s390x: move a couple of functions to cpu.c, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 17/18] s390x/kvm: move KVM declarations and stubs to separate files, David Hildenbrand, 2017/08/18
[Qemu-devel] [PATCH v3 for-2.11 18/18] target/s390x: cleanup cpu.h, David Hildenbrand, 2017/08/18
Re: [Qemu-devel] [PATCH v3 for-2.11 00/18] target/s390x: cleanup cpu.h, David Hildenbrand, 2017/08/18
Re: [Qemu-devel] [PATCH v3 for-2.11 00/18] target/s390x: cleanup cpu.h, Cornelia Huck, 2017/08/24