qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [QEMU-PPC] [PATCH V4 04/11] target/ppc/POWER9: Direct all ins


From: Suraj Jitindar Singh
Subject: [Qemu-ppc] [QEMU-PPC] [PATCH V4 04/11] target/ppc/POWER9: Direct all instr and data storage interrupts to the hypv
Date: Fri, 24 Feb 2017 12:05:10 +1100

The vpm0 bit was removed from the LPCR in POWER9, this bit controlled
whether ISI and DSI interrupts were directed to the hypervisor or the
partition. These interrupts now go to the hypervisor irrespective, thus
it is no longer necessary to check the vmp0 bit in the LPCR.

Signed-off-by: Suraj Jitindar Singh <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Acked-by: Balbir Singh <address@hidden>

---

V3 -> V4:
 - Use if instead of switch for mmu model
---
 target/ppc/mmu-hash64.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c
index d288d65..0c6a1e7 100644
--- a/target/ppc/mmu-hash64.c
+++ b/target/ppc/mmu-hash64.c
@@ -624,7 +624,12 @@ static void ppc_hash64_set_isi(CPUState *cs, CPUPPCState 
*env,
     if (msr_ir) {
         vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM1);
     } else {
-        vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0);
+        if (env->mmu_model & POWERPC_MMU_V3) {
+            /* Field deprecated in ISAv3.00 - interrupts always go to hyperv */
+            vpm = true;
+        } else {
+            vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0);
+        }
     }
     if (vpm && !msr_hv) {
         cs->exception_index = POWERPC_EXCP_HISI;
@@ -642,7 +647,12 @@ static void ppc_hash64_set_dsi(CPUState *cs, CPUPPCState 
*env, uint64_t dar,
     if (msr_dr) {
         vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM1);
     } else {
-        vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0);
+        if (env->mmu_model & POWERPC_MMU_V3) {
+            /* Field deprecated in ISAv3.00 - interrupts always go to hyperv */
+            vpm = true;
+        } else {
+            vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0);
+        }
     }
     if (vpm && !msr_hv) {
         cs->exception_index = POWERPC_EXCP_HDSI;
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]