]> Git Repo - qemu.git/commitdiff
target/ppc: Don't bother with MSR_EP in cpu_ppc_set_papr()
authorDavid Gibson <[email protected]>
Fri, 13 Apr 2018 04:54:34 +0000 (14:54 +1000)
committerDavid Gibson <[email protected]>
Fri, 27 Apr 2018 08:05:23 +0000 (18:05 +1000)
cpu_ppc_set_papr() removes the EP and HV bits from the MSR mask.  While
removing the HV bit makes sense (a cpu in PAPR mode should never be
emulated in hypervisor mode), the EP bit is just bizarre.  Although it's
true that a papr mode guest shouldn't be able to change the exception
prefix, the MSR[EP] bit doesn't even exist on the cpus supported for PAPR
mode, so it's pointless to do anything with it here.

Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
target/ppc/translate_init.c

index bb79d23b50a1a3cf5e2b1857c547e5309a4e27d4..808f6c1a08c241ab137edd1c4516303ee283e4a4 100644 (file)
@@ -8874,12 +8874,11 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp)
 
     cpu->vhyp = vhyp;
 
-    /* PAPR always has exception vectors in RAM not ROM. To ensure this,
-     * MSR[IP] should never be set.
-     *
-     * We also disallow setting of MSR_HV
+    /*
+     * With a virtual hypervisor mode we never allow the CPU to go
+     * hypervisor mode itself
      */
-    env->msr_mask &= ~((1ull << MSR_EP) | MSR_HVB);
+    env->msr_mask &= ~MSR_HVB;
 
     /* Set emulated LPCR to not send interrupts to hypervisor. Note that
      * under KVM, the actual HW LPCR will be set differently by KVM itself,
This page took 0.050257 seconds and 4 git commands to generate.