]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
target/ppc: return a nil HPT base address on sPAPR machines
authorCédric Le Goater <clg@kaod.org>
Tue, 24 Apr 2018 11:30:41 +0000 (13:30 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 3 May 2018 23:56:27 +0000 (09:56 +1000)
commit e57ca75ce3b2 ("target/ppc: Manage external HPT via virtual
hypervisor") exported a set of methods to manipulate the HPT from the
core hash MMU. But SPR_SDR1 is still used under some circumstances to
get the base address of the HPT, which is incorrect for the sPAPR
machines.

Only the logging should be impacted.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/mmu-hash64.h

index d5fc03441dbffc2901663e300d43efa32c14a64f..f6349ccdb32dca0be0ecdb5777e6f7f333d4f3f5 100644 (file)
@@ -102,6 +102,9 @@ void ppc_hash64_finalize(PowerPCCPU *cpu);
 
 static inline hwaddr ppc_hash64_hpt_base(PowerPCCPU *cpu)
 {
+    if (cpu->vhyp) {
+        return 0;
+    }
     return cpu->env.spr[SPR_SDR1] & SDR_64_HTABORG;
 }