qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: rth@twiddle.net, Aurelien Jarno <aurelien@aurel32.net>,
	thuth@redhat.com, cohuck@redhat.com, david@redhat.com,
	borntraeger@de.ibm.com
Subject: [Qemu-devel] [PATCH v1 for-2.11 03/10] target/s390x: move psw_key_valid() to mem_helper.c
Date: Thu, 17 Aug 2017 11:22:18 +0200	[thread overview]
Message-ID: <20170817092225.4264-4-david@redhat.com> (raw)
In-Reply-To: <20170817092225.4264-1-david@redhat.com>

Only used in that file.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 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 6567cfa..42d4ac0 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

  parent reply	other threads:[~2017-08-17  9:22 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  9:22 [Qemu-devel] [PATCH v1 for-2.11 00/10] target/s390x: cleanup cpu.h David Hildenbrand
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 01/10] target/s390x: move cc_name() to cc_helper.c David Hildenbrand
2017-08-17 11:01   ` Thomas Huth
2017-08-18  3:47   ` Richard Henderson
2017-08-18  9:59   ` David Hildenbrand
2017-08-18 10:04     ` Thomas Huth
2017-08-18 10:50       ` Cornelia Huck
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 02/10] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c David Hildenbrand
2017-08-17 11:03   ` Thomas Huth
2017-08-18  3:52   ` Richard Henderson
2017-08-17  9:22 ` David Hildenbrand [this message]
2017-08-17 11:04   ` [Qemu-devel] [PATCH v1 for-2.11 03/10] target/s390x: move psw_key_valid() to mem_helper.c Thomas Huth
2017-08-18  3:54   ` Richard Henderson
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 04/10] target/s390x: move s390_do_cpu_reset() to diag.c David Hildenbrand
2017-08-17 11:05   ` Thomas Huth
2017-08-18  3:55   ` Richard Henderson
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 05/10] target/s390x: move get_per_in_range() to misc_helper.c David Hildenbrand
2017-08-17 11:09   ` Thomas Huth
2017-08-18  3:56   ` Richard Henderson
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 06/10] target/s390x: introduce internal.h David Hildenbrand
2017-08-17 11:59   ` Thomas Huth
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 07/10] target/s390x: move a couple of functions to cpu.c David Hildenbrand
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 08/10] s390x: avoid calling kvm_ functions outside of target/s390x/ David Hildenbrand
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 09/10] s390x/kvm: move KVM declarations and stubs to separate files David Hildenbrand
     [not found]   ` <f2b025c6-bfd9-2b01-497c-d08f262bd0d5@amsat.org>
2017-08-17 12:21     ` David Hildenbrand
2017-08-17 12:35     ` Thomas Huth
2017-08-17 12:45       ` Philippe Mathieu-Daudé
2017-08-17 12:48       ` Cornelia Huck
2017-08-17 12:53         ` David Hildenbrand
2017-08-17 13:04           ` Cornelia Huck
2017-08-17 12:55       ` David Hildenbrand
2017-08-17 13:06         ` Thomas Huth
2017-08-17 13:07           ` Cornelia Huck
2017-08-17 13:10             ` David Hildenbrand
2017-08-17 13:14               ` David Hildenbrand
2017-08-17 13:30           ` Philippe Mathieu-Daudé
2017-08-18  4:05   ` Richard Henderson
2017-08-17  9:22 ` [Qemu-devel] [PATCH v1 for-2.11 10/10] target/s390x: cleanup cpu.h David Hildenbrand
2017-08-17 12:41   ` Thomas Huth
2017-08-17 13:09     ` Cornelia Huck
2017-08-17 11:42 ` [Qemu-devel] [PATCH v1 for-2.11 00/10] " Philippe Mathieu-Daudé
2017-08-17 13:11 ` Cornelia Huck
2017-08-17 13:12   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170817092225.4264-4-david@redhat.com \
    --to=david@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).