Re: [RFC PATCH v12 14/33] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-20 Thread Binbin Wu
On 9/20/2023 10:24 PM, Sean Christopherson wrote: On Tue, Sep 19, 2023, Binbin Wu wrote: On 9/14/2023 9:55 AM, Sean Christopherson wrote: [...] + +static void kvm_gmem_invalidate_begin(struct kvm_gmem *gmem, pgoff_t start, + pgoff_t end) +{ +

Re: [RFC PATCH v12 18/33] KVM: x86/mmu: Handle page fault for private memory

2023-09-20 Thread Binbin Wu
On 9/15/2023 10:26 PM, Sean Christopherson wrote: On Fri, Sep 15, 2023, Yan Zhao wrote: On Wed, Sep 13, 2023 at 06:55:16PM -0700, Sean Christopherson wrote: +static void kvm_mmu_prepare_memory_fault_exit(struct kvm_vcpu *vcpu, + struct

Re: [RFC PATCH v12 02/33] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-09-20 Thread Xu Yilun
On 2023-09-20 at 06:55:05 -0700, Sean Christopherson wrote: > On Wed, Sep 20, 2023, Xu Yilun wrote: > > On 2023-09-13 at 18:55:00 -0700, Sean Christopherson wrote: > > > +void kvm_mmu_invalidate_range_add(struct kvm *kvm, gfn_t start, gfn_t > > > end) > > > +{ > > > +

Re: [RFC PATCH v12 11/33] KVM: Introduce per-page memory attributes

2023-09-20 Thread Yan Zhao
On Wed, Sep 20, 2023 at 02:00:22PM -0700, Sean Christopherson wrote: > On Fri, Sep 15, 2023, Yan Zhao wrote: > > On Wed, Sep 13, 2023 at 06:55:09PM -0700, Sean Christopherson wrote: > > > From: Chao Peng > > > > > > In confidential computing usages, whether a page is private or shared is > > >

Re: [RFC PATCH v12 14/33] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-20 Thread Sean Christopherson
On Mon, Sep 18, 2023, Michael Roth wrote: > > +static long kvm_gmem_punch_hole(struct inode *inode, loff_t offset, loff_t > > len) > > +{ > > + struct list_head *gmem_list = >i_mapping->private_list; > > + pgoff_t start = offset >> PAGE_SHIFT; > > + pgoff_t end = (offset + len) >>

Re: Questions: Should kernel panic when PCIe fatal error occurs?

2023-09-20 Thread Bjorn Helgaas
On Mon, Sep 18, 2023 at 05:39:58PM +0800, Shuai Xue wrote: > Hi, all folks, > > Error reporting and recovery are one of the important features of PCIe, and > the kernel has been supporting them since version 2.6, 17 years ago. > I am very curious about the expected behavior of the software. > I

Re: [RFC PATCH v12 11/33] KVM: Introduce per-page memory attributes

2023-09-20 Thread Sean Christopherson
On Mon, Sep 18, 2023, Binbin Wu wrote: > > > On 9/14/2023 9:55 AM, Sean Christopherson wrote: > > From: Chao Peng > [...] > > +#ifdef CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES > > +/* > > + * Returns true if _all_ gfns in the range [@start, @end) have attributes > > + * matching @attrs. > > + */ > >

Re: [PATCH v2 0/8] sysctl: Remove sentinel elements from arch

2023-09-20 Thread Luis Chamberlain
On Wed, Sep 13, 2023 at 11:10:54AM +0200, Joel Granados via B4 Relay wrote: > V2: > * Added clarification both in the commit messages and the coverletter as > to why this patch is safe to apply. > * Added {Acked,Reviewed,Tested}-by from list > * Link to v1: >

Re: [RFC PATCH v12 11/33] KVM: Introduce per-page memory attributes

2023-09-20 Thread Sean Christopherson
On Fri, Sep 15, 2023, Yan Zhao wrote: > On Wed, Sep 13, 2023 at 06:55:09PM -0700, Sean Christopherson wrote: > > From: Chao Peng > > > > In confidential computing usages, whether a page is private or shared is > > necessary information for KVM to perform operations like page fault > > handling,

[PATCH v4 15/20] EDAC/mc: Re-use generic unique MC index allocation procedure

2023-09-20 Thread Serge Semin
The EDAC drivers locally maintaining a statically defined memory-controllers counter don't care much about the MC index assigned as long as it's unique so the EDAC core perceives it. Convert these drivers to be using the generic MC index allocation procedure recently added to the EDAC core.

[PATCH rc] kvm: Prevent compiling virt/kvm/vfio.c unless VFIO is selected

2023-09-20 Thread Jason Gunthorpe
There are a bunch of reported randconfig failures now because of this, something like: >> arch/powerpc/kvm/../../../virt/kvm/vfio.c:89:7: warning: attribute >> declaration must precede definition [-Wignored-attributes] fn = symbol_get(vfio_file_iommu_group); ^

Re: [PATCH 0/7] arch/*: config: Remove ReiserFS from defconfig

2023-09-20 Thread Jan Kara
On Tue 19-09-23 18:02:39, Geert Uytterhoeven wrote: > Hi Peter, > > On Tue, Sep 19, 2023 at 5:58 PM Peter Lafreniere wrote: > > 2) Stops building an obsolete and largely-unused filesystem unnecessarily. > > Some hobbyist targets like m68k and alpha may prefer to keep all > > filesystems >

Re: linux-next: Tree for Sep 20 (ppc32: ADB_CUDA Kconfig warning)

2023-09-20 Thread Randy Dunlap
On 9/19/23 20:37, Stephen Rothwell wrote: > Hi all, > > Changes since 20230919: > > The mm tree lost its boot warning. > > The drm-misc tree gained a conflict against Linus' tree. > > Non-merge commits (relative to Linus' tree): 6006 > 3996 files changed, 459968 insertions(+), 111742

Re: [PATCH v10 13/15] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-09-20 Thread Terry Bowman
Hi Dan, I adde danothe comment below. On 9/19/23 15:58, Terry Bowman wrote: > Hi Dan, > > On 8/31/23 15:35, Dan Williams wrote: >> Terry Bowman wrote: >>> From: Robert Richter >>> >>> In Restricted CXL Device (RCD) mode a CXL device is exposed as an >>> RCiEP, but CXL downstream and upstream

Re: [PATCH v4 0/5] ppc, fbdev: Clean up fbdev mmap helper

2023-09-20 Thread Arnd Bergmann
On Tue, Sep 12, 2023, at 09:48, Thomas Zimmermann wrote: > Clean up and rename fb_pgprotect() to work without struct file. Then > refactor the implementation for PowerPC. This change has been discussed > at [1] in the context of refactoring fbdev's mmap code. > > The first two patches update fbdev

Re: [PATCH] i2c: replace deprecated strncpy

2023-09-20 Thread Kees Cook
On Wed, Sep 20, 2023 at 11:07:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `info.type` is expected to be NUL-terminated judging by its use in >

Re: [RFC PATCH v12 14/33] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-20 Thread Sean Christopherson
On Tue, Sep 19, 2023, Binbin Wu wrote: > > > On 9/14/2023 9:55 AM, Sean Christopherson wrote: > [...] > > + > > +static void kvm_gmem_invalidate_begin(struct kvm_gmem *gmem, pgoff_t start, > > + pgoff_t end) > > +{ > > + struct kvm_memory_slot *slot; > > +

Re: [PATCH v2 1/2] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-20 Thread Aditya Gupta
On Wed, Sep 20, 2023 at 05:45:36PM +0530, Aneesh Kumar K.V wrote: > Aditya Gupta writes: > > > Since below commit, address mapping for vmemmap has changed for Radix > > MMU, where address mapping is stored in kernel page table itself, > > instead of earlier used 'vmemmap_list'. > > > >

Re: Recent Power changes and stack_trace_save_tsk_reliable?

2023-09-20 Thread Petr Mladek
On Wed 2023-08-30 17:47:35, Joe Lawrence wrote: > On 8/30/23 02:37, Michael Ellerman wrote: > > Michael Ellerman writes: > >> Joe Lawrence writes: > >>> Hi ppc-dev list, > >>> > >>> We noticed that our kpatch integration tests started failing on ppc64le > >>> when targeting the upstream v6.4

Re: [RFC PATCH v12 02/33] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-09-20 Thread Sean Christopherson
On Wed, Sep 20, 2023, Xu Yilun wrote: > On 2023-09-13 at 18:55:00 -0700, Sean Christopherson wrote: > > +void kvm_mmu_invalidate_range_add(struct kvm *kvm, gfn_t start, gfn_t end) > > +{ > > + lockdep_assert_held_write(>mmu_lock); > > + > > + WARN_ON_ONCE(!kvm->mmu_invalidate_in_progress); > >

Re: [PATCH v2 1/2] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-20 Thread Aneesh Kumar K.V
Aditya Gupta writes: > Since below commit, address mapping for vmemmap has changed for Radix > MMU, where address mapping is stored in kernel page table itself, > instead of earlier used 'vmemmap_list'. > > commit 368a0590d954 ("powerpc/book3s64/vmemmap: switch radix to use > a different

[PATCH] i2c: replace deprecated strncpy

2023-09-20 Thread Justin Stitt
of(info.type)); info.addr = addr; newdev = i2c_new_client_device(adap, ); if (IS_ERR(newdev)) --- base-commit: 2cf0f715623872823a72e451243bbf555d10d032 change-id: 20230920-strncpy-drivers-i2c-busses-i2c-powermac-c-a95017b69711 Best regards, -- Justin Stitt

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-20 Thread Aditya Gupta
On Tue, Sep 19, 2023 at 08:07:15PM +1000, Michael Ellerman wrote: > Aditya Gupta writes: > > On Thu, Sep 14, 2023 at 11:22:01PM +1000, Michael Ellerman wrote: > >> Aditya Gupta writes: > >> > Presently, while reading a vmcore, makedumpfile uses > >> > `cur_cpu_spec.mmu_features` to decide

[PATCH v2 1/2] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-20 Thread Aditya Gupta
Since below commit, address mapping for vmemmap has changed for Radix MMU, where address mapping is stored in kernel page table itself, instead of earlier used 'vmemmap_list'. commit 368a0590d954 ("powerpc/book3s64/vmemmap: switch radix to use a different vmemmap handling function")

[PATCH v2 2/2] powerpc: add cpu_spec.cpu_features to vmcoreinfo

2023-09-20 Thread Aditya Gupta
CPU features can be determined in makedumpfile, using 'cur_cpu_spec.cpu_features'. This provides more data to makedumpfile about the crashed system, and can help in filtering the vmcore accordingly. Signed-off-by: Aditya Gupta --- arch/powerpc/kexec/core.c | 1 + 1 file changed, 1 insertion(+)

Re: [RFC PATCH v4 01/11] ASoC: fsl_asrc: define functions for memory to memory usage

2023-09-20 Thread Hans Verkuil
On 20/09/2023 11:32, Shengjiu Wang wrote: > ASRC can be used on memory to memory case, define several > functions for m2m usage. > > m2m_start_part_one: first part of the start steps > m2m_start_part_two: second part of the start steps > m2m_stop_part_one: first part of stop steps >

[PATCH] ASoC: fsl-asoc-card: use integer type for fll_id and pll_id

2023-09-20 Thread Shengjiu Wang
As the pll_id and pll_id can be zero (WM8960_SYSCLK_AUTO) with the commit 2bbc2df46e67 ("ASoC: wm8960: Make automatic the default clocking mode") Then the machine driver will skip to call set_sysclk() and set_pll() for codec, when the sysclk rate is different with what wm8960 read at probe, the

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-20 Thread Hans Verkuil
On 20/09/2023 11:32, Shengjiu Wang wrote: > The input clock and output clock may not be the accurate > rate as the sample rate, there is some drift, so the convert > ratio of i.MX ASRC module need to be changed according to > actual clock rate. > > Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control for

Re: [RFC PATCH v3 6/9] media: v4l2: Add audio capture and output support

2023-09-20 Thread Hans Verkuil
Hi Shengjiu, I just noticed you posted a v4, but I expect that my comments below are still valid... On 14/09/2023 07:54, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined

[RFC PATCH v4 11/11] media: imx-asrc: Add memory to memory driver

2023-09-20 Thread Shengjiu Wang
Implement the ASRC memory to memory function using the v4l2 framework, user can use this function with v4l2 ioctl interface. User send the output and capture buffer to driver and driver store the converted data to the capture buffer. This feature can be shared by ASRC and EASRC drivers

[RFC PATCH v4 10/11] media: audm2m: add virtual driver for audio memory to memory

2023-09-20 Thread Shengjiu Wang
Audio memory to memory virtual driver use video memory to memory virtual driver vim2m.c as example. The main difference is device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. The device_run function is a dummy function, which is simply copy the data from input buffer to

[RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-20 Thread Shengjiu Wang
The input clock and output clock may not be the accurate rate as the sample rate, there is some drift, so the convert ratio of i.MX ASRC module need to be changed according to actual clock rate. Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control for user to adjust the ratio. Signed-off-by: Shengjiu

[RFC PATCH v4 08/11] media: v4l2: Add audio capture and output support

2023-09-20 Thread Shengjiu Wang
Audio signal processing has the requirement for memory to memory similar as Video. This patch is to add this support in v4l2 framework, defined new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format for audio case usage. The created audio

[RFC PATCH v4 07/11] media: uapi: Add V4L2_AUDIO_FMT_LPCM fourcc format

2023-09-20 Thread Shengjiu Wang
Linear Pulse-Code Modulation is used to represent audio samples in buffer, the samples for each channel are interleaved. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/audio-formats.rst | 15 + .../media/v4l/pixfmt-aud-lpcm.rst | 61 +++

[RFC PATCH v4 06/11] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-09-20 Thread Shengjiu Wang
V4L2_CAP_AUDIO_M2M is similar to V4L2_CAP_VIDEO_M2M flag. It is used for audio memory to memory case. Signed-off-by: Shengjiu Wang --- Documentation/userspace-api/media/v4l/vidioc-querycap.rst| 3 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 +

[RFC PATCH v4 05/11] ASoC: fsl_easrc: register m2m platform device

2023-09-20 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f517b407672d..b719d517f9b4 100644 ---

[RFC PATCH v4 04/11] ASoC: fsl_asrc: register m2m platform device

2023-09-20 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 12 sound/soc/fsl/fsl_asrc.c| 12 2 files changed, 24 insertions(+) diff

[RFC PATCH v4 03/11] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-09-20 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c | 2 +-

[RFC PATCH v4 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-09-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 226 ++ sound/soc/fsl/fsl_easrc.h | 6 + 2 files changed, 232 insertions(+)

[RFC PATCH v4 01/11] ASoC: fsl_asrc: define functions for memory to memory usage

2023-09-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_start_part_one: first part of the start steps m2m_start_part_two: second part of the start steps m2m_stop_part_one: first part of stop steps m2m_stop_part_two: second part of stop steps, optional

[RFC PATCH v4 00/11] Add audio support in v4l2 framework

2023-09-20 Thread Shengjiu Wang
Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc->memory) case is a non real time use case. User fills the input buffer to the asrc module, after conversion, then asrc sends back the output buffer to user. So it is

Re: (subset) [PATCH v4 23/28] mfd: core: Ensure disabled devices are skiped without aborting

2023-09-20 Thread Lee Jones
On Fri, 18 Aug 2023 18:39:17 +0200, Christophe Leroy wrote: > The loop searching for a matching device based on its compatible > string is aborted when a matching disabled device is found. > This abort prevents to add devices as soon as one disabled device > is found. > > Continue searching for

Re: [PATCH 0/7] arch/*: config: Remove ReiserFS from defconfig

2023-09-20 Thread Geert Uytterhoeven
Hi Peter, On Tue, Sep 19, 2023 at 6:16 PM Peter Lafreniere wrote: > On Tue, Sep 19, 2023 at 12:02, Geert Uytterhoeven > wrote: > > On Tue, Sep 19, 2023 at 5:58 PM Peter Lafreniere pe...@n8pjl.ca wrote: > > > 2) Stops building an obsolete and largely-unused filesystem unnecessarily. > > > Some

Re: [PATCH v4 2/5] fbdev: Replace fb_pgprotect() with pgprot_framebuffer()

2023-09-20 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, > Rename the fbdev mmap helper fb_pgprotect() to pgprot_framebuffer(). > The helper sets VMA page-access flags for framebuffers in device I/O > memory. > I think this rename makes it more clear. > Also clean up the helper's parameters and return value.

Re: [PATCH v4 1/5] fbdev: Avoid file argument in fb_pgprotect()

2023-09-20 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, > Only PowerPC's fb_pgprotect() needs the file argument, although > the implementation does not use it. Pass NULL to the internal Can you please mention the function that's the implementation for PowerPC ? If I'm looking at the code correctly, that

Re: [RFC PATCH v12 02/33] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-09-20 Thread Xu Yilun
On 2023-09-13 at 18:55:00 -0700, Sean Christopherson wrote: > From: Chao Peng > > Currently in mmu_notifier invalidate path, hva range is recorded and > then checked against by mmu_notifier_retry_hva() in the page fault ^ Now it is mmu_invalidate_retry_hva(). >