From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/pseries: energy driver only print message when LPAR guest
Date: Fri, 21 Jul 2017 13:32:02 +0530 [thread overview]
Message-ID: <20170721080202.GA20162@drishya.in.ibm.com> (raw)
In-Reply-To: <87pocue1uk.fsf@concordia.ellerman.id.au>
* Michael Ellerman <mpe@ellerman.id.au> [2017-07-21 16:33:07]:
> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> writes:
> > * Nicholas Piggin <npiggin@gmail.com> [2017-07-21 11:16:44]:
> >> diff --git a/arch/powerpc/platforms/pseries/pseries_energy.c b/arch/powerpc/platforms/pseries/pseries_energy.c
> >> index 164a13d3998a..35c891aabef0 100644
> >> --- a/arch/powerpc/platforms/pseries/pseries_energy.c
> >> +++ b/arch/powerpc/platforms/pseries/pseries_energy.c
> >> @@ -229,10 +229,9 @@ static int __init pseries_energy_init(void)
> >> int cpu, err;
> >> struct device *cpu_dev;
> >>
> >> - if (!firmware_has_feature(FW_FEATURE_BEST_ENERGY)) {
> >> - printk(KERN_INFO "Hypercall H_BEST_ENERGY not supported\n");
> >> - return 0;
> >> - }
> >> + if (!firmware_has_feature(FW_FEATURE_BEST_ENERGY))
> >> + return 0; /* H_BEST_ENERGY hcall not supported */
> >> +
> >
> > The first patch (!firmware_has_feature(FW_FEATURE_LPAR)) would be
> > ideal, but we do not have this in KVM guest case also.
>
> Yeah we do.
>
> It should really be called FW_FEATURE_RUNNING_UNDER_PAPR_HYPERVISOR.
>
> static int __init probe_fw_features(unsigned long node, const char *uname, int
> depth, void *data)
> {
> ....
> if (!strcmp(uname, "rtas") || !strcmp(uname, "rtas@0")) {
> prop = of_get_flat_dt_prop(node, "ibm,hypertas-functions", &len);
> if (prop) {
> powerpc_firmware_features |= FW_FEATURE_LPAR;
>
>
> Qemu initialises that property unconditionally in spapr_dt_rtas().
oops... I meant that FW_FEATURE_BEST_ENERGY is not found in KVM and we
will see the print needlessly.
If we have a check for phyp LPAR, then we can enable the print
"H_BEST_ENERGY hcall not supported"
Since the FW_FEATURE_LPAR is common for all PAPR guest (both pHyp and
KVM), I agree that deleting the print is the right thing to do since
we see it on both powernv and KVM where it is not supported and there
is no point reporting it.
--Vaidy
next prev parent reply other threads:[~2017-07-21 8:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 11:59 [PATCH] powerpc/pseries: energy driver only print message when LPAR guest Nicholas Piggin
2017-07-20 13:03 ` Michael Ellerman
2017-07-21 1:16 ` Nicholas Piggin
2017-07-21 4:35 ` Vaidyanathan Srinivasan
2017-07-21 6:33 ` Michael Ellerman
2017-07-21 8:02 ` Vaidyanathan Srinivasan [this message]
2017-08-11 12:19 ` Michael Ellerman
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=20170721080202.GA20162@drishya.in.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@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;
as well as URLs for NNTP newsgroup(s).