linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: Benjamin Herrenschmidt <benh@au1.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH RFC 3/3] powerpc/64: Enable use of radix MMU under hypervisor on POWER9
Date: Mon, 5 Dec 2016 20:47:04 +1100	[thread overview]
Message-ID: <20161205094704.GD13528@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1480928132.5297.0.camel@au1.ibm.com>

On Mon, Dec 05, 2016 at 07:55:32PM +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2016-12-05 at 19:04 +1100, Paul Mackerras wrote:
> > +       vec5 = of_get_flat_dt_prop(chosen, "ibm,architecture-vec-5", &size);
> > +       if (!vec5 || size <= OV5_INDX(OV5_MMU_RADIX_300))
> > +               return;
> 
> Could be bike shedding but shouldn't we first check if
> we are in an LPAR and bail out of we are not, then
> if we *are* and the above size is too small to contain
> the ARCH 3.00 options, also disable radix as obviously
> the hypervisor doesn't know about it ?

This is *very* early on, so early that we haven't yet decided what
platform we're on.  If we're not in an LPAR then we won't have a
/chosen/ibm-architecture-vec-5 property.  Any hypervisor that is too
old to have that property will also be too old to set the radix
bit in the ibm,pa-features property, so we won't use radix.

If we do have the property but it's short then yes that's a good
indication that the hypervisor can't do radix, though in that case
it's strange that it set the radix bit in the ibm,pa-features property
(which must have been set otherwise we wouldn't have got here).

I'll do a new patch.

> > +       if (!(vec5[OV5_INDX(OV5_MMU_RADIX_300)] & OV5_FEAT(OV5_MMU_RADIX_300)))
> > +               /* Hypervisor doesn't support radix */
> > +               cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX;
> > +}
> > +

Paul.

  reply	other threads:[~2016-12-05  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05  8:02 [PATCH 1/3] powerpc/64: Fixes for the ibm,client-architecture-support options Paul Mackerras
2016-12-05  8:03 ` [PATCH RFC 2/3] powerpc/64: Always enable radix support for 64-bit Book 3S kernels Paul Mackerras
2016-12-05  8:04 ` [PATCH RFC 3/3] powerpc/64: Enable use of radix MMU under hypervisor on POWER9 Paul Mackerras
2016-12-05  8:55   ` Benjamin Herrenschmidt
2016-12-05  9:47     ` Paul Mackerras [this message]
2016-12-06  3:45   ` [PATCH RFC v2 " Paul Mackerras

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=20161205094704.GD13528@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=benh@au1.ibm.com \
    --cc=linuxppc-dev@ozlabs.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).