[PATCH 19/31] powerpc/xics: Add debug logging to the set_irq_affinity handlers

2021-04-30 Thread Cédric Le Goater
It really helps to know how the HW is configured when tweaking the IRQ subsystem. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/ics-opal.c | 2 +- arch/powerpc/sysdev/xics/ics-rtas.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xics

[PATCH 28/31] powerpc/powernv/pci: Set the IRQ chip data for P8/CXL devices

2021-04-30 Thread Cédric Le Goater
' driver. Rewriting this driver to support MSI would be a waste of time. Nevertheless, we can still remove the IRQ chip patch and set the IRQ chip data instead. This is cleaner. Cc: Frederic Barrat Cc: Christophe Lombard Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c

[PATCH 13/31] KVM: PPC: Book3S HV: Use the new IRQ chip to detect passthrough interrupts

2021-04-30 Thread Cédric Le Goater
Passthrough PCI MSI interrupts are detected in KVM with a check on a specific EOI handler (P8) or on XIVE (P9). We can now check the PCI-MSI IRQ chip which is cleaner. Cc: Paul Mackerras Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_hv.c | 2 +- arch/powerpc

[PATCH 07/31] powerpc/xive: Fix xive_irq_set_affinity for MSI

2021-04-30 Thread Cédric Le Goater
The MSI affinity is automanaged and it can be set before starting the associated IRQ. ( Should we simply remove the irqd_is_started() test ? ) Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 29/31] powerpc/powernv/pci: Rework pnv_opal_pci_msi_eoi()

2021-04-30 Thread Cédric Le Goater
from the pnv_phb struct. Cc: Paul Mackerras Cc: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/pnv-pci.h| 2 +- arch/powerpc/kvm/book3s_hv_rm_xics.c | 8 arch/powerpc/platforms/powernv/pci-ioda.c | 17 + 3 files changed

[PATCH 22/31] powerpc/pci: Drop XIVE restriction on MSI domains

2021-04-30 Thread Cédric Le Goater
The PowerNV and pSeries platforms now have support for both the XICS and XIVE IRQ domains. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +--- arch/powerpc/platforms/pseries/msi.c | 4 2 files changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH 20/31] powerpc/xics: Add support for IRQ domain hierarchy

2021-04-30 Thread Cédric Le Goater
XICS doesn't have any state associated with the IRQ. The support is straightforward and simpler than for XIVE. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 37 ++ 1 file changed, 37 insertions(+) diff --git a/arch/powerpc/sysdev/xics/xics

[PATCH 23/31] powerpc/xics: Drop unmask of MSIs at startup

2021-04-30 Thread Cédric Le Goater
That was a workaround in the XICS domain because of the lack of MSI domain. This is now handled. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/ics-opal.c | 11 --- arch/powerpc/sysdev/xics/ics-rtas.c | 9 - 2 files changed, 20 deletions(-) diff --git a/arch

[PATCH 25/31] powerpc/powernv/pci: Drop unused MSI code

2021-04-30 Thread Cédric Le Goater
MSIs should be fully managed by the PCI and IRQ subsystems now. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci.h | 6 -- arch/powerpc/platforms/powernv/pci-ioda.c | 29 -- arch/powerpc/platforms/powernv/pci.c | 67 --- 3 files

[PATCH 31/31] genirq: Improve "hwirq" output in /proc and /sys/

2021-04-30 Thread Cédric Le Goater
The HW IRQ numbers generated by the PCI MSI layer can be quite large on a pSeries machine when running under the IBM Hypervisor and they appear as negative. Use '%u' to show them correctly. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- kernel/irq/irqdesc.c | 2 +- kernel/irq/proc.c

[PATCH 08/31] powerpc/pseries/pci: Add a domain_free_irqs handler

2021-04-30 Thread Cédric Le Goater
The RTAS firmware can not disable one MSI at a time. It's all or nothing. We need a custom free IRQ handler for that. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/pseries/msi.c | 16 1 file changed, 16 insertions(+) diff --git a/arch/powerpc

[PATCH 09/31] powerpc/pseries/pci: Add a msi_free() handler to clear XIVE data

2021-04-30 Thread Cédric Le Goater
irq_domain_free_irqs_top() when the handler data is still available. Use that to clear the XIVE controller data. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/platforms/pseries/msi.c | 16 +++- arch/powerpc/sysdev/xive/common.c

[PATCH 15/31] KVM: PPC: Book3S HV: XIVE: Fix mapping of passthrough interrupts

2021-04-30 Thread Cédric Le Goater
() might not be the best solution. Cc: Thomas Gleixner Cc: Paul Mackerras Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_xive.c | 3 ++- kernel/irq/irqdomain.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc

[PATCH 05/31] powerpc/pseries/pci: Add MSI domains

2021-04-30 Thread Cédric Le Goater
he XIVE (P9/P10) parent domain is supported for now. We still need to add support for IRQ domain hierarchy under XICS. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/pci-bridge.h| 5 + arch/powerpc/platforms/pseries/pseries.h | 1 + arch/powerpc/ker

[PATCH 27/31] powerpc/xics: Fix IRQ migration

2021-04-30 Thread Cédric Le Goater
ner Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 05d21005dc79..2a3ad7f5c331 100644 --- a/arch/powe

[PATCH 21/31] powerpc/powernv/pci: Customize the MSI EOI handler to support PHB3

2021-04-30 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 7b75af17dc59..7035be271c34 100644

[PATCH 30/31] KVM: PPC: Book3S HV: XICS: Fix mapping of passthrough interrupts

2021-04-30 Thread Cédric Le Goater
PCI MSIs now live in an MSI domain but the underlying calls, which will EOI the interrupt in real mode, need an HW IRQ number mapped in the XICS IRQ domain. Grab it there. Cc: Paul Mackerras Cc: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_hv.c | 12

[PATCH 17/31] powerpc/xics: Rename the map handler in a check handler

2021-04-30 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- arch/powerpc/include/asm/xics.h| 3 ++- arch/powerpc/sysdev/xics/ics-opal.c| 27 + arch/powerpc/sysdev/xics/ics-rtas.c| 28 +- arch/powerpc/sysdev/xics/xics-common.c | 15 -- 4 files changed

[PATCH 26/31] powerpc/powernv/pci: Adapt is_pnv_opal_msi() to detect passthrough interrupt

2021-04-30 Thread Cédric Le Goater
The pnv_ioda2_msi_eoi chip handler is not used anymore for MSIs. Simply use the check on the PSI-MSI chip. Cc: Alexey Kardashevskiy Cc: Paul Mackerras Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 24/31] powerpc/pseries/pci: Drop unused MSI code

2021-04-30 Thread Cédric Le Goater
MSIs should be fully managed by the PCI and IRQ subsystems now. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/pseries/msi.c | 87 1 file changed, 87 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c

[PATCH 10/31] powerpc/pseries/pci: Add support of MSI domains to PHB hotplug

2021-04-30 Thread Cédric Le Goater
Simply allocate or release the MSI domains when a PHB is inserted in or removed from the machine. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/pseries/pseries.h | 1 + arch/powerpc/platforms/pseries/msi.c | 10 ++ arch/powerpc/platforms/pseries/pci_dlpar.c | 4

[PATCH 18/31] powerpc/xics: Give a name to the default XICS IRQ domain

2021-04-30 Thread Cédric Le Goater
and clean up the error path. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 2fa45cd12a82

[PATCH 02/31] powerpc/pseries/pci: Introduce rtas_prepare_msi_irqs()

2021-04-30 Thread Cédric Le Goater
This splits the routine setting the MSIs in two parts: allocation of MSIs for the PCI device at the FW level (RTAS) and the actual mapping and activation of the IRQs. rtas_prepare_msi_irqs() will serve as a handler for the MSI domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms

[PATCH 01/31] powerpc/pseries/pci: Introduce __find_pe_total_msi()

2021-04-30 Thread Cédric Le Goater
It will help to size the PCI MSI domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/pseries/msi.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 637300330507

[PATCH 16/31] powerpc/xics: Remove ICS list

2021-04-30 Thread Cédric Le Goater
We always had only one ICS per machine. Simplify the XICS driver by removing the ICS list. The ICS stored in the chip data of the XICS domain becomes useless and we don't need it anymore to migrate away IRQs from a CPU. This will be removed in a subsequent patch. Signed-off-by: Cédric Le Goater

[PATCH 14/31] KVM: PPC: Book3S HV: XIVE: Change interface of passthrough interrupt routines

2021-04-30 Thread Cédric Le Goater
The routine kvmppc_set_passthru_irq() calls kvmppc_xive_set_mapped() and kvmppc_xive_clr_mapped() with an IRQ descriptor. Use directly the host IRQ number to remove a useless conversion. Add some debug. Cc: Paul Mackerras Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/kvm_ppc.h

[PATCH 12/31] powerpc/powernv/pci: Add MSI domains

2021-04-30 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 188 ++ 1 file changed, 188 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index b2a8da6114b5..3886ca6e2ed3 100644 --- a/arch/powerpc

[PATCH 11/31] powerpc/powernv/pci: Introduce __pnv_pci_ioda_msi_setup()

2021-04-30 Thread Cédric Le Goater
It will be used as a 'compose_msg' handler of the MSI domain introduced later. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 28 +++ 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b

[PATCH 00/31] powerpc: Modernize the PCI/MSI support

2021-04-30 Thread Cédric Le Goater
system with a memory AFU. Thanks, C. Cédric Le Goater (31): powerpc/pseries/pci: Introduce __find_pe_total_msi() powerpc/pseries/pci: Introduce rtas_prepare_msi_irqs() powerpc/xive: Add support for IRQ domain hierarchy powerpc/xive: Ease debugging of xive_irq_set_affinity() powerpc/pseries

[PATCH 04/31] powerpc/xive: Ease debugging of xive_irq_set_affinity()

2021-04-30 Thread Cédric Le Goater
pr_debug() is easier to activate and it helps to know how the HW is configured when tweaking the IRQ subsystem. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch

[PATCH 03/31] powerpc/xive: Add support for IRQ domain hierarchy

2021-04-30 Thread Cédric Le Goater
to clear the MMIO mappings and free the XIVE handler data, xive_irq_data structure. This is going to be a problem with MSI domains which we will address later. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 60 +++ 1 file changed, 60 insertions

[PATCH 06/31] powerpc/xive: Drop unmask of MSIs at startup

2021-04-30 Thread Cédric Le Goater
That was a workaround in the XIVE domain because of the lack of MSI domain. This is now handled. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive

Re: [PATCH v1] KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C

2021-04-21 Thread Cédric Le Goater
On 4/13/21 3:38 PM, Nicholas Piggin wrote: > This is more symmetric with kvmppc_xive_push_vcpu, and has the advantage > that it runs with the MMU on. > > The extra test added to the asm will go away with a future change. > > Reviewed-by: Cédric Le Goater > Reviewed-by:

[PATCH] powerpc/xive: Use the "ibm, chip-id" property only under PowerNV

2021-04-13 Thread Cédric Le Goater
R and does not exist under pSeries/PowerVM. Assign 'chip_id' to XIVE_INVALID_CHIP_ID by default and let the PowerNV platform override the value with the "ibm,chip-id" property. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/xive-internal.h | 1 + arch/powerpc/s

Re: [PATCH v5 41/48] KVM: PPC: Book3S HV: Remove unused nested HV tests in XICS emulation

2021-04-02 Thread Cédric Le Goater
sted HV safe because it writes to > LPCR directly without a kvmhv_on_pseries test. Nested handlers > should not in general be using the rm handlers. > > The important test seems to be in kvmppc_ipi_thread, which sends the > virt-mode H_IPI handler kick to use smp_call_functio

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

2021-04-02 Thread Cédric Le Goater
> I gave the patch below a try and we are reaching the same results, > even better. The simplest solution is always the best. Nick, you > should send that single patch. FYI, here are results in a KVM guests with pinned vCPUs. * P9 DD2.2 - 2s * 64 threads - KVM guest :

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

2021-04-02 Thread Cédric Le Goater
87 4.839581 38.076137 50.464307 50.636219 >> 0-3034.786031 40.881319 53.478684 53.310759 >> 0-3194.743750 43.448424 56.388102 55.973969 >> 0-3354.709936 45.623532 59.400930 58.926857 >> 0-3514.6814

Re: [PATCH] powerpc/powernv: Enable HAIL (HV AIL) for ISA v3.1 processors

2021-04-02 Thread Cédric Le Goater
On 4/2/21 4:41 AM, Nicholas Piggin wrote: > Starting with ISA v3.1, LPCR[AIL] no longer controls the interrupt > mode for HV=1 interrupts. Instead, a new LPCR[HAIL] bit is defined > which behaves like AIL=3 for HV interrupts when set. Will QEMU need an update ? Thanks, C. > Set HAIL on bare

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

2021-04-01 Thread Cédric Le Goater
On 4/1/21 2:45 PM, Greg Kurz wrote: > 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: >>> >>&g

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

2021-04-01 Thread Cédric Le Goater
On 4/1/21 4:49 AM, David Gibson wrote: > On Wed, Mar 31, 2021 at 04:45:06PM +0200, 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. The XIVE >> driver queries the chip i

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

2021-04-01 Thread Cédric Le Goater
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 be used to benchmark the raw interrupt rate of an >> interrupt controller by measuring the number of IPI

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

2021-04-01 Thread Cédric Le Goater
Hello, On 3/31/21 4:45 PM, 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

[PATCH v3 9/9] powerpc/xive: Modernize XIVE-IPI domain with an 'alloc' handler

2021-03-31 Thread Cédric Le Goater
descriptor on the specified node, even better for cache performance on multi node machines. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- I didn't rerun the benchmark to check for a difference. arch/powerpc/sysdev/xive/common.c | 27 +++ 1 file changed, 19

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

2021-03-31 Thread Cédric Le Goater
219 0-3034.786031 40.881319 53.478684 53.310759 0-3194.743750 43.448424 56.388102 55.973969 0-3354.709936 45.623532 59.400930 58.926857 0-3514.681413 45.646151 62.035804 61.830057 [*] https://github.com/antonblanchard/ipistorm Cc: T

[PATCH v3 2/9] powerpc/xive: Introduce an IPI interrupt domain

2021-03-31 Thread Cédric Le Goater
domain by introducing a specific domain for the IPI. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- Changes in v3: - better error handling of xive_request_ipi() - use of a fwnode_handle to name the new domain - dropped Greg's Reviewed-by because of the changes arch/powerpc/sysdev

[PATCH v3 6/9] powerpc/xive: Simplify the dump of XIVE interrupts under xmon

2021-03-31 Thread Cédric Le Goater
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. Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/sysdev/xive/common.c | 14

[PATCH v3 7/9] powerpc/xive: Fix xmon command "dxi"

2021-03-31 Thread Cédric Le Goater
ernel test robot Reported-by: Dan Carpenter Fixes: 97ef27507793 ("powerpc/xive: Fix xmon support on the PowerNV platform") Tested-by: Greg Kurz Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 14 ++ 1 file changed, 10 insert

[PATCH v3 5/9] powerpc/xive: Drop check on irq_data in xive_core_debug_show()

2021-03-31 Thread Cédric Le Goater
When looping on IRQ descriptor, irq_data is always valid. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- arch/powerpc/s

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

2021-03-31 Thread Cédric Le Goater
- filter CPU-less nodes Changes in v2: - extra simplification on xmon - fixes on issues reported by the kernel test robot Cédric Le Goater (9): powerpc/xive: Use cpu_to_node() instead of "ibm,chip-id" property powerpc/xive: Introduce an IPI interrupt domain powerpc/xive: Remo

[PATCH v3 1/9] powerpc/xive: Use cpu_to_node() instead of "ibm, chip-id" property

2021-03-31 Thread Cédric Le Goater
to a bogus chip id value being returned by of_get_ibm_chip_id(). Cc: David Gibson Signed-off-by: Cédric Le Goater --- Changes in v3: - improved commit log for the misuse of "ibm,chip-id" arch/powerpc/sysdev/xive/common.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff

[PATCH v3 4/9] powerpc/xive: Simplify xive_core_debug_show()

2021-03-31 Thread Cédric Le Goater
Now that the IPI interrupt has its own domain, the checks on the HW interrupt number XIVE_IPI_HW_IRQ and on the chip can be replaced by a check on the domain. Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 18 -- 1 file changed, 4

[PATCH v3 3/9] powerpc/xive: Remove useless check on XIVE_IPI_HW_IRQ

2021-03-31 Thread Cédric Le Goater
The IPI interrupt has its own domain now. Testing the HW interrupt number is not needed anymore. Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c

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

2021-03-30 Thread Cédric Le Goater
On 3/3/21 6:48 PM, Cédric Le Goater wrote: > 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 systems, a sign

Re: [PATCH v4 39/46] KVM: PPC: Book3S HV: Remove virt mode checks from real mode handlers

2021-03-23 Thread Cédric Le Goater
escriptive of its function. > > Cc: Cédric Le Goater > Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater > --- > arch/powerpc/include/asm/kvm_ppc.h | 10 +-- > arch/powerpc/kvm/book3s.c | 11 +-- > arch/powerpc/kvm/book3s_64_vio

Re: [PATCH v4 22/46] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-03-23 Thread Cédric Le Goater
XPORT_SYMBOL_GPL(kvmppc_xive_cede_vcpu); > + > /* > * This is a simple trigger for a generic XIVE IRQ. This must > * only be called for interrupts that support a trigger page > @@ -2106,6 +2140,42 @@ static int kvmppc_xive_create(struct kvm_device *dev, > u32 type) >

Re: [PATCH v3 19/41] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-03-23 Thread Cédric Le Goater
On 3/22/21 7:22 PM, Nicholas Piggin wrote: > Excerpts from Cédric Le Goater's message of March 23, 2021 2:01 am: >> On 3/22/21 2:15 PM, Nicholas Piggin wrote: >>> Excerpts from Alexey Kardashevskiy's message of March 22, 2021 5:30 pm: On 06/03/2021 02:06, Nicholas Piggin wrote:

Re: [PATCH v3 17/41] KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C

2021-03-22 Thread Cédric Le Goater
On 3/5/21 4:06 PM, Nicholas Piggin wrote: > This is more symmetric with kvmppc_xive_push_vcpu. The extra test in > the asm will go away in a later change. > > Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater > --- > arch/powerpc/include/asm/kvm_ppc.h | 2

Re: [PATCH v3 19/41] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-03-22 Thread Cédric Le Goater
On 3/17/21 5:22 PM, Fabiano Rosas wrote: > Nicholas Piggin writes: > >> In the interest of minimising the amount of code that is run in >> "real-mode", don't handle hcalls in real mode in the P9 path. >> >> POWER8 and earlier are much more expensive to exit from HV real mode >> and switch to

Re: [PATCH v3 19/41] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-03-22 Thread Cédric Le Goater
On 3/22/21 2:15 PM, Nicholas Piggin wrote: > Excerpts from Alexey Kardashevskiy's message of March 22, 2021 5:30 pm: >> >> >> On 06/03/2021 02:06, Nicholas Piggin wrote: >>> In the interest of minimising the amount of code that is run in>>> >>> "real-mode", don't handle hcalls in real mode in the

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

2021-03-18 Thread Cédric Le Goater
> Also we've been using it for several years and I don't think we should > risk breaking anything by changing the value now. I guess we can leave it that way. Please read the commit log of the second patch (not tagged as a v2 ...). But we should remove ibm,chip-id from QEMU since the property

Re: Advice needed on SMP regression after cpu_core_mask change

2021-03-17 Thread Cédric Le Goater
On 3/17/21 2:00 PM, Daniel Henrique Barboza wrote: > Hello, > > Patch 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") > introduced > a regression in both upstream and RHEL downstream kernels [1]. The assumption > made > in the commit: > > "Further analysis shows that

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

2021-03-16 Thread Cédric Le Goater
gt;> Cc: Nathan Lynch >> Cc: Srikar Dronamraju >> Cc: Vasant Hegde >> Signed-off-by: Cédric Le Goater >> --- >> arch/powerpc/include/asm/topology.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > (Sorry I somehow managed to

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

2021-03-16 Thread Cédric Le Goater
viewed-by: Greg Kurz Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza Reviewed-by: Srikar Dronamraju Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/topol

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

2021-03-15 Thread Cédric Le Goater
On 3/15/21 4:12 PM, Daniel Henrique Barboza wrote: > > > On 3/12/21 11:31 AM, Cédric Le Goater wrote: >> Initial commit 15863ff3b8da ("powerpc: Make chip-id information >> available to userspace") introduce a cpu_to_chip_id() routine for the >> PowerNV plat

Re: [PATCH] powerpc: Fix missing prototype problems for "arch/powerpc/kernel/setup_64.c"

2021-03-15 Thread Cédric Le Goater
On 3/15/21 2:01 PM, Christophe Leroy wrote: > > > Le 15/03/2021 à 13:57, Cédric Le Goater a écrit : >> On 3/15/21 1:48 PM, heying (H) wrote: >>> >>> 在 2021/3/15 20:17, Christophe Leroy 写道: >>>> You subject doesn't match the content of the patch. >&

Re: [PATCH] powerpc: Fix missing prototype problems for "arch/powerpc/kernel/setup_64.c"

2021-03-15 Thread Cédric Le Goater
On 3/15/21 1:48 PM, heying (H) wrote: > > 在 2021/3/15 20:17, Christophe Leroy 写道: >> You subject doesn't match the content of the patch. > OK. I'll adapt that. >> >> Le 15/03/2021 à 13:04, He Ying a écrit : >>> The variables 'uaccess_fulsh' and 'entry_flush' are not referenced >>> outside the

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

2021-03-12 Thread Cédric Le Goater
uery is broken. Use cpu_to_node() instead which guarantees to have a correct value on all platforms, PowerNV an pSeries. Cc: Nathan Lynch Cc: Srikar Dronamraju Cc: Vasant Hegde Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH] powerpc: define the variable 'uaccess_flush' as static

2021-03-12 Thread Cédric Le Goater
On 3/12/21 12:06 PM, He Ying wrote: > The variable 'uaccess_fulsh' is not referenced outside the file. Perhaps we > should define it as static to avoid the warning as follows: > > arch/powerpc/kernel/setup_64.c:953:6: warning: symbol 'uaccess_flush' > was not declared. Should it be static? > >

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

2021-03-12 Thread Cédric Le Goater
On 3/12/21 1:18 PM, Daniel Henrique Barboza wrote: > > > On 3/12/21 6:53 AM, Cédric Le Goater wrote: >> On 3/12/21 2:55 AM, David Gibson wrote: >>> On Tue, 9 Mar 2021 18:26:35 +0100 >>> Cédric Le Goater wrote: >>> >>>> On 3/9/21 6:08 PM, D

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

2021-03-12 Thread Cédric Le Goater
On 3/12/21 2:55 AM, David Gibson wrote: > On Tue, 9 Mar 2021 18:26:35 +0100 > Cédric Le Goater wrote: > >> 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

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

2021-03-10 Thread Cédric Le Goater
quot; command : ignore the buggy cpu id parameter and fall back to the > #-less version of the command. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > arch/powerpc/xmon/xmon.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff -

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

2021-03-09 Thread Cédric Le Goater
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 >>> Cédric Le Goater wrote: >>> >>>> The 'chip_id' field of

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

2021-03-09 Thread Cédric Le Goater
On 3/9/21 2:23 PM, Greg Kurz wrote: > On Wed, 3 Mar 2021 18:48:57 +0100 > Cédric Le Goater wrote: > >> 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 th

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

2021-03-09 Thread Cédric Le Goater
On 3/9/21 11:23 AM, Greg Kurz wrote: > On Wed, 3 Mar 2021 18:48:56 +0100 > Cédric Le Goater wrote: > >> When under xmon, the "dxi" command dumps the state of the XIVE >> interrupts. If an interrupt number is specified, only the state of >> the associate

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

2021-03-09 Thread Cédric Le Goater
On 3/9/21 10:42 AM, Greg Kurz wrote: > 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 +0

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

2021-03-09 Thread Cédric Le Goater
On 3/8/21 6:13 PM, Greg Kurz wrote: > 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 Powe

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

2021-03-08 Thread Cédric Le Goater
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 number XIVE_IPI_HW_IRQ and on the chip can be replaced by a >> check on the domain.

Re: [PATCH] arch/powerpc/include/asm/book3s/64/: remove duplicate include in mmu-hash.h

2021-03-05 Thread Cédric Le Goater
On 3/4/21 3:42 AM, menglong8.d...@gmail.com wrote: > From: Zhang Yunkai > > 'asm/bug.h' included in 'arch/powerpc/include/asm/book3s/64/mmu-hash.h' > is duplicated.It is also included in the 12th line. > > Signed-off-by: Zhang Yunkai Reviewed-by: Cédric Le Goater >

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

2021-03-03 Thread Cédric Le Goater
m. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 595310e056f4..b8e456da28aa 100644 --- a/arch/powerpc/sysdev/xive/common.c

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

2021-03-03 Thread Cédric Le Goater
The IPI interrupt has its own domain now. Testing the HW interrupt number is not needed anymore. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev

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

2021-03-03 Thread Cédric Le Goater
When looping on IRQ descriptor, irq_data is always valid. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/com

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

2021-03-03 Thread Cédric Le Goater
domain by introducing a specific domain for the IPI. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 51 +-- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index

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

2021-03-03 Thread Cédric Le Goater
Now that the IPI interrupt has its own domain, the checks on the HW interrupt number XIVE_IPI_HW_IRQ and on the chip can be replaced by a check on the domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 18 -- 1 file changed, 4 insertions(+), 14

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

2021-03-03 Thread Cédric Le Goater
ernel test robot Reported-by: Dan Carpenter Fixes: 97ef27507793 ("powerpc/xive: Fix xmon support on the PowerNV platform") Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch

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

2021-03-03 Thread Cédric Le Goater
blanchard/ipistorm Thanks, C. Changes in v2: - extra simplification on xmon - fixes on issues reported by the kernel test robot Cédric Le Goater (8): powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property powerpc/xive: Introduce an IPI interrupt domain powerpc/xive: Remove us

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

2021-03-03 Thread Cédric Le Goater
219 0-3034.786031 40.881319 53.478684 53.310759 0-3194.743750 43.448424 56.388102 55.973969 0-3354.709936 45.623532 59.400930 58.926857 0-3514.681413 45.646151 62.035804 61.830057 [*] https://github.com/antonblanchard/ipistorm Si

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

2021-03-03 Thread Cédric Le Goater
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 --- arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/sysdev/xive/common.c | 14 ++ arch/powerpc/xmon

Re: [PATCH v2 16/37] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-02-25 Thread Cédric Le Goater
On 2/25/21 2:46 PM, Nicholas Piggin wrote: > In the interest of minimising the amount of code that is run in > "real-mode", don't handle hcalls in real mode in the P9 path. > > POWER8 and earlier are much more expensive to exit from HV real mode > and switch to host mode, because on those

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

2021-02-12 Thread Cédric Le Goater
9ea69a55b3b9 ("powerpc/pseries: Pass MSI affinity to > irq_create_mapping()") > Cc: lviv...@redhat.com > Cc: sta...@vger.kernel.org > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Thanks for tracking this issue. This layer needs a rework. Pat

[PATCH 3/5] powerpc/xive: Remove useless check on XIVE_IPI_HW_IRQ

2021-02-09 Thread Cédric Le Goater
The IPI interrupt has its own domain now. Testing the HW interrupt number is not needed anymore. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev

[PATCH 4/5] powerpc/xive: Simplify xive_core_debug_show()

2021-02-09 Thread Cédric Le Goater
Now that the IPI interrupt has its own domain, the checks on the HW interrupt number XIVE_IPI_HW_IRQ and on the chip can be replaced by a check on the domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 18 -- 1 file changed, 4 insertions(+), 14

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

2021-02-09 Thread Cédric Le Goater
m. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 7e08be5e5e4a..776871274b69 100644 --- a/arch/powerpc/sysdev/xive/common.c

[PATCH 5/5] powerpc/xive: Map one IPI interrupt per node

2021-02-09 Thread Cédric Le Goater
219 0-3034.786031 40.881319 53.478684 53.310759 0-3194.743750 43.448424 56.388102 55.973969 0-3354.709936 45.623532 59.400930 58.926857 0-3514.681413 45.646151 62.035804 61.830057 [*] https://github.com/antonblanchard/ipistorm Si

[PATCH 0/5] powerpc/xive: Map one IPI interrupt per node

2021-02-09 Thread Cédric Le Goater
50.464307 50.636219 0-3034.786031 40.881319 53.478684 53.310759 0-3194.743750 43.448424 56.388102 55.973969 0-3354.709936 45.623532 59.400930 58.926857 0-3514.681413 45.646151 62.035804 61.830057 [*] https://github.com/antonbl

[PATCH 2/5] powerpc/xive: Introduce an IPI interrupt domain

2021-02-09 Thread Cédric Le Goater
domain by introducing a specific domain for the IPI. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 51 +-- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index

Re: [PATCH 3/5] powerpc/xive: remove unnecessary unmap_kernel_range

2021-01-26 Thread Cédric Le Goater
On 1/26/21 5:54 AM, Nicholas Piggin wrote: > iounmap will remove ptes. > > Cc: "Cédric Le Goater" > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Nicholas Piggin Looks good. Acked-by: Cédric Le Goater Thanks, C. > --- > arch/powerpc/sysdev/xive/comm

[PATCH] powerpc/prom: Fix "ibm,arch-vec-5-platform-support" scan

2021-01-21 Thread Cédric Le Goater
o activate them, leading to a firmware crash in ibm,client-architecture-support. Fix that by using the property length of "ibm,arch-vec-5-platform-support". Cc: sta...@vger.kernel.org # v4.20+ Fixes: ab91239942a9 ("powerpc/prom: Remove VLA in prom_check_platform_support()") S

[PATCH v2 05/23] powerpc/pmem: Include pmem prototypes

2021-01-04 Thread Cédric Le Goater
prototype for ‘arch_invalidate_pmem’ [-Werror=missing-prototypes] 58 | void arch_invalidate_pmem(void *addr, size_t size) | ^~~~ Fixes: 32ce3862af3c ("powerpc/lib: Implement PMEM API") Signed-off-by: Cédric Le Goater --- arch/powerpc/lib/pmem.c | 1 + 1 file

[PATCH v2 01/23] powerpc/mm: Include __find_linux_pte() prototype

2021-01-04 Thread Cédric Le Goater
It fixes this W=1 compile error : ../arch/powerpc/mm/pgtable.c:337:8: error: no previous prototype for ‘__find_linux_pte’ [-Werror=missing-prototypes] 337 | pte_t *__find_linux_pte(pgd_t *pgdir, unsigned long ea, |^~~~ Cc: "Aneesh Kumar K.V" Signed-off-by:

[PATCH v2 06/23] powerpc/setup_64: Make some routines static

2021-01-04 Thread Cédric Le Goater
: no previous prototype for ‘uaccess_flush_enable’ [-Werror=missing-prototypes] 1023 | void uaccess_flush_enable(bool enable) | ^~~~ Signed-off-by: Cédric Le Goater --- arch/powerpc/kernel/setup_64.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

  1   2   3   4   5   6   7   8   >