From: David Gibson <david@gibson.dropbear.id.au>
To: peter.maydell@linaro.org
Cc: agraf@suse.de, benh@kernel.crashing.org, qemu-devel@nongnu.org,
qemu-ppc@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PULL 05/23] ppc: Enforce setting MSR:EE, IR and DR when MSR:PR is set
Date: Fri, 1 Jul 2016 16:41:41 +1000 [thread overview]
Message-ID: <1467355319-28406-6-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1467355319-28406-1-git-send-email-david@gibson.dropbear.id.au>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
The architecture specifies that any instruction that sets MSR:PR will also
set MSR:EE, IR and DR.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target-ppc/helper_regs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h
index 8fc0934..8fdfa5c 100644
--- a/target-ppc/helper_regs.h
+++ b/target-ppc/helper_regs.h
@@ -136,6 +136,10 @@ static inline int hreg_store_msr(CPUPPCState *env, target_ulong value,
/* Change the exception prefix on PowerPC 601 */
env->excp_prefix = ((value >> MSR_EP) & 1) * 0xFFF00000;
}
+ /* If PR=1 then EE, IR and DR must be 1 */
+ if ((value >> MSR_PR) & 1) {
+ value |= (1 << MSR_EE) | (1 << MSR_DR) | (1 << MSR_IR);
+ }
#endif
env->msr = value;
hreg_compute_hflags(env);
--
2.7.4
next prev parent reply other threads:[~2016-07-01 6:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 6:41 [Qemu-devel] [PULL 00/23] ppc-for-2.7 queue 20160701 David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 01/23] ppc: Add a bunch of hypervisor SPRs to Book3s David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 02/23] ppc: Update LPCR definitions David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 03/23] ppc: Use a helper to filter writes to LPCR David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 04/23] ppc: Fix conditions for delivering external interrupts to a guest David Gibson
2016-07-01 6:41 ` David Gibson [this message]
2016-07-09 0:43 ` [Qemu-devel] [Qemu-ppc] [PULL 05/23] ppc: Enforce setting MSR:EE, IR and DR when MSR:PR is set Mark Cave-Ayland
2016-07-09 2:46 ` Benjamin Herrenschmidt
2016-07-09 2:52 ` Benjamin Herrenschmidt
2016-07-09 3:00 ` Benjamin Herrenschmidt
2016-07-09 3:08 ` Benjamin Herrenschmidt
2016-07-09 3:22 ` [Qemu-devel] [PATCH] ppc: Fix support for odd MSR combinations Benjamin Herrenschmidt
2016-07-09 3:40 ` Benjamin Herrenschmidt
2016-07-09 3:41 ` [Qemu-devel] [PATCH v2] " Benjamin Herrenschmidt
2016-07-09 3:42 ` Benjamin Herrenschmidt
2016-07-09 9:56 ` Mark Cave-Ayland
2016-07-11 1:55 ` David Gibson
2016-07-11 18:30 ` Mark Cave-Ayland
2016-07-12 0:57 ` David Gibson
2016-07-09 9:04 ` [Qemu-devel] [Qemu-ppc] [PULL 05/23] ppc: Enforce setting MSR:EE, IR and DR when MSR:PR is set Mark Cave-Ayland
2016-07-09 8:16 ` Cédric Le Goater
2016-07-09 8:25 ` Benjamin Herrenschmidt
2016-07-09 8:28 ` Cédric Le Goater
2016-07-01 6:41 ` [Qemu-devel] [PULL 06/23] ppc: Initial HDEC support David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 07/23] ppc: LPCR is a HV resource David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 08/23] ppc: Print HSRR0/HSRR1 in "info registers" David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 09/23] hw/ppc/spapr: Add some missing hcall function set strings David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 10/23] spapr: fix write-past-end-of-array error in cpu core device init code David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 11/23] spapr: Restore support for older PowerPC CPU cores David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 12/23] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 13/23] ppc: Fix 64K pages support in full emulation David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 14/23] ppc/xics: Rename existing xics to xics_spapr David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 15/23] ppc/xics: Move SPAPR specific code to a separate file David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 16/23] ppc/xics: Implement H_IPOLL using an accessor David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 17/23] ppc/xics: Replace "icp" with "xics" in most places David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 18/23] target-ppc: gen_pause for instructions: yield, mdoio, mdoom, miso David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 19/23] spapr: Restore support for 970MP and POWER8NVL CPU cores David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 20/23] spapr: drop reference on child object during core realization David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 21/23] spapr: do proper error propagation in spapr_cpu_core_realize_child() David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 22/23] spapr: drop duplicate variable in spapr_core_release() David Gibson
2016-07-01 6:41 ` [Qemu-devel] [PULL 23/23] qmp: fix spapr example of query-hotpluggable-cpus David Gibson
2016-07-01 13:28 ` [Qemu-devel] [PULL 00/23] ppc-for-2.7 queue 20160701 Peter Maydell
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=1467355319-28406-6-git-send-email-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=clg@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).