Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-10 Thread Peter Xu
On Fri, May 10, 2024 at 11:29:26AM -0700, Axel Rasmussen wrote: > For real MCEs, various architectures print log messages when poisoned > memory is accessed (which results in a SIGBUS). These messages can be > important for users to understand the issue. > > On the other hand, we have two other

Re: [RFC PATCH v2 0/6] powerpc: pSeries: vfio: iommu: Re-enable support for SPAPR TCE VFIO

2024-05-10 Thread Shawn Anastasio
On 5/6/24 12:43 PM, Jason Gunthorpe wrote: > On Sat, May 04, 2024 at 12:33:53AM +0530, Shivaprasad G Bhat wrote: >> We have legacy workloads using VFIO in userspace/kvm guests running >> on downstream distro kernels. We want these workloads to be able to >> continue running on our arch. > > It

[PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-10 Thread Axel Rasmussen
For real MCEs, various architectures print log messages when poisoned memory is accessed (which results in a SIGBUS). These messages can be important for users to understand the issue. On the other hand, we have two other cases: swapin errors and simulated poisons via UFFDIO_POISON. These cases

[PATCH v2 0/1] arch/fault: don't print logs for simulated poison errors

2024-05-10 Thread Axel Rasmussen
This patch is based on mm-unstable as of 2024-05-10. In particular it needs this somewhat related fix to apply cleanly: [0/2] Minor fixups for hugetlb fault path https://lore.kernel.org/r/20240509100148.22384-1-osalva...@suse.de Changes since v1: - Rename flag from VM_FAULT_HWPOISON_SIM to

Re: About the code updte of the arc/linux/arch/beta/kernel/irq_64.c

2024-05-10 Thread Christophe Leroy
Hi Xia, Le 01/05/2024 à 08:22, 赵夏 a écrit : > Hi Christophe, > >   I identified that the function named "arch_local_irq_restore" of the > file irq_64.c was updated by you frequently in the last two years. You mean arch/powerpc/kernel/irq_64.c I guess ? I don't think I "frequently" changed

Re: [PATCH V2 4/9] tools/perf: Add support to capture and parse raw instruction in objdump

2024-05-10 Thread Arnaldo Carvalho de Melo
On Thu, May 09, 2024 at 10:56:23PM +0530, Athira Rajeev wrote: > > > > On 7 May 2024, at 3:05 PM, Christophe Leroy > > wrote: > > > > > > > > Le 06/05/2024 à 14:19, Athira Rajeev a écrit : > >> Add support to capture and parse raw instruction in objdump. > > > > What's the purpose of using

Re: [PATCH v4 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-05-10 Thread Ilpo Järvinen
On Fri, 10 May 2024, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also > TLP Prefix Log. The relevant registers are

[PATCH v8] arch/powerpc/kvm: Add support for reading VPA counters for pseries guests

2024-05-10 Thread Gautam Menghani
PAPR hypervisor has introduced three new counters in the VPA area of LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - 2 for context switches from host to guest and vice versa, and 1 counter for getting the total time spent inside the KVM guest. Add a tracepoint that enables

[PATCH v2 2/2] powerpc/kexec_file: fix cpus node update to FDT

2024-05-10 Thread Sourabh Jain
While updating the cpus node, commit 40c753993e3a ("powerpc/kexec_file: Use current CPU info while setting up FDT") first deletes all subnodes under the /cpus node. However, while adding sub-nodes back, it missed adding cpus subnodes whose device_type != "cpu", such as l2-cache*, l3-cache*,

[PATCH v2 1/2] powerpc/kexec_file: fix extra size calculation for kexec FDT

2024-05-10 Thread Sourabh Jain
While setting up the FDT for kexec, CPU nodes that are added after the system boots and reserved memory ranges are incorporated into the initial_boot_params (base FDT). However, they are not taken into account when determining the additional size needed for the kexec FDT. As a result, kexec fails

[PATCH v2 0/2] powerpc: kexec fixes

2024-05-10 Thread Sourabh Jain
Patch series fixes two kexec issues. 01/02: Update extra size calculation for kexec FDT to avoid kexec load failure due to FDT_ERR_NOSPACE while including CPU nodes added post boot and reserved memory ranges. 02/02: Fix update_cpus_node/core_64.c function to include missing device nodes under

[PATCH v4 5/7] PCI: Store # of supported End-End TLP Prefixes

2024-05-10 Thread Ilpo Järvinen
eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes are supported by the path or not, the value is only calculated if CONFIG_PCI_PASID is set. The Max End-End TLP Prefixes field in the Device Capabilities Register 2 also tells how many (1-4) End-End TLP Prefixes are supported

[PATCH v4 2/7] PCI: Move TLP Log handling to own file

2024-05-10 Thread Ilpo Järvinen
TLP Log is PCIe feature and is processed only by AER and DPC. Configwise, DPC depends AER being enabled. In lack of better place, the TLP Log handling code was initially placed into pci.c but it can be easily placed in a separate file. Move TLP Log handling code to own file under pcie/

[PATCH v4 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-05-10 Thread Ilpo Järvinen
pcie_read_tlp_log() was exposed by the commit 0a5a46a6a61b ("PCI/AER: Generalize TLP Header Log reading") but this is now considered a mistake. No drivers outside of PCI subsystem should build their own diagnostic logging but should rely on PCI core doing it for them. There's currently one driver

[PATCH v4 0/7] PCI: Consolidate TLP Log reading and printing

2024-05-10 Thread Ilpo Järvinen
This series has the remaining patches of the AER & DPC TLP Log handling consolidation and now includes a few minor improvements to the earlier accepted TLP Logging code. v4: - Added patches: - Remove EXPORT of pcie_read_tlp_log() - Moved code to pcie/tlp.c and build only with AER

[PATCH v4 7/7] PCI: Create helper to print TLP Header and Prefix Log

2024-05-10 Thread Ilpo Järvinen
Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. Print End-End Prefixes only if they are non-zero. Consolidate the few places which currently print TLP using custom formatting. The first attempt used pr_cont() instead of building a string first but it turns out pr_cont() is

[PATCH v4 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-05-10 Thread Ilpo Järvinen
pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also TLP Prefix Log. The relevant registers are formatted identically in AER and DPC Capability, but

[PATCH v4 4/7] PCI: Use unsigned int i in pcie_read_tlp_log()

2024-05-10 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c index

[PATCH v4 3/7] PCI: Make pcie_read_tlp_log() signature same

2024-05-10 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff

[PATCH] powerpc/fadump: update documentation about bootargs_append

2024-05-10 Thread Hari Bathini
Update ABI documentation about the introduction of the new sysfs entry bootargs_append. This sysfs entry will be used to setup the additional parameters to be passed to dump capture kernel. Signed-off-by: Hari Bathini --- * This patch is a follow-up of below patch series, to update

Re: [PATCH 3/3] powerpc: Check only single values are passed to CPU/MMU feature checks

2024-05-10 Thread Segher Boessenkool
On Fri, May 10, 2024 at 04:45:37PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Thu, May 09, 2024 at 10:12:48PM +1000, Michael Ellerman wrote: > >> cpu_has_feature()/mmu_has_feature() are only able to check a single > >> feature at a time, but there is no enforcement of

[PATCH] powerpc/85xx: fix compile error without CONFIG_CRASH_DUMP

2024-05-10 Thread Hari Bathini
Since commit 5c4233cc0920 ("powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency"), crashing_cpu is not available without CONFIG_CRASH_DUMP. Fix compile error on 64-BIT 85xx owing to this change. Cc: sta...@vger.kernel.org Fixes: 5c4233cc0920 ("powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP

Re: [PATCH v2 1/2] powerpc/io: Avoid clang null pointer arithmetic warnings

2024-05-10 Thread Michael Ellerman
Naresh Kamboju writes: > On Fri, 3 May 2024 at 13:26, Michael Ellerman wrote: >> >> With -Wextra clang warns about pointer arithmetic using a null pointer. >> When building with CONFIG_PCI=n, that triggers a warning in the IO >> accessors, eg: >> >> In file included from

Re: [PATCH 3/3] powerpc: Check only single values are passed to CPU/MMU feature checks

2024-05-10 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, May 09, 2024 at 10:12:48PM +1000, Michael Ellerman wrote: >> cpu_has_feature()/mmu_has_feature() are only able to check a single >> feature at a time, but there is no enforcement of that. >> >> In fact, as fixed in the previous commit, there was code that was