Re: [PATCH v3 0/4] Extending NMI watchdog during LPM

2022-07-12 Thread Laurent Dufour
Le 12/07/2022 à 03:21, Nicholas Piggin a écrit : > Excerpts from Laurent Dufour's message of June 27, 2022 11:53 pm: >> When a partition is transferred, once it arrives at the destination node, >> the partition is active but much of its memory must be transferred from the >> start node. >> >> It

Re: [PATCH v3 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-12 Thread Laurent Dufour
Le 12/07/2022 à 03:46, Nicholas Piggin a écrit : > Excerpts from Laurent Dufour's message of June 27, 2022 11:53 pm: >> During a LPM, while the memory transfer is in progress on the arrival side, >> some latencies is generated when accessing not yet transferred pages on the >> arrival side. Thus,

Re: [PATCH v3 1/4] powerpc/mobility: wait for memory transfer to complete

2022-07-12 Thread Laurent Dufour
Le 12/07/2022 à 03:33, Nicholas Piggin a écrit : > Excerpts from Laurent Dufour's message of June 27, 2022 11:53 pm: >> In pseries_migration_partition(), loop until the memory transfer is >> complete. This way the calling drmgr process will not exit earlier, >> allowing callbacks to be run only

Re: [PATCH v3 3/4] powerpc/watchdog: introduce a NMI watchdog's factor

2022-07-12 Thread Laurent Dufour
Le 12/07/2022 à 03:42, Nicholas Piggin a écrit : > Excerpts from Laurent Dufour's message of June 27, 2022 11:53 pm: >> Introduce a factor which would apply to the NMI watchdog timeout. >> >> This factor is a percentage added to the watchdog_tresh value. The value is >> set under the

Re: [PATCH v2 3/4] powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h

2022-07-12 Thread Yujie Liu
Hi Christophe, Thanks for your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on mkp-scsi/for-next jejb-scsi/for-next linus/master v5.19-rc5 next-20220707] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-07-12 Thread Christophe Leroy
Le 11/07/2022 à 23:48, Segher Boessenkool a écrit : > Hi! > > On Mon, Jul 11, 2022 at 05:32:09PM +, Christophe Leroy wrote: >> Le 11/07/2022 à 18:14, Segher Boessenkool a écrit : CC arch/powerpc/kernel/irq.o {standard input}: Assembler messages: {standard

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-07-12 Thread Segher Boessenkool
On Tue, Jul 12, 2022 at 09:22:12AM +, Christophe Leroy wrote: > Le 11/07/2022 à 23:48, Segher Boessenkool a écrit : > > I believe the eieio instruction is disabled on some e500 models, because > > it does not work correctly, so EIEIO_EN=1 cannot work, something like > > that? > > Don't know.

Re: [PATCH v6 4/6] tpm: of: Make of-tree specific function commonly available

2022-07-12 Thread Stefan Berger
On 7/11/22 18:04, Mimi Zohar wrote: Hi Stefan, On Thu, 2022-07-07 at 13:20 -0400, Stefan Berger wrote: - /* -* For both vtpm/tpm, firmware has log addr and log size in big -* endian format. But in case of vtpm, there is a method called -* sml-handover which is

[PATCH v4 0/4] Extending NMI watchdog during LPM

2022-07-12 Thread Laurent Dufour
When a partition is transferred, once it arrives at the destination node, the partition is active but much of its memory must be transferred from the start node. It depends on the activity in the partition, but the more CPU the partition has, the more memory to be transferred is likely to be.

[PATCH v4 3/4] powerpc/watchdog: introduce a NMI watchdog's factor

2022-07-12 Thread Laurent Dufour
Introduce a factor which would apply to the NMI watchdog timeout. This factor is a percentage added to the watchdog_tresh value. The value is set under the watchdog_mutex protection and lockup_detector_reconfigure() is called to recompute wd_panic_timeout_tb. Once the factor is set, it remains

[PATCH v4 1/4] powerpc/mobility: wait for memory transfer to complete

2022-07-12 Thread Laurent Dufour
In pseries_migration_partition(), loop until the memory transfer is complete. This way the calling drmgr process will not exit earlier, allowing callbacks to be run only once the migration is fully completed. If reading the VASI state is done after the hypervisor has completed the migration, the

[PATCH v4 2/4] watchdog: export lockup_detector_reconfigure

2022-07-12 Thread Laurent Dufour
In some circumstances it may be interesting to reconfigure the watchdog from inside the kernel. On PowerPC, this may helpful before and after a LPAR migration (LPM) is initiated, because it implies some latencies, watchdog, and especially NMI watchdog is expected to be triggered during this

[PATCH v4 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-12 Thread Laurent Dufour
During a LPM, while the memory transfer is in progress on the arrival side, some latencies is generated when accessing not yet transferred pages on the arrival side. Thus, the NMI watchdog may be triggered too frequently, which increases the risk to hit a NMI interrupt in a bad place in the

[REPOST PATCH] ndtest: Cleanup all of blk namespace specific code

2022-07-12 Thread Shivaprasad G Bhat
With the nd_namespace_blk and nd_blk_region infrastructures being removed, the ndtest still has some references to the old code. So the compilation fails as below, ../tools/testing/nvdimm/test/ndtest.c:204:25: error: ‘ND_DEVICE_NAMESPACE_BLK’ undeclared here (not in a function); did you mean

Re: [PATCH v4 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-12 Thread Randy Dunlap
Hi-- On 7/12/22 07:32, Laurent Dufour wrote: > During a LPM, while the memory transfer is in progress on the arrival side, > some latencies is generated when accessing not yet transferred pages on the are > arrival side. Thus, the NMI watchdog may be triggered too frequently,

Re: [PATCH 1/2] powerpc: add BookS wait opcode macro

2022-07-12 Thread Segher Boessenkool
Hi! On Mon, Jul 11, 2022 at 01:11:27PM +1000, Nicholas Piggin wrote: > The wait instruction has a different encoding between BookE and BookS. > Add the BookS variant. > #define PPC_RAW_WAIT(w) (0x7c7c | __PPC_WC(w)) > +#define PPC_RAW_WAIT_BOOKS(w, p) (0x7c3c |

Re: [PATCH 1/2] cxl: Use the bitmap API to allocate bitmaps

2022-07-12 Thread Andrew Donnellan
On Mon, 2022-07-11 at 21:14 +0200, Christophe JAILLET wrote: > Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. > > It is less verbose and it improves the semantic. > > Signed-off-by: Christophe JAILLET Thanks! Acked-by: Andrew Donnellan > --- >  drivers/misc/cxl/context.c |

Re: [PATCH 2/2] cxl: Fix a memory leak in an error handling path

2022-07-12 Thread Andrew Donnellan
On Mon, 2022-07-11 at 21:14 +0200, Christophe JAILLET wrote: > A bitmap_zalloc() must be balanced by a corresponding bitmap_free() > in the > error handling path of afu_allocate_irqs(). > > Signed-off-by: Christophe JAILLET Thanks for catching this. Acked-by: Andrew Donnellan > --- > The

[PATCH 1/2] powerpc/pseries: define driver for Platform KeyStore

2022-07-12 Thread Nayna Jain
PowerVM provides an isolated Platform Keystore(PKS) storage allocation for each LPAR with individually managed access controls to store sensitive information securely. It provides a new set of hypervisor calls for Linux kernel to access PKS storage. Define PLPKS driver using H_CALL interface to

RE: [REPOST PATCH] ndtest: Cleanup all of blk namespace specific code

2022-07-12 Thread Dan Williams
Shivaprasad G Bhat wrote: > With the nd_namespace_blk and nd_blk_region infrastructures being removed, > the ndtest still has some references to the old code. So the > compilation fails as below, > > ../tools/testing/nvdimm/test/ndtest.c:204:25: error: > ‘ND_DEVICE_NAMESPACE_BLK’ undeclared here

[PATCH 2/2] powerpc/pseries: kernel interfaces to PLPKS platform driver

2022-07-12 Thread Nayna Jain
From: Greg Joyce Add platform specific interfaces arch_read_variable() and arch_variable() to allow platform agnostic access to platform variable stores. Signed-off-by: Greg Joyce --- arch/powerpc/platforms/pseries/plpks/Makefile | 1 + .../platforms/pseries/plpks/plpks_arch_ops.c | 163

[PATCH 0/2] Provide PowerVM LPAR Platform KeyStore driver for Self Encrypting Drives

2022-07-12 Thread Nayna Jain
PowerVM provides an isolated Platform KeyStore(PKS)[1] storage allocation for each partition(LPAR) with individually managed access controls to store sensitive information securely. The Linux Kernel can access this storage by interfacing with the hypervisor using a new set of hypervisor calls.

Re: oob read in do_adb_query function

2022-07-12 Thread Benjamin Herrenschmidt
On Wed, 2022-07-13 at 09:54 +0800, sohu0106 wrote: > > > In do_adb_query function of drivers/macintosh/adb.c, req->data is > copy form userland. the parameter "req->data[2]" is Missing check, > the array size of adb_handler[] is 16, so "adb_handler[req- > >data[2]].original_address" and

oob read in do_adb_query function

2022-07-12 Thread sohu0106
In do_adb_query function of drivers/macintosh/adb.c, req->data is copy form userland. the parameter "req->data[2]" is Missing check, the array size of adb_handler[] is 16, so "adb_handler[req->data[2]].original_address" and "adb_handler[req->data[2]].handler_id" will lead to oob read.  

Re: [PATCH 1/2] powerpc/kvm: Move pmu code in kvm folder to separate file for power9 and later platforms

2022-07-12 Thread Nicholas Piggin
Excerpts from Kajol Jain's message of July 11, 2022 1:49 pm: > File book3s_hv_p9_entry.c in powerpc/kvm folder consists of functions > like freeze_pmu, switch_pmu_to_guest and switch_pmu_to_host which are > specific to Performance Monitoring Unit(PMU) for power9 and later > platforms. > > For

Re: [PATCH 2/2] powerpc/kvm: Remove comment related to moving PMU code to perf subsystem

2022-07-12 Thread Nicholas Piggin
Excerpts from Kajol Jain's message of July 11, 2022 1:49 pm: > Commit aabcaf6ae2a0 ("KVM: PPC: Book3S HV P9: Move host OS save/restore > functions to built-in") added a comment in switch_pmu_to_guest > function, indicating possibility of moving PMU handling code > to perf subsystem. But perf