From: Nicholas Piggin <npiggin@gmail.com> Date: 2017-07-20 11:59:44
This driver currently reports the H_BEST_ENERGY is unsupported even
when booting in a non-LPAR environment (e.g., powernv). Prevent it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/platforms/pseries/pseries_energy.c | 3 +++
1 file changed, 3 insertions(+)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-07-20 13:03:22
Nicholas Piggin [off-list ref] writes:
This driver currently reports the H_BEST_ENERGY is unsupported even
when booting in a non-LPAR environment (e.g., powernv). Prevent it.
Just delete the printk(). Users don't know what that means, and
developers have other better ways to detect that the hcall is missing if
anyone cares.
cheers
From: Nicholas Piggin <npiggin@gmail.com> Date: 2017-07-21 01:16:58
On Thu, 20 Jul 2017 23:03:21 +1000
Michael Ellerman [off-list ref] wrote:
Nicholas Piggin [off-list ref] writes:
quoted
This driver currently reports the H_BEST_ENERGY is unsupported even
when booting in a non-LPAR environment (e.g., powernv). Prevent it.
Just delete the printk(). Users don't know what that means, and
developers have other better ways to detect that the hcall is missing if
anyone cares.
cheers
powerpc/pseries: energy driver do not print failure message
This driver currently reports the H_BEST_ENERGY is unsupported (even
when booting in a non-LPAR environment). This is not something the
administrator can do much with, and not significant for debugging.
Remove it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/platforms/pseries/pseries_energy.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
* Nicholas Piggin [off-list ref] [2017-07-21 11:16:44]:
On Thu, 20 Jul 2017 23:03:21 +1000
Michael Ellerman [off-list ref] wrote:
quoted
Nicholas Piggin [off-list ref] writes:
quoted
This driver currently reports the H_BEST_ENERGY is unsupported even
when booting in a non-LPAR environment (e.g., powernv). Prevent it.
Just delete the printk(). Users don't know what that means, and
developers have other better ways to detect that the hcall is missing if
anyone cares.
cheers
powerpc/pseries: energy driver do not print failure message
This driver currently reports the H_BEST_ENERGY is unsupported (even
when booting in a non-LPAR environment). This is not something the
administrator can do much with, and not significant for debugging.
Remove it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
@@ -229,10 +229,9 @@ static int __init pseries_energy_init(void)intcpu,err;structdevice*cpu_dev;-if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY)){-printk(KERN_INFO"Hypercall H_BEST_ENERGY not supported\n");-return0;-}+if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY))+return0;/* 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. Hence I take
mpe's suggestion. Removing the print is fine.
--Vaidy
@@ -229,10 +229,9 @@ static int __init pseries_energy_init(void)intcpu,err;structdevice*cpu_dev;-if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY)){-printk(KERN_INFO"Hypercall H_BEST_ENERGY not supported\n");-return0;-}+if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY))+return0;/* 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().
cheers
@@ -229,10 +229,9 @@ static int __init pseries_energy_init(void)intcpu,err;structdevice*cpu_dev;-if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY)){-printk(KERN_INFO"Hypercall H_BEST_ENERGY not supported\n");-return0;-}+if(!firmware_has_feature(FW_FEATURE_BEST_ENERGY))+return0;/* 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
From: Michael Ellerman <hidden> Date: 2017-08-11 12:19:48
On Fri, 2017-07-21 at 01:16:44 UTC, Nicholas Piggin wrote:
On Thu, 20 Jul 2017 23:03:21 +1000
Michael Ellerman [off-list ref] wrote:
quoted
Nicholas Piggin [off-list ref] writes:
quoted
This driver currently reports the H_BEST_ENERGY is unsupported even
when booting in a non-LPAR environment (e.g., powernv). Prevent it.
Just delete the printk(). Users don't know what that means, and
developers have other better ways to detect that the hcall is missing if
anyone cares.
cheers
powerpc/pseries: energy driver do not print failure message
This driver currently reports the H_BEST_ENERGY is unsupported (even
when booting in a non-LPAR environment). This is not something the
administrator can do much with, and not significant for debugging.
Remove it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Vaidyanathan Srinivasan <redacted>