qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Cédric Le Goater" <clg@kaod.org>,
	"Anton Blanchard" <anton@samba.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation
Date: Fri, 1 Jul 2016 09:56:04 +1000	[thread overview]
Message-ID: <20160630235604.GV8885@voom.fritz.box> (raw)
In-Reply-To: <1467324827.7422.28.camel@kernel.crashing.org>

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-30 23:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  6:48 [Qemu-devel] [PATCH 0/2] pnv: handle real mode addressing in HV mode Cédric Le Goater
2016-06-28  6:48 ` [Qemu-devel] [PATCH 1/2] ppc: Add proper real mode translation support Cédric Le Goater
2016-06-29  2:41   ` David Gibson
2016-06-29  2:59     ` Benjamin Herrenschmidt
2016-06-29  3:05       ` David Gibson
2016-06-28  6:48 ` [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation Cédric Le Goater
2016-06-29  2:22   ` David Gibson
2016-06-30 10:56   ` Anton Blanchard
2016-06-30 11:08     ` Benjamin Herrenschmidt
2016-06-30 16:01     ` Cédric Le Goater
2016-06-30 22:13       ` Benjamin Herrenschmidt
2016-06-30 23:56         ` David Gibson [this message]
2016-07-01  6:06         ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160630235604.GV8885@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=clg@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).