From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, clg@kaod.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [QEMU-PPC] [PATCH 4/4] target/ppc/spapr: Enable the large decrementer by default on POWER9
Date: Wed, 27 Feb 2019 10:50:52 +1100 [thread overview]
Message-ID: <1551225052.2210.15.camel@gmail.com> (raw)
In-Reply-To: <20190226035904.GN6872@umbus.fritz.box>
On Tue, 2019-02-26 at 14:59 +1100, David Gibson wrote:
> On Tue, Feb 26, 2019 at 02:05:31PM +1100, Suraj Jitindar Singh wrote:
> > Enable the large decrementer by default on POWER9 cpu models. The
> > default value applied is that provided in the cpu class.
> >
> > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> > ---
> > hw/ppc/spapr_caps.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
> > index e07568fb94..f48aa367e3 100644
> > --- a/hw/ppc/spapr_caps.c
> > +++ b/hw/ppc/spapr_caps.c
> > @@ -566,11 +566,18 @@ sPAPRCapabilityInfo
> > capability_table[SPAPR_CAP_NUM] = {
> > static sPAPRCapabilities default_caps_with_cpu(sPAPRMachineState
> > *spapr,
> > const char
> > *cputype)
> > {
> > + PowerPCCPUClass *pcc =
> > POWERPC_CPU_CLASS(object_class_by_name(cputype));
> > sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
> > sPAPRCapabilities caps;
> >
> > caps = smc->default_caps;
> >
> > + caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = pcc->hdecr_bits;
>
> So, the rule with default_caps_with_cpu() is that it can reduce the
> value from the machine-global default, but never increase it (because
> that could change guest visible behaviour for existing machine
> versions).
>
> I think the line above will do that.
Yep
>
> > + if (!ppc_type_check_compat(cputype, CPU_POWERPC_LOGICAL_3_00,
> > + 0, spapr->max_compat_pvr)) {
> > + caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = 0;
>
> And this part I think is redundant, because hdecr_bits won't be large
> for anything pre-POWER9.
>
> > + }
> > +
> > if (!ppc_type_check_compat(cputype, CPU_POWERPC_LOGICAL_2_07,
> > 0, spapr->max_compat_pvr)) {
> > caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_OFF;
>
>
next prev parent reply other threads:[~2019-02-26 23:51 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 [this message]
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
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=1551225052.2210.15.camel@gmail.com \
--to=sjitindarsingh@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--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 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.