[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 03/18] target-ppc: USE LPCR_ILE to control exception en
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 03/18] target-ppc: USE LPCR_ILE to control exception endian on POWER7 |
Date: |
Mon, 2 Sep 2013 10:11:18 +0200 |
From: Anton Blanchard <address@hidden>
On POWER7, LPCR_ILE is used to control what endian guests take
their exceptions in so use it instead of MSR_ILE.
Signed-off-by: Anton Blanchard <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/cpu.h | 2 ++
target-ppc/excp_helper.c | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 711db08..422a6bb 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -453,6 +453,8 @@ struct ppc_slb_t {
#define MSR_RI 1 /* Recoverable interrupt 1 */
#define MSR_LE 0 /* Little-endian mode 1 hflags */
+#define LPCR_ILE (1 << (63-38))
+
#define msr_sf ((env->msr >> MSR_SF) & 1)
#define msr_isf ((env->msr >> MSR_ISF) & 1)
#define msr_shv ((env->msr >> MSR_SHV) & 1)
diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c
index e9fcad8..e957761 100644
--- a/target-ppc/excp_helper.c
+++ b/target-ppc/excp_helper.c
@@ -611,9 +611,19 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int
excp_model, int excp)
tlb_flush(env, 1);
}
+#ifdef TARGET_PPC64
+ if (excp_model == POWERPC_EXCP_POWER7) {
+ if (env->spr[SPR_LPCR] & LPCR_ILE) {
+ new_msr |= (target_ulong)1 << MSR_LE;
+ }
+ } else if (msr_ile) {
+ new_msr |= (target_ulong)1 << MSR_LE;
+ }
+#else
if (msr_ile) {
new_msr |= (target_ulong)1 << MSR_LE;
}
+#endif
/* Jump to handler */
vector = env->excp_vectors[excp];
--
1.8.1.4
- [Qemu-ppc] [PULL 00/18] ppc patch queue 2013-09-02, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 10/18] target-ppc: fix bit extraction for FPBF and FPL, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 15/18] pseries: Add H_SET_MODE hcall to change guest exception endianness, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 05/18] disas/ppc.c: Fix little endian disassembly, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 06/18] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine., Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 02/18] pseries: Fix stalls on hypervisor virtual console, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 07/18] ppc405_boards: Disable debug output, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 08/18] ppc405_uc: Disable debug output, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 03/18] target-ppc: USE LPCR_ILE to control exception endian on POWER7,
Alexander Graf <=
- [Qemu-ppc] [PULL 01/18] PPC: E500: Generate device tree on reset, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 04/18] target-ppc: POWER7 supports the MSR_LE bit, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 14/18] xics: move registration of global state to realize(), Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 16/18] PPC: KVM: Compile fix for qemu_notify_event, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 17/18] spapr: add "stop-self" RTAS call required to support hot CPU unplug, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 11/18] spapr-pci: fix config space access to support bridges, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 09/18] ppc405_boards: Don't enforce presence of firmware for qtest, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 18/18] PPC: spapr: iommu: rework traces, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 12/18] target-ppc: Use #define instead of opencoding SLB valid bit, Alexander Graf, 2013/09/02
- [Qemu-ppc] [PULL 13/18] spapr-pci: rework MSI/MSIX, Alexander Graf, 2013/09/02