qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulatio


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation
Date: Fri, 1 Jul 2016 09:56:04 +1000
User-agent: Mutt/1.6.1 (2016-04-27)

On Fri, Jul 01, 2016 at 08:13:47AM +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2016-06-30 at 18:01 +0200, Cédric Le Goater wrote:
> > +static uint32_t ppc_hash64_pte_size_decode(PowerPCCPU *cpu, uint64_t
> > pte0,
> > +                                           uint64_t pte1, uint32_t
> > slb_pshift)
> >  {
> > -    switch (slb_pshift) {
> > -    case 12:
> > -        return 12;
> > -    case 16:
> > -        if ((pte1 & 0xf000) == 0x1000) {
> > -            return 16;
> > -        }
> > -        return 0;
> > -    case 24:
> > -        if ((pte1 & 0xff000) == 0) {
> > -            return 24;
> > -        }
> > -        return 0;
> > -    }
> > -    return 0;
> > +    unsigned spshift;
> > +
> > +    return ppc_hash64_hpte_page_shift_noslb(cpu, pte0, pte1,
> > &spshift);
> >  }
> 
> Why not call ppc_hash64_hpte_page_shift_noslb() directly from the call
> site ? That or rename it to ppc_hash64_pte_size_decode :-)

Right.. that is the usage that ppc_hash64_hpte_page_shift_noslb() was
intended for.

> Otherwise yes, your patch looks correct as in what
> doesppc_hash64_hpte_page_shift_noslb() is definitely more correct than
> what ppc_hash64_pte_size_decode() is doing.
> 

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

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