public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
	Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: powerpc: Add count cache flush parameters to kvmppc_get_cpu_char()
Date: Sun, 03 Mar 2019 20:06:29 +1100	[thread overview]
Message-ID: <87wolgiay2.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20190301080113.GB22341@blackberry>

Paul Mackerras <paulus@ozlabs.org> writes:

> On Fri, Mar 01, 2019 at 05:52:51PM +1100, Michael Ellerman wrote:
>> Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:
>> 
>> > Add KVM_PPC_CPU_CHAR_BCCTR_FLUSH_ASSIST &
>> > KVM_PPC_CPU_BEHAV_FLUSH_COUNT_CACHE to the characteristics returned from
>> > the H_GET_CPU_CHARACTERISTICS H-CALL, as queried from either the
>> > hypervisor or the device tree.
>> >
>> > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
>> > ---
>> >  arch/powerpc/include/uapi/asm/kvm.h |  2 ++
>> >  arch/powerpc/kvm/powerpc.c          | 18 ++++++++++++++----
>> >  2 files changed, 16 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
>> > index b90a7d154180..a99dcac91e50 100644
>> > --- a/arch/powerpc/kvm/powerpc.c
>> > +++ b/arch/powerpc/kvm/powerpc.c
>> > @@ -2251,12 +2253,16 @@ static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp)
>> >  		if (have_fw_feat(fw_features, "enabled",
>> >  				 "fw-count-cache-disabled"))
>> >  			cp->character |= KVM_PPC_CPU_CHAR_COUNT_CACHE_DIS;
>> > +		if (have_fw_feat(fw_features, "enabled",
>> > +				 "fw-count-cache-flush-bcctr2,0,0"))
>> 
>> I don't think there's any reason KVM needs to be querying the device
>> tree directly, is there?
>> 
>> Can't it just use the security flags (security_features.h), that are
>> initialised by the powernv platform code based on the device tree.
>
> My recollection is that the security flags didn't have all the
> information we need.  It's possible that's no longer true.

Actually I don't think they existed at all back then, we didn't add them
until after the initial panic.

> I merged the patch and sent a pull request to Paolo; using the same
> pattern as the existing code made it a low-risk patch and I wanted to
> get it in for 5.1.  For 5.2 we can look at changing it over if you
> like.

Yep that's fine.

cheers

      reply	other threads:[~2019-03-03  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01  3:25 [PATCH] KVM: PPC: powerpc: Add count cache flush parameters to kvmppc_get_cpu_char() Suraj Jitindar Singh
2019-03-01  6:52 ` Michael Ellerman
2019-03-01  8:01   ` Paul Mackerras
2019-03-03  9:06     ` Michael Ellerman [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=87wolgiay2.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox