Re: [PATCH 5/8] drivers: firmware: efi: libstub: enable generic commandline

2023-12-12 Thread Ard Biesheuvel
On Fri, 10 Nov 2023 at 02:39, Daniel Walker wrote: > > This adds code to handle the generic command line changes. > The efi code appears that it doesn't benefit as much from this design > as it could. > > For example, if you had a prepend command line with "nokaslr" then > you might be helpful to

[GIT PULL] PowerQUICC QMC and TSA drivers updates for v6.8

2023-12-12 Thread Herve Codina
The following changes since commit 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab: Linux 6.7-rc3 (2023-11-26 19:59:33 -0800) are available in the Git repository at: g...@github.com:hcodina/linux.git tags/fsl_qmc_tsa_v6.8 for you to fetch changes up to 7a2ee1576dcc6bbe017a8283fba237b05b13fd15:

Re: [PATCH v6 0/4] PCI: layerscape: Add suspend/resume support for ls1043 and ls1021

2023-12-12 Thread Lorenzo Pieralisi
On Mon, 04 Dec 2023 11:08:25 -0500, Frank Li wrote: > Add suspend/resume support for ls1043 and ls1021. > > Change log see each patch > > Frank Li (4): > PCI: layerscape: Add function pointer for exit_from_l2() > PCI: layerscape: Add suspend/resume for ls1021a > PCI: layerscape(ep): Rename

[PATCH v6 09/13] powerpc/pseries: Add papr-vpd character driver for VPD retrieval

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch PowerVM LPARs may retrieve Vital Product Data (VPD) for system components using the ibm,get-vpd RTAS function. We can expose this to user space with a /dev/papr-vpd character device, where the programming model is: struct papr_location_code plc = { .str = "", }; /* obtain

[PATCH v6 08/13] powerpc/rtas: Warn if per-function lock isn't held

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch If the function descriptor has a populated lock member, then callers are required to hold it across calls. Now that the firmware activation sequence is appropriately guarded, we can warn when the requirement isn't satisfied. __do_enter_rtas_trace() gets reorganized a bit as a

Re: [PATCH 5/8] drivers: firmware: efi: libstub: enable generic commandline

2023-12-12 Thread Daniel Walker (danielwa)
On Tue, Dec 12, 2023 at 10:55:33AM +0100, Ard Biesheuvel wrote: > On Fri, 10 Nov 2023 at 02:39, Daniel Walker wrote: > > > > This adds code to handle the generic command line changes. > > The efi code appears that it doesn't benefit as much from this design > > as it could. > > > > For example,

[PATCH v6 02/13] powerpc/rtas: Add for_each_rtas_function() iterator

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add a convenience macro for iterating over every element of the internal function table and convert the one site that can use it. An additional user of the macro is anticipated in changes to follow. Reviewed-by: Aneesh Kumar K.V (IBM) Signed-off-by: Nathan Lynch ---

[PATCH v6 11/13] powerpc/pseries/papr-sysparm: Expose character device to user space

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Until now the papr_sysparm APIs have been kernel-internal. But user space needs access to PAPR system parameters too. The only method available to user space today to get or set system parameters is using sys_rtas() and /dev/mem to pass RTAS-addressable buffers between user

[RESEND PATCH] powerpc/fsl: fix the schema check errors for fsl,tmu-calibration

2023-12-12 Thread David Heidelberg
fsl,tmu-calibration is in u32-matrix. Use matching property syntax. No functional changes. Fixes warnings as: $ make dtbs_check ... arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml: tmu@3026: fsl,tmu-calibration:0: Additional items are not allowed (1, 41, 2, 47, 3, 53, 4, 61, 5, 67,

[PATCH v6 12/13] powerpc/selftests: Add test for papr-vpd

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add selftests for /dev/papr-vpd, exercising the common expected use cases: * Retrieve all VPD by passing an empty location code. * Retrieve the "system VPD" by passing a location code derived from DT root node properties, as done by the vpdupdate command. The tests also

[PATCH v6 13/13] powerpc/selftests: Add test for papr-sysparm

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Consistently testing system parameter access is a bit difficult by nature -- the set of parameters available depends on the model and system configuration, and updating a parameter should be considered a destructive operation reserved for the admin. So we validate some of the

[PATCH] Reapply "kbuild: Create directory for target DTB"

2023-12-12 Thread Matthias Schiffer
This reverts commit dd7699e37f289fa433f42c6bcc108468c8b198c0. On powerpc, dtb-y is usually empty unless CONFIG_OF_ALL_DTBS is set. While passing a DTB as a make target explicitly works fine, individual DTB builds may also be pulled in as dependencies by cuImage.% and similar targets. In this

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-12-12 Thread Josh Poimboeuf
On Mon, Dec 11, 2023 at 11:12:42PM -0800, Christoph Hellwig wrote: > On Thu, Dec 07, 2023 at 10:49:53PM -0600, Samuel Holland wrote: > > Actually tracking all possibly-FPU-tainted functions and their call sites is > > probably possible, but a much larger task. > > I think objtool should be able

Re: [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-12 Thread Bjorn Helgaas
On Tue, Dec 12, 2023 at 09:00:24AM -0600, Terry Bowman wrote: > Hi Bjorn, > > Will help prevent confusion. LGTM. Thanks a lot for taking a look at these! I'd like to give you credit in the log, e.g., "Reviewed-by: Terry Bowman ", but I'm OCD enough that I don't want to translate "LGTM" into

Re: [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-12 Thread Bowman, Terry
No problem. You can add my "Reviewed-by". Thanks. Regards, Terry On 12/12/2023 3:23 PM, Bjorn Helgaas wrote: On Tue, Dec 12, 2023 at 09:00:24AM -0600, Terry Bowman wrote: Hi Bjorn, Will help prevent confusion. LGTM. Thanks a lot for taking a look at these! I'd like to give you credit in the

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-12 Thread Sean Christopherson
On Sun, Dec 10, 2023, Jim Mattson wrote: > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson wrote: > > Doh. We got the less obvious cases and missed the obvious one. > > > > Ugh, and we also missed a related mess in kvm_guest_apic_has_interrupt(). > > That > > thing should really be folded

Re: [PATCH 2/3] PCI/AER: Decode Requester ID when no error info found

2023-12-12 Thread Terry Bowman
LGTM On 12/6/23 16:42, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > When a device with AER detects an error, it logs error information in its > own AER Error Status registers. It may send an Error Message to the Root > Port (RCEC in the case of an RCiEP), which logs the fact that an Error >

Re: [PATCH v5 11/13] powerpc/pseries/papr-sysparm: Expose character device to user space

2023-12-12 Thread Nathan Lynch
Nathan Lynch via B4 Relay writes: > +static long papr_sysparm_ioctl(struct file *filp, unsigned int ioctl, > unsigned long arg) > +{ > + void __user *argp = (__force void __user *)arg; > + long ret; > + > + switch (ioctl) { > + case PAPR_SYSPARM_IOC_GET: > + ret =

Re: [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-12 Thread Terry Bowman
Hi Bjorn, Will help prevent confusion. LGTM. On 12/6/23 16:42, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The PCIe spec classifies errors as either "Correctable" or "Uncorrectable". > Previously we printed these as "Corrected" or "Uncorrected". To avoid > confusion, use the same terms as

Re: [PATCH 05/26] vfio: KVM: Pass get/put helpers from KVM to VFIO, don't do circular lookup

2023-12-12 Thread Sean Christopherson
On Sun, Dec 03, 2023, Jason Gunthorpe wrote: > On Fri, Dec 01, 2023 at 04:51:55PM -0800, Sean Christopherson wrote: > > > There's one more wrinkle: this patch is buggy in that it doesn't ensure the > > liveliness > > of KVM-the-module, i.e. nothing prevents userspace from unloading kvm.ko > >

Re: [PATCH v3 5/7] kexec_file, ricv: print out debugging message if required

2023-12-12 Thread Baoquan He
On 12/07/23 at 07:22am, Baoquan He wrote: > On 12/06/23 at 04:54pm, Conor Dooley wrote: > > On Wed, Dec 06, 2023 at 11:37:52PM +0800, Baoquan He wrote: > > > On 12/04/23 at 04:14pm, Conor Dooley wrote: > > > > On Mon, Dec 04, 2023 at 11:38:05PM +0800, Baoquan He wrote: > > > > > On 12/01/23 at

[PATCH v4 3/7] kexec_file, x86: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out e820 memmap passed to 2nd kernel just as

[PATCH v4 4/7] kexec_file, arm64: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also remove the kimage->segment[] printing because the

[PATCH v4 0/7] kexec_file: print out debugging message if required

2023-12-12 Thread Baoquan He
Currently, specifying '-d' on kexec command will print a lot of debugging informationabout kexec/kdump loading with kexec_load interface. However, kexec_file_load prints nothing even though '-d' is specified. It's very inconvenient to debug or analyze the kexec/kdump loading when something wrong

[PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing

2023-12-12 Thread Baoquan He
When specifying 'kexec -c -d', kexec_load interface will print loading information, e.g the regions where kernel/initrd/purgatory/cmdline are put, the memmap passed to 2nd kernel taken as system RAM ranges, and printing all contents of struct kexec_segment, etc. These are very helpful for

[PATCH v4 2/7] kexec_file: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out type/start/head of kimage and flags to

[PATCH] soc: fsl: dpio: fix spelling errors

2023-12-12 Thread Randy Dunlap
Correct spelling mistakes as identified by codespell. Signed-off-by: Randy Dunlap Cc: Roy Pledge Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-ker...@lists.infradead.org --- include/soc/fsl/dpaa2-io.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v4 7/7] kexec_file, parisc: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He ---

Re: [RESEND PATCH] powerpc/fsl: fix the schema check errors for fsl,tmu-calibration

2023-12-12 Thread Michael Ellerman
David Heidelberg writes: > fsl,tmu-calibration is in u32-matrix. Use matching property syntax. > No functional changes. Fixes warnings as: > $ make dtbs_check > ... > arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml: tmu@3026: > fsl,tmu-calibration:0: Additional items are not allowed

[PATCH v4 6/7] kexec_file, power: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He --- arch/powerpc/kexec/elf_64.c

[PATCH v4 5/7] kexec_file, ricv: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also replace pr_notice() with kexec_dprintk() in

[PATCH v6 00/13] powerpc/pseries: New character devices for system parameters and VPD

2023-12-12 Thread Nathan Lynch via B4 Relay
Add character devices that expose PAPR-specific system parameters and VPD to user space. The problem: important platform features are enabled on Linux VMs through the powerpc-specific rtas() syscall in combination with writeable mappings of /dev/mem. In typical usage, this is encapsulated behind

Re: [PATCH] Reapply "kbuild: Create directory for target DTB"

2023-12-12 Thread Masahiro Yamada
On Wed, Dec 13, 2023 at 1:17 AM Matthias Schiffer wrote: > > This reverts commit dd7699e37f289fa433f42c6bcc108468c8b198c0. > > On powerpc, dtb-y is usually empty unless CONFIG_OF_ALL_DTBS is set. While > passing a DTB as a make target explicitly works fine, individual DTB > builds may also be

[PATCH v6 05/13] powerpc/rtas: Move token validation from block_rtas_call() to sys_rtas()

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The rtas system call handler sys_rtas() delegates certain input validation steps to a helper function: block_rtas_call(). One of these steps ensures that the user-supplied token value maps to a known RTAS function. This is done by performing a "reverse" token-to-function

[PATCH v6 03/13] powerpc/rtas: Fall back to linear search on failed token->function lookup

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Enabling any of the powerpc:rtas_* tracepoints at boot is likely to result in an oops on RTAS platforms. For example, booting a QEMU pseries model with 'trace_event=powerpc:rtas_input' in the command line leads to: BUG: Kernel NULL pointer dereference on read at 0x0008

[PATCH v6 04/13] powerpc/rtas: Add function return status constants

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Not all of the generic RTAS function statuses specified in PAPR have symbolic constants and descriptions in rtas.h. Fix this, providing a little more background, slightly updating the existing wording, and improving the formatting. Reviewed-by: Aneesh Kumar K.V (IBM)

[PATCH v6 07/13] powerpc/rtas: Serialize firmware activation sequences

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Use rtas_ibm_activate_firmware_lock to prevent interleaving call sequences of the ibm,activate-firmware RTAS function, which typically requires multiple calls to complete the update. While the spec does not specifically prohibit interleaved sequences, there's almost certainly

[PATCH v6 01/13] powerpc/rtas: Avoid warning on invalid token argument to sys_rtas()

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch rtas_token_to_function() WARNs when passed an invalid token; it's meant to catch bugs in kernel-based users of RTAS functions. However, user space controls the token value passed to rtas_token_to_function() by block_rtas_call(), so user space with sufficient privilege to use

[PATCH v6 06/13] powerpc/rtas: Facilitate high-level call sequences

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch On RTAS platforms there is a general restriction that the OS must not enter RTAS on more than one CPU at a time. This low-level serialization requirement is satisfied by holding a spin lock (rtas_lock) across most RTAS function invocations. However, some pseries RTAS

[PATCH v6 10/13] powerpc/pseries/papr-sysparm: Validate buffer object lengths

2023-12-12 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The ability to get and set system parameters will be exposed to user space, so let's get a little more strict about malformed papr_sysparm_buf objects. * Create accessors for the length field of struct papr_sysparm_buf. The length is always stored in MSB order and this is