All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: qemu-ppc@nongnu.org, clg@kaod.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [QEMU-PPC] [PATCH 1/4] target/ppc/spapr: Add SPAPR_CAP_LARGE_DECREMENTER
Date: Wed, 27 Feb 2019 09:49:12 +1100	[thread overview]
Message-ID: <20190226224912.GQ6872@umbus.fritz.box> (raw)
In-Reply-To: <1551162370.2210.0.camel@gmail.com>

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

On Tue, Feb 26, 2019 at 05:26:10PM +1100, Suraj Jitindar Singh wrote:
> On Tue, 2019-02-26 at 14:39 +1100, David Gibson wrote:
> > On Tue, Feb 26, 2019 at 02:05:28PM +1100, Suraj Jitindar Singh wrote:
> > > Add spapr_cap SPAPR_CAP_LARGE_DECREMENTER to be used to control the
> > > availability and size of the large decrementer made available to
> > > the
> > > guest.
> > > 
> > > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> > > ---
> > >  hw/ppc/spapr.c         |  2 ++
> > >  hw/ppc/spapr_caps.c    | 45
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > >  include/hw/ppc/spapr.h |  5 ++++-
> > >  3 files changed, 51 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > > index b6a571b6f1..acf62a2b9f 100644
> > > --- a/hw/ppc/spapr.c
> > > +++ b/hw/ppc/spapr.c
> > > @@ -2077,6 +2077,7 @@ static const VMStateDescription vmstate_spapr
> > > = {
> > >          &vmstate_spapr_irq_map,
> > >          &vmstate_spapr_cap_nested_kvm_hv,
> > >          &vmstate_spapr_dtb,
> > > +        &vmstate_spapr_cap_large_decr,
> > >          NULL
> > >      }
> > >  };
> > > @@ -4288,6 +4289,7 @@ static void
> > > spapr_machine_class_init(ObjectClass *oc, void *data)
> > >      smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN;
> > >      smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 16; /*
> > > 64kiB */
> > >      smc->default_caps.caps[SPAPR_CAP_NESTED_KVM_HV] =
> > > SPAPR_CAP_OFF;
> > > +    smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = 0;
> > 
> > This looks basically fine, but the name kind of suggests it's a
> > boolean, whereas it's actually a number of bits.  I wonder if just
> > calling it "decrementer bits" would be clearer, with it defaulting to
> > 32.
> 
> Yes, except there's a difference between a decrementer with 32 bits and
> a large decrementer with 32 bits...

Ok, and that difference is..?

> SPAPR_CAP_LARGE_DECR_NR_BITS?

That could work.

-- 
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: 833 bytes --]

      reply	other threads:[~2019-02-26 23:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  3:05 [Qemu-devel] [QEMU-PPC] [PATCH 1/4] target/ppc/spapr: Add SPAPR_CAP_LARGE_DECREMENTER Suraj Jitindar Singh
2019-02-26  3:05 ` [Qemu-devel] [QEMU-PPC] [PATCH 2/4] target/ppc: Implement large decrementer support for TCG Suraj Jitindar Singh
2019-02-26  3:53   ` David Gibson
2019-02-26 23:28     ` Suraj Jitindar Singh
2019-02-26 23:39       ` David Gibson
2019-02-26  3:05 ` [Qemu-devel] [QEMU-PPC] [PATCH 3/4] target/ppc: Implement large decrementer support for KVM Suraj Jitindar Singh
2019-02-26  3:55   ` David Gibson
2019-02-26 23:34     ` Suraj Jitindar Singh
2019-02-26 23:40       ` David Gibson
2019-02-26  3:05 ` [Qemu-devel] [QEMU-PPC] [PATCH 4/4] target/ppc/spapr: Enable the large decrementer by default on POWER9 Suraj Jitindar Singh
2019-02-26  3:59   ` David Gibson
2019-02-26 23:50     ` Suraj Jitindar Singh
2019-02-26  3:39 ` [Qemu-devel] [QEMU-PPC] [PATCH 1/4] target/ppc/spapr: Add SPAPR_CAP_LARGE_DECREMENTER David Gibson
2019-02-26  6:26   ` Suraj Jitindar Singh
2019-02-26 22:49     ` David Gibson [this message]

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=20190226224912.GQ6872@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.