Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-08-28 Thread Elliot Berman
On 8/28/2023 3:56 PM, Ackerley Tng wrote: > 1. Since the physical memory's representation is the inode and should be > coupled to the virtual machine (as a concept, not struct kvm), should > the binding/coupling be with the file, or the inode? > I've been working on Gunyah's

Re: [PATCH v7 24/24] iommu: Convert remaining simple drivers to domain_alloc_paging()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:38PM -0300, Jason Gunthorpe wrote: > These drivers don't support IOMMU_DOMAIN_DMA, so this commit effectively > allows them to support that mode. > > The prior work to require default_domains makes this safe because every > one of these drivers is either compilation

Re: [PATCH v7 23/24] iommu: Convert simple drivers with DOMAIN_DMA to domain_alloc_paging()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:37PM -0300, Jason Gunthorpe wrote: > These drivers are all trivially converted since the function is only > called if the domain type is going to be > IOMMU_DOMAIN_UNMANAGED/DMA. > > Tested-by: Heiko Stuebner > Tested-by: Steven Price > Tested-by: Marek Szyprowski

Re: [PATCH v7 22/24] iommu: Add ops->domain_alloc_paging()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:36PM -0300, Jason Gunthorpe wrote: > This callback requests the driver to create only a __IOMMU_DOMAIN_PAGING > domain, so it saves a few lines in a lot of drivers needlessly checking > the type. > > More critically, this allows us to sweep out all the >

[PATCH] Update creation of flash_block_cache to accout for potential panic

2023-08-28 Thread Audra Mitchell
With PPC builds enabling CONFIG_HARDENED_USERCOPY, interacting with the RunTime Abstraction Services (RTAS) firmware by writing to /proc/powerpc/rtas/firmware_flash will end up triggering the mm/usercopy.c:101 assertion: [ 38.647148] rw /proc/powerpc/rtas/firmware_flash [ 38.650254] usercopy:

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-08-28 Thread Ackerley Tng
Sean Christopherson writes: > On Mon, Aug 21, 2023, Ackerley Tng wrote: >> Sean Christopherson writes: >> >> > On Tue, Aug 15, 2023, Ackerley Tng wrote: >> >> Sean Christopherson writes: >> >> > Nullifying the KVM pointer isn't sufficient, because without additional >> >> > actions >> >> >

Re: [PATCH v7 21/24] iommu: Add __iommu_group_domain_alloc()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:35PM -0300, Jason Gunthorpe wrote: > Allocate a domain from a group. Automatically obtains the iommu_ops to use > from the device list of the group. Convert the internal callers to use it. > > Tested-by: Steven Price > Tested-by: Marek Szyprowski > Tested-by:

Re: [PATCH] Update creation of flash_block_cache to accout for potential panic

2023-08-28 Thread Nathan Lynch
Audra Mitchell writes: > With PPC builds enabling CONFIG_HARDENED_USERCOPY, interacting with the > RunTime > Abstraction Services (RTAS) firmware by writing to > /proc/powerpc/rtas/firmware_flash will end up triggering the mm/usercopy.c:101 > assertion: Thanks, this was fixed already:

Re: [PATCH v7 20/24] iommu: Require a default_domain for all iommu drivers

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:34PM -0300, Jason Gunthorpe wrote: > At this point every iommu driver will cause a default_domain to be > selected, so we can finally remove this gap from the core code. > > The following table explains what each driver supports and what the > resulting

Re: [PATCH v7 19/24] iommu/sun50i: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:33PM -0300, Jason Gunthorpe wrote: > Prior to commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") the > sun50i_iommu_detach_device() function was being called by > ops->detach_dev(). > > This is an IDENTITY domain so convert sun50i_iommu_detach_device() into >

Re: [PATCH v7 18/24] iommu/mtk_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:32PM -0300, Jason Gunthorpe wrote: > This brings back the ops->detach_dev() code that commit > 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it > into an IDENTITY domain. > > Reviewed-by: Lu Baolu > Signed-off-by: Jason Gunthorpe > --- >

Re: [PATCH v7 17/24] iommu/ipmmu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:31PM -0300, Jason Gunthorpe wrote: > This brings back the ops->detach_dev() code that commit > 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it > into an IDENTITY domain. > > Also reverts commit 584d334b1393 ("iommu/ipmmu-vmsa: Remove >

Re: [PATCH v7 16/24] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:30PM -0300, Jason Gunthorpe wrote: > This brings back the ops->detach_dev() code that commit > 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it > into an IDENTITY domain. > > Reviewed-by: Lu Baolu > Signed-off-by: Jason Gunthorpe > --- >

Re: [PATCH v7 15/24] iommu: Remove ops->set_platform_dma_ops()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:29PM -0300, Jason Gunthorpe wrote: > All drivers are now using IDENTITY or PLATFORM domains for what this did, > we can remove it now. It is no longer possible to attach to a NULL domain. > > Tested-by: Heiko Stuebner > Tested-by: Niklas Schnelle > Tested-by:

Re: [PATCH v7 14/24] iommu/msm: Implement an IDENTITY domain

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:28PM -0300, Jason Gunthorpe wrote: > What msm does during msm_iommu_set_platform_dma() is actually putting the > iommu into identity mode. > > Move to the new core support for ARM_DMA_USE_IOMMU by defining > ops->identity_domain. > > This driver does not support

Re: [PATCH v7 13/24] iommu/omap: Implement an IDENTITY domain

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:27PM -0300, Jason Gunthorpe wrote: > What omap does during omap_iommu_set_platform_dma() is actually putting > the iommu into identity mode. > > Move to the new core support for ARM_DMA_USE_IOMMU by defining > ops->identity_domain. > > This driver does not support

[PATCH v2] reapply: powerpc/xmon: Relax frame size for clang

2023-08-28 Thread Nick Desaulniers
. - Update commit message slightly, including oneline. - Link to v1: https://lore.kernel.org/r/20230828-ppc_rerevert-v1-1-74f55b818...@google.com --- arch/powerpc/xmon/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile index

Re: [PATCH v7 12/24] iommu/tegra-smmu: Support DMA domains in tegra

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:26PM -0300, Jason Gunthorpe wrote: > All ARM64 iommu drivers should support IOMMU_DOMAIN_DMA to enable > dma-iommu.c. > > tegra is blocking dma-iommu usage, and also default_domain's, because it > wants an identity translation. This is needed for some device quirk.

Re: [PATCH v7 11/24] iommu/tegra-smmu: Implement an IDENTITY domain

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:25PM -0300, Jason Gunthorpe wrote: > What tegra-smmu does during tegra_smmu_set_platform_dma() is actually > putting the iommu into identity mode. > > Move to the new core support for ARM_DMA_USE_IOMMU by defining > ops->identity_domain. > > Reviewed-by: Lu Baolu >

Re: [PATCH v7 10/24] iommu/exynos: Implement an IDENTITY domain

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:24PM -0300, Jason Gunthorpe wrote: > What exynos calls exynos_iommu_detach_device is actually putting the iommu > into identity mode. > > Move to the new core support for ARM_DMA_USE_IOMMU by defining > ops->identity_domain. > > Tested-by: Marek Szyprowski >

Re: [PATCH v7 09/24] iommu: Allow an IDENTITY domain as the default_domain in ARM32

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:23PM -0300, Jason Gunthorpe wrote: > Even though dma-iommu.c and CONFIG_ARM_DMA_USE_IOMMU do approximately the > same stuff, the way they relate to the IOMMU core is quiet different. > > dma-iommu.c expects the core code to setup an UNMANAGED domain (of type >

Re: [PATCH v7 08/24] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

2023-08-28 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:22PM -0300, Jason Gunthorpe wrote: > Except for dart (which forces IOMMU_DOMAIN_DMA) every driver returns 0 or > IDENTITY from ops->def_domain_type(). > > The drivers that return IDENTITY have some kind of good reason, typically > that quirky hardware really can't

Re: [PATCH v3] fsl_ucc_hdlc: process the result of hold_open()

2023-08-28 Thread Jakub Kicinski
On Mon, 28 Aug 2023 15:12:35 +0300 Alexandra Diupina wrote: > Process the result of hold_open() and return it from > uhdlc_open() in case of an error > It is necessary to pass the error code up the control flow, > similar to a possible error in request_irq() > > Found by Linux Verification Center

Re: [PATCH] Revert "Revert "powerpc/xmon: Relax frame size for clang""

2023-08-28 Thread Nathan Chancellor
TOC) > > obj-y+= xmon.o nonstdio.o spr_access.o xmon_bpts.o > > --- > base-commit: 2ee82481c392eec06a7ef28df61b7f0d8e45be2e > change-id: 20230828-ppc_rerevert-647427f04ce1 > > Best regards, > -- > Nick Desaulniers >

[PATCH] Revert "Revert "powerpc/xmon: Relax frame size for clang""

2023-08-28 Thread ndesaulniers
-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) obj-y += xmon.o nonstdio.o spr_access.o xmon_bpts.o --- base-commit: 2ee82481c392eec06a7ef28df61b7f0d8e45be2e change-id: 20230828-ppc_rerevert-647427f04ce1 Best regards, -- Nick Desaulniers

Re: [PATCH v3] fsl_ucc_hdlc: process the result of hold_open()

2023-08-28 Thread Christophe Leroy
Le 28/08/2023 à 14:12, Alexandra Diupina a écrit : > [Vous ne recevez pas souvent de courriers de adiup...@astralinux.ru. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Process the result of hold_open() and return it from > uhdlc_open() in case

[PATCH v3] fsl_ucc_hdlc: process the result of hold_open()

2023-08-28 Thread Alexandra Diupina
Process the result of hold_open() and return it from uhdlc_open() in case of an error It is necessary to pass the error code up the control flow, similar to a possible error in request_irq() Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c19b6d246a35 ("drivers/net:

Re: (subset) [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-28 Thread Michael Schmitz
Hi Geert, Am 28.08.2023 um 18:42 schrieb Geert Uytterhoeven: On Sat, Aug 26, 2023 at 12:44 AM Michael Schmitz wrote: (Incidentally - did you ever publish the m68k full history tree anywhere in git?) You mean the gitified version of the Linux/m68k CVS tree Ralf created for me because my

Re: (subset) [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-28 Thread Geert Uytterhoeven
On Sat, Aug 26, 2023 at 12:44 AM Michael Schmitz wrote: > (Incidentally - did you ever publish the m68k full history tree anywhere > in git?) You mean the gitified version of the Linux/m68k CVS tree Ralf created for me because my machine wasn't powerful enough? No, and I should look into doing

crypto: powerpc/chacha20,poly1305-p10 - Add dependency on VSX

2023-08-28 Thread Herbert Xu
On Fri, Aug 25, 2023 at 07:44:32PM +0800, kernel test robot wrote: > > All errors (new ones prefixed by >>): > >In file included from arch/powerpc/crypto/poly1305-p10-glue.c:19: ... > ae3a197e3d0bfe3 David Howells2012-03-28 75 > ae3a197e3d0bfe3 David Howells2012-03-28 76 #ifdef

Re: [PATCH v2] fsl_ucc_hdlc: add a check of the return value from hdlc_open

2023-08-28 Thread Christophe Leroy
Le 28/08/2023 à 10:27, Alexandra Diupina a écrit : > [Vous ne recevez pas souvent de courriers de adiup...@astralinux.ru. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Process the result of hold_open() and return it from > uhdlc_open() in case

[PATCH v2] fsl_ucc_hdlc: add a check of the return value from hdlc_open

2023-08-28 Thread Alexandra Diupina
Process the result of hold_open() and return it from uhdlc_open() in case of an error It is necessary to pass the error code up the control flow, similar to a possible error in request_irq() Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c19b6d246a35 ("drivers/net:

Re: [PATCH 1/2] powerpc/mm/book3s64: Fix build error with SPARSEMEM disabled

2023-08-28 Thread Aneesh Kumar K V
On 8/28/23 1:16 PM, Aneesh Kumar K.V wrote: > With CONFIG_SPARSEMEM disabled the below kernel build error is observed. > > arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier > 'SECTION_SIZE_BITS' > > CONFIG_MEMORY_HOTPLUG depends on CONFIG_SPARSEMEM and it is more clear > to

[PATCH 2/2] powerpc/mm/book3s64: Use 256M as the upper limit with coherent device memory attached

2023-08-28 Thread Aneesh Kumar K.V
commit 4d15721177d5 ("powerpc/mm: Cleanup memory block size probing") used 256MB as the memory block size when we have ibm,coherent-device-memory device tree node present. Instead of returning with 256MB memory block size, continue to check the rest of the memory regions and make sure we can still

[PATCH 1/2] powerpc/mm/book3s64: Fix build error with SPARSEMEM disabled

2023-08-28 Thread Aneesh Kumar K.V
With CONFIG_SPARSEMEM disabled the below kernel build error is observed. arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS' CONFIG_MEMORY_HOTPLUG depends on CONFIG_SPARSEMEM and it is more clear to describe the code dependency in terms of MEMORY_HOTPLUG.

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-28 Thread Michael Ellerman
Masahiro Yamada writes: > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook wrote: >> >> Hi, >> >> This is my series to show *.config targets in the "help" target so these >> various topics can be more easily discoverd. >> >> v2: >> - split .fragment from .config to hide "internal" fragments > > Please

[RFC v2 2/2] powerpc/selftest: Add support for cpuidle latency measurement

2023-08-28 Thread Aboorva Devarajan
From: Pratik R. Sampat The cpuidle latency selftest provides support to systematically extract, analyse and present IPI and timer based wakeup latencies for each CPU and each idle state available on the system. The selftest leverages test_cpuidle_latency module's debugfs interface to interact

[RFC v2 0/2] CPU-Idle latency selftest framework

2023-08-28 Thread Aboorva Devarajan
Changelog: v1 -> v2 * Rebased on v6.5-rc6 * Moved the test directory to powerpc debugfs * Minimal code refactoring RFC v1: https://lore.kernel.org/all/20210611124154.56427-1-psam...@linux.ibm.com/ Other related RFC: https://lore.kernel.org/all/20210430082804.38018-1-psam...@linux.ibm.com/

[RFC v2 1/2] powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events

2023-08-28 Thread Aboorva Devarajan
From: Pratik R. Sampat Introduce a mechanism to fire directed IPIs from a source CPU to a specified target CPU and measure the time incurred on waking up the target CPU in response. Also, introduce a mechanism to queue a hrtimer on a specified CPU and subsequently measure the time taken to