Re: [PATCH v2] powerpc/pseries/hotplug-cpu: wait indefinitely for vCPU death

2020-08-12 Thread Greg Kurz
h the cleanup, causing the race with > the XIVE cleanup code executed by the unplugged CPU. > > Fix this by waiting indefinitely, but also making an effort to avoid > spurious lockup messages by allowing for rescheduling after polling > the CPU status and printing a warning if we wai

Re: [PATCH] powerpc/pseries/hotplug-cpu: increase wait time for vCPU death

2020-08-04 Thread Greg Kurz
time. > How long should that be ? > > > Fixes: eac1e731b59ee ("powerpc/xive: guest exploitation of the XIVE > > interrupt controller") > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1856588 > > This is not public. > I'll have a look at c

Re: [PATCH -next] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

2020-07-15 Thread Greg Kurz
On Wed, 15 Jul 2020 10:50:40 +0800 YueHaibing wrote: > commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()") > left behind this, remove it. > > Signed-off-by: YueHaibing > --- Reviewed-by: Greg Kurz > arch/powerpc/include/asm/xive.h | 1 - &

[PATCH] KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check

2020-11-30 Thread Greg Kurz
_xive_vcpu_id_valid() so that it checks the packed vCPU id is below xive->nr_servers, which is explicitly what we want. Fixes: 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") Cc: sta...@vger.kernel.org # v5.5+ Signed-off-by: Greg Kurz --- arch/powerpc

Re: [PATCH v2 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
rtqueues are correctly dispatched between the CPUs > on pseries. > Since it is public, maybe add: BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1702939 ? > Signed-off-by: Laurent Vivier > --- Anyway, Reviewed-by: Greg Kurz > arch/powerpc/platforms/pseries/msi.c | 3 ++- &

Re: [PATCH v2 1/2] genirq: add an irq_create_mapping_affinity() function

2020-11-25 Thread Greg Kurz
t; to pass NULL for the affinity parameter. > > No functional change. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > include/linux/irqdomain.h | 12 ++-- > kernel/irq/irqdomain.c| 13 - > 2 files changed, 18 insertions(+), 7 delet

Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Greg Kurz
On Wed, 25 Nov 2020 16:42:30 + Marc Zyngier wrote: > On 2020-11-25 16:24, Laurent Vivier wrote: > > On 25/11/2020 17:05, Denis Kirjanov wrote: > >> On 11/25/20, Laurent Vivier wrote: > >>> With virtio multiqueue, normally each queue IRQ is mapped to a CPU. > >>> > >>> But since commit

Re: [PATCH 03/13] powerpc/xive: Introduce XIVE_IPI_HW_IRQ

2020-12-08 Thread Greg Kurz
handle EOI. This can cause > performance issues in some benchmark (ipistorm) on multichip systems. > > Clarify the use of the 0 value, it will help in improving multichip > support. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/

Re: [PATCH 08/13] powerpc: Increase NR_IRQS range to support more KVM guests

2020-12-08 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:19 +0100 Cédric Le Goater wrote: > PowerNV systems can handle up to 4K guests and 1M interrupt numbers > per chip. Increase the range of allowed interrupts to support a larger > number of guests. > > Signed-off-by: Cédric Le Goater > --- Revi

Re: [PATCH 02/13] powerpc/xive: Rename XIVE_IRQ_NO_EOI to show its a flag

2020-12-08 Thread Greg Kurz
erently from the rest. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/include/asm/xive.h | 2 +- > arch/powerpc/kvm/book3s_xive.c| 4 ++-- > arch/powerpc/sysdev/xive/common.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) >

Re: [PATCH 09/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG

2020-12-08 Thread Greg Kurz
: Cédric Le Goater > --- Reviewed-by: Greg Kurz Just a minor suggestion in case you need to post a v2. See below. > arch/powerpc/include/asm/opal-api.h | 2 +- > arch/powerpc/include/asm/xive.h | 2 +- > arch/powerpc/kvm/book3s_xive_native.c | 3 --- > arch/power

Re: [PATCH 11/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW

2020-12-09 Thread Greg Kurz
hich is now unused. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz Same suggestion as with previous patch. > arch/powerpc/include/asm/opal-api.h | 2 +- > arch/powerpc/include/asm/xive.h | 2 +- > arch/powerpc/sysdev/xive/xive-i

Re: [PATCH 07/13] powerpc/xive: Add a debug_show handler to the XIVE irq_domain

2020-12-09 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:18 +0100 Cédric Le Goater wrote: > Full state of the Linux interrupt descriptors can be dumped under > debugfs when compiled with CONFIG_GENERIC_IRQ_DEBUGFS. Add support for > the XIVE interrupt controller. > > Signed-off-by: Cédric Le Goater > --- >

Re: [PATCH 10/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_MASK_FW

2020-12-09 Thread Greg Kurz
: Cédric Le Goater > --- Reviewed-by: Greg Kurz In case a v2 is required, same suggestion to comment out the removed items entirely, plus fix an indent nit > arch/powerpc/include/asm/opal-api.h | 2 +- > arch/powerpc/include/asm/xive.h | 2 +- > arch/power

Re: [PATCH 12/13] powerpc/xive: Simplify xive_do_source_eoi()

2020-12-09 Thread Greg Kurz
indeed. Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 72 ++- > 1 file changed, 33 insertions(+), 39 deletions(-) > > diff --git a/arch/powerpc/sysdev/xive/common.c > b/arch/powerpc/sysdev/xive/common.c > index fe6229dd3241..fb438203d5e

Re: [PATCH 13/13] powerpc/xive: Improve error reporting of OPAL calls

2020-12-09 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:24 +0100 Cédric Le Goater wrote: > Introduce a vp_err() macro to standardize error reporting. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/native.c | 28 > 1 file chan

Re: [RFC Qemu PATCH v2 2/2] spapr: nvdimm: Implement async flush hcalls

2020-12-21 Thread Greg Kurz
On Mon, 30 Nov 2020 09:17:24 -0600 Shivaprasad G Bhat wrote: > When the persistent memory beacked by a file, a cpu cache flush instruction > is not sufficient to ensure the stores are correctly flushed to the media. > > The patch implements the async hcalls for flush operation on demand from

Re: [RFC Qemu PATCH v2 0/2] spapr: nvdimm: Asynchronus flush hcall support

2020-12-21 Thread Greg Kurz
On Mon, 30 Nov 2020 09:16:14 -0600 Shivaprasad G Bhat wrote: > The nvdimm devices are expected to ensure write persistent during power > failure kind of scenarios. > > The libpmem has architecture specific instructions like dcbf on power > to flush the cache data to backend nvdimm device during

Re: [RFC Qemu PATCH v2 1/2] spapr: drc: Add support for async hcalls at the drc level

2020-12-21 Thread Greg Kurz
On Mon, 21 Dec 2020 13:08:53 +0100 Greg Kurz wrote: > Hi Shiva, > > On Mon, 30 Nov 2020 09:16:39 -0600 > Shivaprasad G Bhat wrote: > > > The patch adds support for async hcalls at the DRC level for the > > spapr devices. To be used by spapr-scm device

Re: [RFC Qemu PATCH v2 1/2] spapr: drc: Add support for async hcalls at the drc level

2020-12-21 Thread Greg Kurz
Hi Shiva, On Mon, 30 Nov 2020 09:16:39 -0600 Shivaprasad G Bhat wrote: > The patch adds support for async hcalls at the DRC level for the > spapr devices. To be used by spapr-scm devices in the patch/es to follow. > > Signed-off-by: Shivaprasad G Bhat > --- The overall idea looks good but I

Re: [PATCH] KVM: PPC: Book3S: Assign boolean values to a bool variable

2020-11-06 Thread Greg Kurz
NG: Assignment of 0/1 to bool > variable > > Reported-by: Tosk Robot > Signed-off-by: Kaixu Xia > --- Reviewed-by: Greg Kurz > arch/powerpc/kvm/book3s_xics.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s

Re: [PATCH] KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page

2020-11-05 Thread Greg Kurz
lid ESB page for source 8 ! > > Fix that by checking the validity of the KVM XIVE interrupt structure. > > Reported-by: Greg Kurz > Signed-off-by: Cédric Le Goater > --- Looks sane to me. QEMU still crashes on SIGBUS but no more oops at least. Tested-by: Greg Kurz > arc

Re: [PATCH] powerpc: Fix initrd corruption with relative jump labels

2021-06-14 Thread Greg Kurz
Fixes: b0b3b2c78ec0 ("powerpc: Switch to relative jump labels") > Reported-by: Anastasia Kovaleva > Reported-by: Roman Bolshakov > Reported-by: Greg Kurz > Reported-by: Daniel Axtens > Signed-off-by: Michael Ellerman > --- Great thanks for debugging this issue ! I

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-06-07 Thread Greg Kurz
On Tue, 01 Jun 2021 17:36:15 +1000 Michael Ellerman wrote: > Roman Bolshakov writes: > > On Sat, May 29, 2021 at 09:39:49AM +1000, Michael Ellerman wrote: > >> Roman Bolshakov writes: > >> > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. > >> > > >> > Otherwise, direct kernel

Re: [PATCH] powerpc: Fix initrd corruption with relative jump labels

2021-06-15 Thread Greg Kurz
On Mon, 14 Jun 2021 17:57:40 +0200 Greg Kurz wrote: > On Mon, 14 Jun 2021 23:14:40 +1000 > Michael Ellerman wrote: > > > Commit b0b3b2c78ec0 ("powerpc: Switch to relative jump labels") switched > > us to using relative jump labels. That involves changing the c

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-05-28 Thread Greg Kurz
gt; > Cc: Christophe Leroy > Reported-by: Anastasia Kovaleva > Signed-off-by: Roman Bolshakov > --- I'm observing the very same issue and reverting the offending commit fixes it indeed. Until someone has investigated the root cause, this looks like a reasonable bug fix to me. Reviewed-

Re: [PATCH] memblock: make for_each_mem_range() traverse MEMBLOCK_HOTPLUG regions

2021-07-12 Thread Greg Kurz
09 ]--- > > Making for_each_mem_range() include MEMBLOCK_HOTPLUG regions in the > traversal fixes this issue. > > Link: https://bugzilla.redhat.com/show_bug.cgi?id=1976100 > Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with > for_each_mem_range()") > Sign

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Fri, 26 Mar 2021 07:13:09 +0100 Christoph Hellwig wrote: > Hi all, > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > feature without any open source component - what would normally be > the normal open source userspace that we require for kernel drivers, > although

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Tue, 4 May 2021 14:59:07 +0200 Greg Kroah-Hartman wrote: > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > On Fri, 26 Mar 2021 07:13:09 +0100 > > Christoph Hellwig wrote: > > > > > Hi all, > > > > > > the nvlink2 vfio sub

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Tue, 4 May 2021 15:30:15 +0200 Greg Kroah-Hartman wrote: > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > On Tue, 4 May 2021 14:59:07 +0200 > > Greg Kroah-Hartman wrote: > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > &

Re: [PATCH] vfio/pci: Revert nvlink removal uAPI breakage

2021-05-04 Thread Greg Kurz
On Tue, 04 May 2021 09:52:02 -0600 Alex Williamson wrote: > Revert the uAPI changes from the below commit with notice that these > regions and capabilities are no longer provided. > > Fixes: b392a1989170 ("vfio/pci: remove vfio_pci_nvlink2") > Reported-by: Greg Ku

Re: [PATCH v3 0/9] powerpc/xive: Map one IPI interrupt per node

2021-04-01 Thread Greg Kurz
On Thu, 1 Apr 2021 11:18:10 +0200 Cédric Le Goater wrote: > Hello, > > On 4/1/21 10:04 AM, Greg Kurz wrote: > > On Wed, 31 Mar 2021 16:45:05 +0200 > > Cédric Le Goater wrote: > > > >> > >> Hello, > >> > >> ipistorm [*] can b

Re: [PATCH v3 0/9] powerpc/xive: Map one IPI interrupt per node

2021-04-01 Thread Greg Kurz
On Wed, 31 Mar 2021 16:45:05 +0200 Cédric Le Goater wrote: > > Hello, > > ipistorm [*] can be used to benchmark the raw interrupt rate of an > interrupt controller by measuring the number of IPIs a system can > sustain. When applied to the XIVE interrupt controller of POWER9 and > POWER10

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-12 Thread Greg Kurz
;> On 3/9/21 6:08 PM, Daniel Henrique Barboza wrote: > >>>> > >>>> > >>>> On 3/9/21 12:33 PM, Cédric Le Goater wrote: > >>>>> On 3/8/21 6:13 PM, Greg Kurz wrote: > >>>>>> On Wed, 3 Mar 2021 18:48:50 +0100 > >>

Re: [PATCH v2 5/8] powerpc/xive: Drop check on irq_data in xive_core_debug_show()

2021-03-09 Thread Greg Kurz
t; state") > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 deletions(-) > > diff --git a/arch/powerpc/sysdev/xive/common.c > b/arch/powerpc/sysdev/xive/c

Re: [PATCH v2 4/8] powerpc/xive: Simplify xive_core_debug_show()

2021-03-09 Thread Greg Kurz
On Mon, 8 Mar 2021 19:11:11 +0100 Cédric Le Goater wrote: > On 3/8/21 7:07 PM, Greg Kurz wrote: > > On Wed, 3 Mar 2021 18:48:53 +0100 > > Cédric Le Goater wrote: > > > >> Now that the IPI interrupt has its own domain, the checks on the HW > >> interrupt

Re: [PATCH v2 6/8] powerpc/xive: Simplify the dump of XIVE interrupts under xmon

2021-03-09 Thread Greg Kurz
On Wed, 3 Mar 2021 18:48:55 +0100 Cédric Le Goater wrote: > Move the xmon routine under XIVE subsystem and rework the loop on the > interrupts taking into account the xive_irq_domain to filter out IPIs. > > Signed-off-by: Cédric Le Goater > --- Nice again ! :) Reviewe

Re: [PATCH v2 7/8] powerpc/xive: Fix xmon command "dxi"

2021-03-09 Thread Greg Kurz
IRQ 0x0bad : no config rc=-6 Note that this also allows to show IPIs: 6:mon> dxi 0 IRQ 0x : target=0x0 prio=06 lirq=0x10 This is a bit inconsistent with output of the 0-argument form of "dxi", which filters them out for a reason that isn't obvious to me. No big deal thoug

Re: [PATCH v2 8/8] powerpc/xive: Map one IPI interrupt per node

2021-03-09 Thread Greg Kurz
3871 1042749 0 0 0 0 XIVE-IPI 0 Edge IPI-0 17: 0 0 0 0 2123 1019 1263 1288 XIVE-IPI 1 Edge IPI-1 IPIs are mapped to the appropriate nodes, and the number

[PATCH] powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#"

2021-03-09 Thread Greg Kurz
fall back to the #-less version of the command. Signed-off-by: Greg Kurz --- arch/powerpc/xmon/xmon.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 80fbf8968f77..d3d6e044228e 100644 --- a/arch/powerpc/xmon/xmon.c

Re: [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-15 Thread Greg Kurz
e > Signed-off-by: Cédric Le Goater > --- Makes sense. FWIW Reviewed-by: Greg Kurz > arch/powerpc/include/asm/topology.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/topology.h > b/arch/powerpc/include/asm/topology

Re: [PATCH v2 4/8] powerpc/xive: Simplify xive_core_debug_show()

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 10:13:39 +0100 Greg Kurz wrote: > On Mon, 8 Mar 2021 19:11:11 +0100 > Cédric Le Goater wrote: > > > On 3/8/21 7:07 PM, Greg Kurz wrote: > > > On Wed, 3 Mar 2021 18:48:53 +0100 > > > Cédric Le Goater wrote: > > > > >

Re: [PATCH v2 4/8] powerpc/xive: Simplify xive_core_debug_show()

2021-03-08 Thread Greg Kurz
houldn't this have the following tags ? Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Anyway, Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 18 -- > 1

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-08 Thread Greg Kurz
On Wed, 3 Mar 2021 18:48:50 +0100 Cédric Le Goater wrote: > The 'chip_id' field of the XIVE CPU structure is used to choose a > target for a source located on the same chip when possible. This field > is assigned on the PowerNV platform using the "ibm,chip-id" property > on pSeries under KVM

Re: [PATCH v2 3/8] powerpc/xive: Remove useless check on XIVE_IPI_HW_IRQ

2021-03-08 Thread Greg Kurz
On Wed, 3 Mar 2021 18:48:52 +0100 Cédric Le Goater wrote: > The IPI interrupt has its own domain now. Testing the HW interrupt > number is not needed anymore. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 3 +-- &g

Re: [PATCH v2 2/8] powerpc/xive: Introduce an IPI interrupt domain

2021-03-08 Thread Greg Kurz
PI interrupt from other interrupts of the system. > > Simplify the XIVE interrupt domain by introducing a specific domain > for the IPI. > > Signed-off-by: Cédric Le Goater > --- Nice ! Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 51 +---

[PATCH] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-12 Thread Greg Kurz
kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Signed-off-by: Greg Kurz --- arch/powerp

[PATCH v2] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-15 Thread Greg Kurz
kdump. Simply revert to the previous working behavior of ignoring affinity masks in this case only. Fixes: 9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to irq_create_mapping()") Cc: lviv...@redhat.com Cc: sta...@vger.kernel.org Reviewed-by: Laurent Vivier Reviewed-by: Cédric Le Go

Re: [PATCH v2] KVM: PPC: Defer vtime accounting 'til after IRQ handling

2021-10-07 Thread Greg Kurz
in the code as for x86 > Works for me. As you stated in your answer, someone can polish the code later on. Reviewed-by: Greg Kurz > arch/powerpc/kvm/book3s_hv.c | 24 > 1 file changed, 20 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s_hv

Re: [PATCH] KVM: PPC: Defer vtime accounting 'til after IRQ handling

2021-10-06 Thread Greg Kurz
On Wed, 6 Oct 2021 09:37:45 +0200 Laurent Vivier wrote: > Commit 61bd0f66ff92 has moved guest_enter() out of the interrupt > protected area to be able to have updated tick counters, but > commit 112665286d08 moved back to this area to avoid wrong > context warning (or worse). > > None of them

Re: [PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-16 Thread Greg Kurz
On Tue, 16 Nov 2021 15:49:13 +0100 Cédric Le Goater wrote: > On 11/16/21 15:23, Greg Kurz wrote: > > On Tue, 16 Nov 2021 14:40:22 +0100 > > Cédric Le Goater wrote: > > > >> Commit 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains > >> excl

Re: [PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-16 Thread Greg Kurz
stance, a linux KVM guest with virtio-rng and virtio-balloon > devices. > > Cc: Marc Zyngier > Cc: sta...@vger.kernel.org # v5.14+ > Fixes: 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains exclusive") > Signed-off-by: Cédric Le Goater > --- >

Re: [PATCH kernel] KVM: PPC: Book3s: Fix warning about xics_rm_h_xirr_x

2022-06-22 Thread Greg Kurz
ot. > > Fixes: b22af9041927 ("KVM: PPC: Book3s: Remove real mode interrupt controller > hcalls handlers") > Signed-off-by: Alexey Kardashevskiy > --- FWIW Reviewed-by: Greg Kurz > arch/powerpc/kvm/book3s_xics.h | 1 + > 1 file changed, 1 insertion(+) > &g

<    1   2   3