Hi Michal,
Michal Suchánek writes:
> Hello,
>
> are there any machines on which this is supposed to work?
>
> On a 9105-22A with ML1050_fw1050.20 (78) and
On 9105-22A you need atleast:
Firmware level: FW1060.10
> Linux 6.11.0-lp155.4.gce149d2-default I get:
Kernel version is fine. ATM anythi
Hi Ritesh,
Thanks for looking into this patch. My responses your review inline
below:
Ritesh Harjani (IBM) writes:
> Narayana Murty N writes:
>
>> Makes pseries_eeh_err_inject() available even when debugfs
>> is disabled (CONFIG_DEBUG_FS=n). It moves eeh_debugfs_break_device()
>> and eeh_pe_in
f_msi_remove,
> + .remove = fsl_of_msi_remove,
> };
Dont have any objections to changes in arch/powerpc/platforms/pseries/papr_scm.c
Reviewed-by: Vaibhav Jain
--
Cheers
~ Vaibhav
e changes LGTM, hence
Reviewed-by: Vaibhav Jain
> ---
>
> Testing:
>
> vfio-test [1] by Alex Willamson, was forked and updated to add
> support inject error on pSeries guest and used to test this
> patch[2].
>
> References:
> ===
> [1] https://git
in an overall ~4% improvement of arithoh[2] throughput.
[1] commit 180c6b072bf3 ("KVM: PPC: Book3S HV nestedv2: Do not cancel pending
decrementer exception")
[2] https://github.com/kdlucas/byte-unixbench/
Fixes: 180c6b072bf3 ("KVM: PPC: Book3S HV nestedv2: Do not cancel pe
ap to L1. From there the
value of this register is cached, made available in kvmhv_run_single_vcpu()
to compare it against host(L1) timebase and cancel the pending hypervisor
decrementer exception if needed.
Fixes: 180c6b072bf3 ("KVM: PPC: Book3S HV nestedv2: Do not cancel pending
decrementer
u_features`
getting cleared.
[1]
https://lore.kernel.org/all/20240207035220.339726-1-npig...@gmail.com
Hence,
Tested-by: Vaibhav Jain
--
Cheers
~ Vaibhav
ier, which is unused since commit
> 7d4703455168 ("powerpc/feature: Remove CPU_FTR_NODSISRALIGN").
>
> Signed-off-by: Nicholas Piggin
> ---
Tested this patch on a PP64-LE lpar with the patch[1] and seeing the
relevant pi-feature bit CPU_FTR_DBELL getting cleared.
[1]
https://lore.kernel.org/all/20240207035220.339726-2-npig...@gmail.com
Hence,
Tested-by: Vaibhav Jain
--
Cheers
~ Vaibhav
.
However you probably dont want this switch-case to fallthrough so please
use a 'break' instead.
> + default:
> + break;
> + }
> +
> + return cap;
> +}
> +
>
With the suggested change above
Reviewed-by: Vaibhav Jain
--
Cheers
~ Vaibhav
t_buff_info(gsb, KVMPPC_GSID_RUN_OUTPUT,
> + cfg->vcpu_run_output_cfg);
> if (rc < 0)
> return rc;
> }
> --
Thanks for catching this and the change looks good to me.
Reviewed-by: Vaibhav Jain
--
Cheers
~ Vaibhav
("KVM: PPC: Add support for nestedv2 guests")
Suggested-by: Michael Ellerman
Signed-off-by: Vaibhav Jain
---
arch/powerpc/include/asm/hvcall.h | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/include/asm/hvcall.h
b/arch/powerpc/includ
Hi Aneesh,
"Aneesh Kumar K.V" writes:
>> Yes, Agreed and thats a nice suggestion. However ATM the hypervisor
>> supporting Nestedv2 doesnt have support for this hcall. In future
>> once we have support for this hcall for nestedv2 from the hypervisor
>> we can replace this branch with a firmwar
"Aneesh Kumar K.V" writes:
> Vaibhav Jain writes:
>
>> Hi Aneesh,
>>
>> Thanks for looking into this patch. My responses inline below:
>>
>> "Aneesh Kumar K.V (IBM)" writes:
>>
>>> Vaibhav Jain writes:
>>&g
Hi Aneesh,
Thanks for looking into this patch. My responses inline:
"Aneesh Kumar K.V (IBM)" writes:
> May be we should use
> firmware_has_feature(FW_FEATURE_H_COPY_TOFROM_GUEST))?
>
> the nestedv2 can end up using the above hcall if it is supported by the
> hypervisor right? In its absence we
Hi Aneesh,
Thanks for looking into this patch. My responses inline below:
"Aneesh Kumar K.V (IBM)" writes:
> Vaibhav Jain writes:
>
>> From: Jordan Niethe
>>
>> An L0 must invalidate the L2's RPT during H_GUEST_DELETE if this has not
>> alr
From: Jordan Niethe
Commit 709236039964 ("KVM: PPC: Reimplement non-SIMD LOAD/STORE
instruction mmio emulation with analyse_instr() input") and
commit 2b33cb585f94 ("KVM: PPC: Reimplement LOAD_FP/STORE_FP instruction
mmio emulation with analyse_instr() input") made
kvmppc_emulate_loadstore() use
From: Jordan Niethe
H_COPY_TOFROM_GUEST is part of the nestedv1 API and so should not be
called by a nestedv2 host. Do not attempt to call it.
Signed-off-by: Jordan Niethe
---
arch/powerpc/kvm/book3s_64_mmu_radix.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_
From: Jordan Niethe
In the nestedv2 case, if there is a pending decrementer exception, the
L1 must get the L2's timebase from the L0 to see if the exception should
be cancelled. This adds the overhead of a H_GUEST_GET_STATE call to the
likely case in which the decrementer should not be cancelled.
From: Jordan Niethe
The check for a hcall coming from userspace is done for KVM-PR. This is
not supported for nestedv2 and the L0 will directly inject the necessary
exception to the L2 if userspace performs a hcall. Avoid checking the
MSR and thus avoid a H_GUEST_GET_STATE hcall in the L1.
Signe
From: Jordan Niethe
In the nestedv2 case, the L1 may register the L2's VPA with the L0. This
allows the L0 to manage the L2's dispatch count, as well as enable
possible performance optimisations by seeing if certain resources are
not being used by the L2 (such as the PMCs).
Use the H_GUEST_SET_S
From: Jordan Niethe
The msr check in kvmppc_handle_exit_hv() is not needed for nestedv2 hosts,
skip the check to avoid a H_GUEST_GET_STATE hcall.
Signed-off-by: Jordan Niethe
---
arch/powerpc/kvm/book3s_hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/b
From: Jordan Niethe
kvmhv_copy_tofrom_guest_radix() gets the PID at the start of the
function. If pid is not used, then this is a wasteful H_GUEST_GET_STATE
hcall for nestedv2 hosts. Move the assignment to where pid will be used.
Suggested-by: Nicholas Piggin
Signed-off-by: Jordan Niethe
---
From: Jordan Niethe
There is no need to inject an external interrupt in
kvmppc_book3s_irqprio_deliver() as the test for BOOK3S_IRQPRIO_EXTERNAL
in kvmhv_run_single_vcpu() before guest entry will raise LPCR_MER if
needed. There is also no need to inject the decrementer interrupt as
this will be ra
From: vaibhav
This patch series introduces series of performance improvements to recently
added support for Nested APIv2 PPC64 Guests via [1]. Details for Nested
APIv2 for PPC64 Guests is available in Documentation/powerpc/kvm-nested.rst.
This patch series introduces various optimizations for a
From: Nicholas Piggin
Commit 026728dc5d41 ("KVM: PPC: Book3S HV P9: Inject pending xive
interrupts at guest entry") changed guest entry so that if external
interrupts are enabled, BOOK3S_IRQPRIO_EXTERNAL is not tested for. Test
for this regardless of MSR_EE.
For an L1 host, do not inject an inte
From: Jordan Niethe
LPCR_MER is conditionally set during entry to a guest if there is a
pending external interrupt. In the nestedv2 case, this change is not
being communicated to the L0, which means it is not being set in the L2.
Ensure the updated LPCR value is passed to the L0.
Signed-off-by:
From: Jordan Niethe
An L0 must invalidate the L2's RPT during H_GUEST_DELETE if this has not
already been done. This is a slow operation that means H_GUEST_DELETE
must return H_BUSY multiple times before completing. Invalidating the
tables before deleting the guest so there is less work for the L
From: Jordan Niethe
The kvmppc_get_tb_offset() getter reloads KVMPPC_GSID_TB_OFFSET from the
L0 for nestedv2 host. This is unnecessary as the value does not change.
KVMPPC_GSID_TB_OFFSET also need not be reloaded in
kvmppc_{s,g}et_dec_expires().
Signed-off-by: Jordan Niethe
---
arch/powerpc/in
Thanks for looking at this patch Mpe.
Michael Ellerman writes:
> Vaibhav Jain writes:
>> This minor patch enables config option GENERIC_IDLE_POLL_SETUP for arch
>> powerpc. This should add support for kernel param 'nohlt'.
>
> Which is named after an 8086 instru
CPU to an idle-loop similar to what cpu_idle_poll() does. Hence this
patch also updates the handling of 'powersave=off' kernel param to enable
generic cpu idle-loop if its enabled.
Signed-off-by: Vaibhav Jain
---
Changelog:
Since v1:
https://lore.kernel.org/all/20230818050739.827851-1-v
CPU to an idle-loop similar to what cpu_idle_poll() does. This
patch however makes powerpc kernel-parameters better aligned to the
generic boot-time parameters.
Signed-off-by: Vaibhav Jain
---
Documentation/admin-guide/kernel-parameters.txt | 2 +-
arch/powerpc/Kconfig|
Remove function papr_scm_pmu_check_events() and replace the
> event checks in papr_scm_pmu_register() function with p->stat_buffer_len
> as suggested by Vaibhav Jain
> Link to the patch v2:
> https://lore.kernel.org/all/20220711034605.212683-1-kj...@linux.ibm.com/
V3 patch looks good to me.
Reviewed-by: Vaibhav Jain
--
Cheers
~ Vaibhav
Hi Kajol,
Thanks for the patch. Minor review comment below:
Kajol Jain writes:
> Commit 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support")
> added performance monitoring support for papr-scm nvdimm devices via
> perf interface. Commit also added an array in papr_scm_priv
> structure
Thanks for looking into this patch Rob,
I have addressed your review comment in v3 of the patch posted at
https://lore.kernel.org/all/20220531041446.3334259-1-vaib...@linux.ibm.com/
--
Cheers
~ Vaibhav
nsure correct memory bounds.
Fixes: 467d27824920 ("powerpc: ima: get the kexec buffer passed by the previous
kernel")
Cc: Frank Rowand
Cc: Prakhar Srivastava
Cc: Lakshmi Ramasubramanian
Cc: Thiago Jung Bauermann
Cc: Rob Herring
Cc: Ritesh Harjani
Cc: Robin Murphy
Signed-off-by: Vaibha
Hi Ritesh,
thanks for looking into this patch,
Ritesh Harjani writes:
> Just a minor nit which I noticed.
>
> On 22/05/24 11:20AM, Vaibhav Jain wrote:
>> Presently ima_get_kexec_buffer() doesn't check if the previous kernel's
>> ima-kexec-buffer lies outside the
Thanks for reporting this Sachin,
I have posted a fix for this at
https://lore.kernel.org/nvdimm/20220524112353.1718454-1-vaib...@linux.ibm.com
Sachin Sant writes:
> While booting linux-next (5.18.0-rc7-next-20220520) on a Power10 LPAR
> configure with pmem following oops is seen. The LPAR fai
introducing the check for 'p->stat_buffer_len' at the beginning of
papr_scm_pmu_check_events().
[1]
https://lore.kernel.org/all/6b3a522a-6a5f-4cc9-b268-0c63aa6e0...@linux.ibm.com
Fixes: 0e0946e22f3665d2732 ("powerpc/papr_scm: Fix leaking nvdimm_events_map
elements")
Reported-by: S
Michael Ellerman writes:
>
> Rob's point is that commit fee3ff99bc67 only moved existing code, the
> bug already existed.
>
> The function was introduced in:
>
> 467d27824920 ("powerpc: ima: get the kexec buffer passed by the previous
> kernel")
>
> So that's where the Fixes tag should poin
nsure correct memory bounds.
Fixes: 467d27824920 ("powerpc: ima: get the kexec buffer passed by the previous
kernel")
Cc: Frank Rowand
Cc: Prakhar Srivastava
Cc: Lakshmi Ramasubramanian
Cc: Thiago Jung Bauermann
Cc: Rob Herring
Signed-off-by: Vaibhav Jain
---
Changelog
==
v2:
Rob Herring writes:
> On Thu, May 19, 2022 at 01:35:47AM +0530, Vaibhav Jain wrote:
>> Presently ima_get_kexec_buffer() doesn't check if the previous kernel's
>> ima-kexec-buffer lies outside the addressable memory range. This can result
>> in a kernel panic if the
27;s memory bounds.
Fixes: fee3ff99bc67("powerpc: Move arch independent ima kexec functions to
drivers/of/kexec.c")
Cc: Frank Rowand
Cc: Prakhar Srivastava
Cc: Lakshmi Ramasubramanian
Cc: Thiago Jung Bauermann
Cc: Rob Herring
Signed-off-by: Vaibhav Jain
---
drivers/of/kexec.c | 7
27;nvdimm_events_map' to 'stat_id'. Also rest of the code
can continue to call 'kfree(papr_scm_priv.nvdimm_events_map)' without needing to
iterate over the array and free up individual elements.
Fixes: 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support")
Signed-off-by: Vaibhav Jai
Thanks for reviewing this patch Aneesh,
"Aneesh Kumar K.V" writes:
> Vaibhav Jain writes:
>
>> Right now 'char *' elements allocated individual 'stat_id' in
>> 'papr_scm_priv.nvdimm_events_map' during papr_scm_pmu_check_event
x27;stat_id'. Also rest of the code
can continue to call 'kfree(papr_scm_priv.nvdimm_events_map)' without needing to
iterate over the array and free up individual elements.
Also introduce a new typedef called 'state_id_t' thats a 'u8[8]' and can be used
across papr_scm t
Hi Kajol,
Thanks for the patch. Minor review comment below:
Kajol Jain writes:
> With CONFIG_FORTIFY_SOURCE enabled, string functions will also perform
> dynamic checks for string size which can panic the kernel,
> like incase of overflow detection.
>
> In papr_scm, papr_scm_pmu_check_events fu
Dan Williams writes:
> On Tue, Mar 22, 2022 at 7:30 AM kajoljain wrote:
>>
>>
>>
>> On 3/22/22 03:09, Dan Williams wrote:
>> > On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote:
>> >>
>> >> The following build failure occures when CONFIG_PERF_EVENTS is not set
>> >> as generic pmu functions are
Stephen Rothwell writes:
> Hi all,
>
> Today's linux-next merge of the nvdimm tree got a conflict in:
>
> arch/powerpc/platforms/pseries/papr_scm.c
>
> between commit:
>
> bbbca72352bb ("powerpc/papr_scm: Implement initial support for injecting
> smart errors")
>
> from the powerpc tree and
ject' as payload thats
exchanged between libndctl and papr_scm to indicate the requested
smart-error states.
When the processing the PDSM 'SMART_INJECT', papr_pdsm_smart_inject()
constructs a pair or 'inject_mask' and 'clear_mask' bitmaps from the payload
and
Hi Ira, Thanks for reviewing this patch.
Ira Weiny writes:
> On Thu, Jan 13, 2022 at 05:32:52PM +0530, Vaibhav Jain wrote:
> [snip]
>
>>
>> +/* Inject a smart error Add the dirty-shutdown-counter value to the pdsm */
>> +static int papr_pdsm_smart_inj
Thanks for reviewing this patch Aneesh. My responses to your comments
below:
"Aneesh Kumar K.V" writes:
> Vaibhav Jain writes:
>
>> Presently PAPR doesn't support injecting smart errors on an
>> NVDIMM. This makes testing the NVDIMM health reporting functio
r_pdsm_smart_inject()
constructs a pair or 'mask' and 'override' bitmaps from the payload
and bit-blt it to the 'health_bitmap_{mask, override}' members. This
ensures the after being fetched from the hypervisor, the health_bitmap
reflects requested smart-error states
ndtest and papr_scm via
>> newly
>> introduced include/linux/papr_scm.h.
>>
>> Signed-off-by: Shivaprasad G Bhat
>> Signed-off-by: Vaibhav Jain
>> Suggested-by: "Aneesh Kumar K.V"
>> ---
>> Changelog:
>>
>> Since v1:
>>
The patch is based on [2] "powerpc/papr_scm: Move duplicate
definitions to common header files".
[1] : https://en.wikipedia.org/wiki/Bit_blit
[2] :
https://lore.kernel.org/nvdimm/162505488483.72147.12741153746322191381.stgit@56e104a48989
Signed-off-by: Vaibhav Jain
Signed-off-by: Shivapr
add a new member called 'dimm_dsc' presence of
which is indicated by the newly introduced PDSM_DIMM_DSC_VALID flag.
References:
[1] https://pmem.io/documents/Dirty_Shutdown_Handling-V1.0.pdf
Signed-off-by: Vaibhav Jain
Reviewed-by: Aneesh Kumar K.V
---
Changelog:
Resend:
* Added ack by Anee
Thanks for catching this Santosh. Have fixed this in v2 version of this
patch
--
Cheers
~ Vaibhav
Santosh Sivaraj writes:
> Hi Vaibhav,
>
> Vaibhav Jain writes:
>
>> Persistent memory devices like NVDIMMs can loose cached writes in case
>> something prevents f
add a new member called 'dimm_dsc' presence of
which is indicated by the newly introduced PDSM_DIMM_DSC_VALID flag.
References:
[1] https://pmem.io/documents/Dirty_Shutdown_Handling-V1.0.pdf
Signed-off-by: Vaibhav Jain
---
Changelog:
v2:
* Rebased the patch on latest ppc-next tree
* s/psdm/ps
add a new member called 'dimm_dsc' presence of
which is indicated by the newly introduced PDSM_DIMM_DSC_VALID flag.
References:
[1] https://pmem.io/documents/Dirty_Shutdown_Handling-V1.0.pdf
Signed-off-by: Vaibhav Jain
---
arch/powerpc/include/uapi/asm/papr_pdsm.h | 6 +
ar
Thanks for looking into this patch Dan,
Dan Williams writes:
> On Fri, May 7, 2021 at 4:40 AM Vaibhav Jain wrote:
>>
>> In case performance stats for an nvdimm are not available, reading the
>> 'perf_stats' sysfs file returns an -ENOENT error. A better approac
ols/scripts that are dependent on presence of its
sysfs file. Hence I dont expect any user-space breakage with this
patch.
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
Reviewed-by: Dan Williams
Signed-off-by: Vaibhav Jain
---
Changelog:
v3:
* Minor spe
formance stats-query
operation is not supported on this nvdimm.
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
Signed-off-by: Vaibhav Jain
---
Changelog
v3:
* Return EOPNOTSUPP error in case of H_UNSUPPORTED [ Ira ]
* Return EPERM in case of H_AUT
Hi Ira,
Thanks for looking into this patch
Ira Weiny writes:
> On Thu, May 06, 2021 at 12:46:06AM +0530, Vaibhav Jain wrote:
>> Currently drc_pmem_qeury_stats() generates a dev_err in case
>> "Enable Performance Information Collection" feature is disabled from
>&g
"Aneesh Kumar K.V" writes:
> Vaibhav Jain writes:
>
>> In case performance stats for an nvdimm are not available, reading the
>> 'perf_stats' sysfs file returns an -ENOENT error. A better approach is
>> to make the 'perf_stats' file entire
riv.stat_buffer_len' is moved
from papr_scm_nvdimm_init() to papr_scm_probe() so that it value is
available when 'papr_nd_attribute_visible()' is called during nvdimm
initialization.
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
S
riv.stat_buffer_len' is moved
from papr_scm_nvdimm_init() to papr_scm_probe() so that it value is
available when 'papr_nd_attribute_visible()' is called during nvdimm
initialization.
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP
icating that performance stats-query
operation is not supported on this nvdimm.
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
Signed-off-by: Vaibhav Jain
---
Changelog
v2:
* Updated the message logged in case of H_AUTHORITY error [ Ira ]
* Switc
Andy Shevchenko writes:
> On Thu, Apr 15, 2021 at 8:10 PM Vaibhav Jain wrote:
>>
>>
>> Thanks for the patch Andy,
>>
>> Unfortunately ran into a compilation issue due to missing "#include
>> " that provides definition for
>> get_unal
Thanks for the patch Andy,
Unfortunately ran into a compilation issue due to missing "#include
" that provides definition for
get_unaligned_le64(). Gcc reported following error:
error: implicit declaration of function ‘get_unaligned_le64’
After including the necessary header file, kernel comp
Ira Weiny writes:
> On Wed, Apr 14, 2021 at 09:51:40PM +0530, Vaibhav Jain wrote:
>> Thanks for looking into this patch Ira,
>>
>> Ira Weiny writes:
>>
>> > On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote:
>> >> Currently dr
Thanks for looking into this Dan,
Dan Williams writes:
> On Wed, Apr 14, 2021 at 5:40 AM Vaibhav Jain wrote:
>>
>> Currently drc_pmem_qeury_stats() generates a dev_err in case
>> "Enable Performance Information Collection" feature is disabled from
>>
Thanks for looking into this patch Ira,
Ira Weiny writes:
> On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote:
>> Currently drc_pmem_qeury_stats() generates a dev_err in case
>> "Enable Performance Information Collection" feature is disabled from
>>
s in-accessible".
Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerp
"Aneesh Kumar K.V" writes:
> Vaibhav Jain writes:
>
>> Hi Shiva,
>>
>> Apologies for a late review but something just caught my eye while
>> working on a different patch.
>>
>> Shivaprasad G Bhat writes:
>>
>>> Add support f
Hi Shiva,
Apologies for a late review but something just caught my eye while
working on a different patch.
Shivaprasad G Bhat writes:
> Add support for ND_REGION_ASYNC capability if the device tree
> indicates 'ibm,hcall-flush-required' property in the NVDIMM node.
> Flush is done by issuing H_
Hi Mpe,
Thanks for looking into this patch.
Michael Ellerman writes:
> Vaibhav Jain writes:
>> While removing large number of mappings from hash page tables for
>> large memory systems as soft-lockup is reported because of the time
>> spent inside htap_remove_map
() to the loop in
htap_remove_mapping() that issues hcall to remove hpte mapping. The
call to cond_resched() is issued every HZ jiffies which should prevent
the soft-lockup from being reported.
Suggested-by: Aneesh Kumar K.V
Signed-off-by: Vaibhav Jain
---
Changelog:
v2: Issue cond_resched
force query of nvdimm
health via __drc_pmem_query_health() and if nvdimm is found to be
unarmed then set the nvdimm flag ND_UNARMED for nvdimm_create().
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch
Hi Shiva,
Thanks for the patch. Few minor review comments:
Shivaprasad G Bhat writes:
> Add support for ND_REGION_ASYNC capability if the device tree
> indicates 'ibm,hcall-flush-required' property in the NVDIMM node.
> Flush is done by issuing H_SCM_FLUSH hcall to the hypervisor.
>
> If the
() to the loop in
htap_remove_mapping() that issues hcall to remove hpte mapping. This
should prevent the soft-lockup from being reported.
Suggested-by: Aneesh Kumar K.V
Signed-off-by: Vaibhav Jain
---
arch/powerpc/mm/book3s64/hash_utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a
y is queried by newly introduced 'papr_scm_get_stat()' that
verifies if the requested nvdimm-stat is supported and if yes does an
hcall via 'drc_pmem_query_stat()' to request the performance-stat and
return it back to libnvdimm.
Signed-off-by: Vaibhav Jain
---
arch/powerp
-ENOENT) for
request to read that nvdimm-statistic.
The value for a specific nvdimm-stat is exchanged via newly introduced
'struct nd_cmd_get_dimm_stat' that hold a single statistics and a
union of possible values types. Presently only '__s64' type of generic
attributes are supporte
@ Description:
> * "MedWDur " : Media Write Duration
> * "CchRHCnt" : Cache Read Hit Count
> * "CchWHCnt" : Cache Write Hit Count
> - * "FastWCnt" : Fast Write Count
> \ No newline at end of file
> + * "FastWCnt" : Fast Write Count
Thanks,
I am fine with proposed changes to sysfs-bus-papr-pmem.
Acked-by: Vaibhav Jain # for sysfs-bus-papr-pmem
Hi Dan, Ira and Vishal,
Can you please take a look at this patch. Without it the functionality
to report nvdimm health via ndctl breaks on 5.9
Thanks,
~ Vaibhav
Vaibhav Jain writes:
> Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask'
> acceptable by papr_scm. T
Thanks for the patch. This looks good to me.
Wang Wensheng writes:
> Build the kernel with 'make C=2':
> arch/powerpc/platforms/pseries/papr_scm.c:825:1: warning: symbol
> 'dev_attr_perf_stats' was not declared. Should it be static?
> Signed-off-by: Wang Wen
Michael Ellerman writes:
> Vaibhav Jain writes:
>> A warning is reported by the kernel in case perf_stats_show() returns
>> an error code. The warning is of the form below:
>>
>> papr_scm ibm,persistent-memory:ibm,pmemory@4411:
>>Failed to
t struct member gone, various
functions that depended on it are updated. Specifically
perf_stats_show() is updated to query the PHYP first for the size of
buffer needed to hold all performance statistics instead of relying on
'stat_buffer_len'
Signed-off-by: Vaibhav Jain
---
arch/powerp
CALL processing to ensure only known command families can use
the general ND_CMD_CALL pass-through functionality.
Without this change the ND_CMD_CALL pass-through targeting
NVDIMM_FAMILY_PAPR error out with -EINVAL.
Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices")
Signed
Ira Weiny writes:
> On Sat, Sep 12, 2020 at 01:36:46AM +0530, Vaibhav Jain wrote:
>> Thanks for reviewing this patch Ira,
>>
>>
>> Ira Weiny writes:
>>
>> > On Thu, Sep 10, 2020 at 02:52:12PM +0530, Vaibhav Jain wrote:
>> >> A war
x27; to
'ssize_t' that prevents the compiler from truncating the return value
of drc_pmem_query_stats() and returning correct signed value back from
perf_stats_show().
Fixes: 2d02bf835e573 ('powerpc/papr_scm: Fetch nvdimm performance
stats from PHYP')
Signed-off-by: Vaibhav Jain
---
Thanks for reviewing this patch Ira,
Ira Weiny writes:
> On Thu, Sep 10, 2020 at 02:52:12PM +0530, Vaibhav Jain wrote:
>> A warning is reported by the kernel in case perf_stats_show() returns
>> an error code. The warning is of the form below:
>>
>> papr_scm ibm,pe
x27; to
'ssize_t' that prevents the compiler from truncating the return value
of drc_pmem_query_stats() and returning correct signed value back from
perf_stats_show().
Fixes: 2d02bf835e573 ('powerpc/papr_scm: Fetch nvdimm performance
stats from PHYP')
Signed-off-by: Vaibhav Jain
---
arc
m performance stats from
PHYP')
Reported-by: Aneesh Kumar K.V
Signed-off-by: Vaibhav Jain
---
Change-log:
v2:
* Instead of checking for perfmon_capable() inside show_perf_stats()
set the attribute as DEVICE_ATTR_ADMIN_RO [ Aneesh ]
* Update patch description
---
arch/powerpc/platforms/pseries/p
Thanks Aneesh and Mpe for reviewing this patch.
Michael Ellerman writes:
> "Aneesh Kumar K.V" writes:
[snip]
>>>
>>> + /* Allow access only to perfmon capable users */
>>> + if (!perfmon_capable())
>>> + return -EACCES;
>>> +
>>
>> An access check is usually done in open(). Thi
s causes a loop
in sysfs's 'create_files()' to read garbage beyond bounds of
'nvdimm_firmware_attributes' and trigger the oops.
Fixes: 48001ea50d17f ("PM, libnvdimm: Add runtime firmware activation support")
Reported-by: Sandipan Das
Signed-off-by: Vaibhav Jain
('powerpc/papr_scm: Fetch nvdimm performance stats from
PHYP')
Reported-by: Aneesh Kumar K.V
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerpc
Hi Mpe,
Thanks for reviewing this patch. My responses below:
Michael Ellerman writes:
> Vaibhav Jain writes:
>> The newly introduced 'perf_stats' attribute uses the default access
>> mode of 0444 letting non-root users access performance stats of an
>> nvdimm a
hence its better to ward of access to this attribute
from non-root users.
Hence this patch updates the access-mode of 'perf_stats' sysfs
attribute file to 0400 to make it only readable to root-users.
Reported-by: Aneesh Kumar K.V
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platform
issues the HCALL to PHYP. The return value
of the stat is then populated in the 'struct
nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag
'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct
nd_papr_pdsm_health.extension_flags'
Signed-off-by: Vaibhav J
in the
buffer are formatted into the sysfs access function output buffer.
Signed-off-by: Vaibhav Jain
---
Changelog:
v4:
* Fixed a build issue with this patch by moving a hunk from second
patch in series to this patch. [ Aneesh ]
v3:
* Updated drc_pmem_query_stats() to not require
ch performance stats
catalogue. The patch also implements support for 'perf_stats' sysfs
attribute to report the full catalogue of supported performance stats
by PHYP.
Second and final patch implements support for sending this value to
libndctl by extending the PAPR_PDSM_HEALTH pdsm payload
1 - 100 of 493 matches
Mail list logo