[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v4 4/5] target/ppc: add hash MMU support for Power
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH v4 4/5] target/ppc: add hash MMU support for PowerNV POWER9 machines |
Date: |
Thu, 3 May 2018 10:58:24 +1000 |
User-agent: |
Mutt/1.9.3 (2018-01-21) |
On Tue, Apr 24, 2018 at 02:41:47PM +0200, Cédric Le Goater wrote:
> On 04/24/2018 02:03 PM, Cédric Le Goater wrote:
> >> +hwaddr ppc_hash64_hpt_reg(PowerPCCPU *cpu)
> >> +{
> >> + CPUPPCState *env = &cpu->env;
> >> +
> >> + /* We should not reach this routine on sPAPR machines */
> >> + assert(!cpu->vhyp);
> >> +
> >> + /* PowerNV machine */
> >> + if (msr_hv) {
> >> + if (env->mmu_model & POWERPC_MMU_3_00) {
> >> + return ppc64_v3_get_patbe0(cpu);
> >> + } else {
> >> + return cpu->env.spr[SPR_SDR1];
> >> + }
> >> + } else {
> >> + error_report("PowerNV guest support Unimplemented");
> >> + exit(1);
> >
> > I just noticed that this breaks 970 CPUs ...
>
> How about ?
Hmm.. I'm not actually seeing why it breaks 970.
I really want to ditch 970 support, but we have to go through the
deprecation process first.
>
> if (env->mmu_model < POWERPC_MMU_2_07) {
> return cpu->env.spr[SPR_SDR1];
> }
>
> /* P8/P9 PowerNV machine */
> if (msr_hv) {
> if (env->mmu_model == POWERPC_MMU_3_00) {
> return ppc64_v3_get_patbe0(cpu);
> } else {
> return cpu->env.spr[SPR_SDR1];
> }
> } else {
> error_report("PowerNV guest support Unimplemented");
> exit(1);
> }
>
> and I have to fix all the :
>
> env->mmu_model & POWERPC_MMU_3_00
>
> by :
>
> env->mmu_model == POWERPC_MMU_3_00
>
> I tripped over with the recent changes
Right.. eventually I actually want this to be something more like
if (cpu->radix64_opts)
but I'm not sure on the details yet.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [Qemu-ppc] [PATCH v4 4/5] target/ppc: add hash MMU support for PowerNV POWER9 machines,
David Gibson <=