Re: [PATCH] powerpc: powermac: Use of_get_cpu_hwid() to read CPU node 'reg'

2023-08-14 Thread Michael Ellerman
Christophe JAILLET writes: > Le 03/07/2023 à 07:26, Michael Ellerman a écrit : >> On Sun, 19 Mar 2023 09:59:31 -0500, Rob Herring wrote: >>> Replace open coded reading of CPU nodes' "reg" properties with >>> of_get_cpu_hwid() dedicated for this purpose. >>> >>> >> >> Applied to powerpc/next. >>

Re: [PATCH v8 1/2] powerpc/rtas: Rename rtas_error_rc to rtas_generic_errno

2023-08-14 Thread Michael Ellerman
Mahesh Salgaonkar writes: > rtas_generic_errno() function will convert the generic rtas return codes > into errno. I don't see the point of renaming it, it just creates unnecessary churn. The existing name seems OK to me. ... > diff --git a/arch/powerpc/include/asm/rtas.h

[powerpc:next-test] BUILD SUCCESS ad03be7b2fe5e79df74a7e6b2568c7366adf0402

2023-08-14 Thread kernel test robot
successfully. More configs may be tested in the coming days. tested configs: alphaallyesconfig gcc alpha defconfig gcc alpharandconfig-r001-20230814 gcc alpharandconfig-r003-20230814 gcc alpha

Re: [PATCH v6 00/25] iommu: Make default_domain's mandatory

2023-08-14 Thread Baolu Lu
On 2023/8/15 1:30, Jason Gunthorpe wrote: On Mon, Aug 14, 2023 at 04:43:23PM +0800, Baolu Lu wrote: This is on github:https://github.com/jgunthorpe/linux/commits/iommu_all_defdom It seems that after this series, all ARM iommu drivers are able to support the IDENTITY default domain, hence

Re: [PATCH v6 08/25] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

2023-08-14 Thread Baolu Lu
On 2023/8/15 1:25, Jason Gunthorpe wrote: Ah, I went over all this again and decided to try again, it is too complicated. This patch can do what the commit message says and the following patches are even simpler: Yes. This method is more concise. Some nits below. /* * Combine the driver's

[powerpc:next] BUILD SUCCESS cd50430ceb3598957803934068531a274349bcf9

2023-08-14 Thread kernel test robot
configs may be tested in the coming days. tested configs: alphaallyesconfig gcc alpha defconfig gcc alpharandconfig-r001-20230814 gcc alpharandconfig-r004-20230814 gcc alpha

[powerpc:merge] BUILD SUCCESS 4f894fe22343138f0dc0ce18b49abfa45cdfeb6b

2023-08-14 Thread kernel test robot
built successfully. More configs may be tested in the coming days. tested configs: alphaallyesconfig gcc alpha defconfig gcc alpharandconfig-r001-20230814 gcc alpharandconfig-r004-20230814 gcc

[powerpc:fixes-test] BUILD SUCCESS 80e30aa4961e89111ae3e48885138a80add3e2ab

2023-08-14 Thread kernel test robot
have been built successfully. More configs may be tested in the coming days. tested configs: alphaallyesconfig gcc alpha defconfig gcc alpharandconfig-r001-20230814 gcc alpharandconfig-r004-20230814

Re: [PATCH v6 17/25] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Baolu Lu
On 2023/8/14 23:36, Jason Gunthorpe wrote: On Mon, Aug 14, 2023 at 02:32:33PM +0800, Baolu Lu wrote: + pm_runtime_get_sync(qcom_iommu->dev); + for (i = 0; i < fwspec->num_ids; i++) { + struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); + +

Re: [PATCH v6 07/25] iommu/mtk_iommu_v1: Implement an IDENTITY domain

2023-08-14 Thread Baolu Lu
On 2023/8/14 22:34, Jason Gunthorpe wrote: @@ -443,7 +459,7 @@ static int mtk_iommu_v1_create_mapping(struct device *dev, struct of_phandle_arg static int mtk_iommu_v1_def_domain_type(struct device *dev) { - return IOMMU_DOMAIN_UNMANAGED; + return IOMMU_DOMAIN_IDENTITY;

Re: [PATCH] I2C: Explicitly include correct DT includes

2023-08-14 Thread Wolfram Sang
On Fri, Jul 14, 2023 at 11:46:16AM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each

Re: [RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

2023-08-14 Thread Binbin Wu
On 7/19/2023 7:44 AM, 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, page zapping etc. There are other potential use cases for per-page memory

Re: [PATCH v6 15/25] iommufd/selftest: Make the mock iommu driver into a real driver

2023-08-14 Thread Jason Gunthorpe
On Wed, Aug 02, 2023 at 09:08:02PM -0300, Jason Gunthorpe wrote: > I've avoided doing this because there is no way to make this happen > without an intrusion into the core code. Up till now this has avoided > needing the core code's probe path with some hackery - but now that > default domains are

Re: [PATCH RFC 2/3] powerpc/ps3: refactor strncpy usage attempt 2

2023-08-14 Thread Kees Cook
On Fri, Aug 11, 2023 at 09:19:20PM +, Justin Stitt wrote: > This approach tries to use `make_field` inside of `make_first_field`. > This comes with some weird implementation as to get the same result we > need to first subtract `index` from the `make_field` result whilst being > careful with

Re: [RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

2023-08-14 Thread Sean Christopherson
On Mon, Aug 14, 2023, Binbin Wu wrote: > > On 7/19/2023 7:44 AM, Sean Christopherson wrote: > > + struct kvm_mmu_notifier_range post_set_range = { > > + .start = start, > > + .end = end, > > + .arg.attributes = attributes, > > + .handler =

[BUG] Re: [PATCH v3 10/13] mm/khugepaged: collapse_pte_mapped_thp() with mmap_read_lock()

2023-08-14 Thread Jann Horn
On Wed, Jul 12, 2023 at 6:42 AM Hugh Dickins wrote: > Bring collapse_and_free_pmd() back into collapse_pte_mapped_thp(). > It does need mmap_read_lock(), but it does not need mmap_write_lock(), > nor vma_start_write() nor i_mmap lock nor anon_vma lock. All racing > paths are relying on

Re: [PATCH] powerpc: Make virt_to_pfn() a static inline

2023-08-14 Thread Linus Walleij
On Mon, Aug 14, 2023 at 2:37 PM Michael Ellerman wrote: > > +static inline const void *pfn_to_kaddr(unsigned long pfn) > > +{ > > + return (const void *)(((unsigned long)__va(pfn)) << PAGE_SHIFT); > > Any reason to do it this way rather than: > > + return __va(pfn << PAGE_SHIFT); > >

Re: [PATCH v3 6/6] integrity: PowerVM support for loading third party code signing keys

2023-08-14 Thread Jarkko Sakkinen
On Sun Aug 13, 2023 at 5:15 AM EEST, Nayna Jain wrote: > On secure boot enabled PowerVM LPAR, third party code signing keys are > needed during early boot to verify signed third party modules. These > third party keys are stored in moduledb object in the Platform > KeyStore(PKS). > > Load third

Re: [PATCH v3 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform

2023-08-14 Thread Jarkko Sakkinen
On Sun Aug 13, 2023 at 5:15 AM EEST, Nayna Jain wrote: > On non-UEFI platforms, handle restrict_link_by_ca failures differently. > > Certificates which do not satisfy CA restrictions on non-UEFI platforms > are ignored. > > Signed-off-by: Nayna Jain > Reviewed-and-tested-by: Mimi Zohar > --- >

Re: [PATCH v3 1/6] integrity: PowerVM support for loading CA keys on machine keyring

2023-08-14 Thread Jarkko Sakkinen
On Sun Aug 13, 2023 at 5:15 AM EEST, Nayna Jain wrote: > Keys that derive their trust from an entity such as a security officer, > administrator, system owner, or machine owner are said to have "imputed > trust". CA keys with imputed trust can be loaded onto the machine keyring. > The mechanism

Re: [PATCH v6 00/25] iommu: Make default_domain's mandatory

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 04:43:23PM +0800, Baolu Lu wrote: > > This is on > > github:https://github.com/jgunthorpe/linux/commits/iommu_all_defdom > > It seems that after this series, all ARM iommu drivers are able to > support the IDENTITY default domain, hence perhaps we can remove below >

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-14 Thread Erhard Furtner
On Mon, 14 Aug 2023 09:40:44 + Christophe Leroy wrote: > Interesting. That means we get stuck somewhere around MMU_init() > > We know that MMU_init_hw() is called and runs at least until: > > pr_info("Total memory = %lldMB; using %ldkB for hash table\n", > (unsigned

Re: [PATCH v6 08/25] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

2023-08-14 Thread Jason Gunthorpe
On Sat, Aug 12, 2023 at 10:15:42AM +0800, Baolu Lu wrote: > > How about consolidating above into a single helper? > > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -1787,6 +1787,21 @@ __iommu_group_alloc_default_domain(struct iommu_group > *group, int req_type) > return

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

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 02:58:14PM +0800, Baolu Lu wrote: > > diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c > > index 0bf08b120cf105..056832a367c2af 100644 > > --- a/drivers/iommu/sun50i-iommu.c > > +++ b/drivers/iommu/sun50i-iommu.c > > @@ -667,14 +667,11 @@ static

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2023-08-14 Thread Grant Grundler
On Sat, Aug 12, 2023 at 5:45 PM David Heidelberg wrote: > > Tested-by: David Heidelberg Thanks David! > For PATCH v4 please fix the typo reported by the bot :) Sorry - I'll do that today. > Seeing messages as > > __aer_print_error: 72 callbacks suppressed > > but it still prints many errors

Re: [PATCH v6 20/25] iommu/sun50i: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 02:44:50PM +0800, Baolu Lu wrote: > On 2023/8/3 8:08, 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

Re: [PATCH v6 17/25] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 02:32:33PM +0800, Baolu Lu wrote: > > + pm_runtime_get_sync(qcom_iommu->dev); > > + for (i = 0; i < fwspec->num_ids; i++) { > > + struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, > > fwspec->ids[i]); > > + > > + /* Disable the context bank: */ > >

Re: [PATCH v6 12/25] iommu/tegra-smmu: Support DMA domains in tegra

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 01:08:39PM +0800, Baolu Lu wrote: > > @@ -989,6 +989,12 @@ static int tegra_smmu_def_domain_type(struct device > > *dev) > > } > > static const struct iommu_ops tegra_smmu_ops = { > > + /* > > +* FIXME: For now we want to run all translation in IDENTITY mode, >

Re: [PATCH v6 07/25] iommu/mtk_iommu_v1: Implement an IDENTITY domain

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 11:06:12AM +0800, Baolu Lu wrote: > On 2023/8/3 8:07, Jason Gunthorpe wrote: > > What mtk does during mtk_iommu_v1_set_platform_dma() is actually putting > > the iommu into identity mode. Make this available as a proper IDENTITY > > domain. > > > > The

Re: [PATCH] powerpc: Make virt_to_pfn() a static inline

2023-08-14 Thread Christophe Leroy
Le 14/08/2023 à 14:37, Michael Ellerman a écrit : > Linus Walleij writes: >> Making virt_to_pfn() a static inline taking a strongly typed >> (const void *) makes the contract of a passing a pointer of that >> type to the function explicit and exposes any misuse of the >> macro virt_to_pfn()

Re: [PATCH v6 02/25] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-08-14 Thread Jason Gunthorpe
On Sat, Aug 12, 2023 at 09:41:50AM +0800, Baolu Lu wrote: > > index e05c93b6c37fba..87aebba474e093 100644 > > --- a/include/linux/iommu.h > > +++ b/include/linux/iommu.h > > @@ -64,6 +64,7 @@ struct iommu_domain_geometry { > > #define __IOMMU_DOMAIN_DMA_FQ (1U << 3) /* DMA-API uses flush

Re: [PATCH v6 02/25] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-08-14 Thread Jason Gunthorpe
On Sun, Aug 13, 2023 at 08:11:30PM +0800, Baolu Lu wrote: > On 2023/8/12 19:28, Jason Gunthorpe wrote: > > On Sat, Aug 12, 2023 at 09:36:33AM +0800, Baolu Lu wrote: > > > > @@ -290,6 +295,7 @@ struct iommu_ops { > > > > unsigned long pgsize_bitmap; > > > > struct module *owner; > >

Re: [PATCH v6 10/25] iommu/exynos: Implement an IDENTITY domain

2023-08-14 Thread Jason Gunthorpe
On Mon, Aug 14, 2023 at 12:52:34PM +0800, Baolu Lu wrote: > On 2023/8/3 8:07, 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 > >

Re: [PATCH] powerpc: Make virt_to_pfn() a static inline

2023-08-14 Thread Michael Ellerman
Linus Walleij writes: > Making virt_to_pfn() a static inline taking a strongly typed > (const void *) makes the contract of a passing a pointer of that > type to the function explicit and exposes any misuse of the > macro virt_to_pfn() acting polymorphic and accepting many types > such as (void

Re: [PATCH RFC 0/3] powerpc/ps3: refactor strncpy usage

2023-08-14 Thread Michael Ellerman
Justin Stitt writes: > On Fri, Aug 11, 2023 at 2:19 PM Justin Stitt wrote: >> >> Within this RFC-series I want to get some comments on two ideas that I >> have for refactoring the current `strncpy` usage in repository.c. >> >> When looking at `make_first_field` we see a u64 is being used to

Re: [PATCH RFC 1/3] powerpc/ps3: refactor strncpy usage attempt 1

2023-08-14 Thread Michael Ellerman
Justin Stitt writes: > This approach simply replicates the implementation of `make_field` which > means we drop `strncpy` for `memcpy`. > > Signed-off-by: Justin Stitt > --- > arch/powerpc/platforms/ps3/repository.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH 7/7] perf vendor events: Update metric events for power10 platform

2023-08-14 Thread Kajol Jain
Update JSON/events for power10 platform with additional metrics. Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/metrics.json | 33 +++ 1 file changed, 33 insertions(+) diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json

[PATCH 6/7] perf vendor events: Update metric event names for power10 platform

2023-08-14 Thread Kajol Jain
Update metric event name for some of the JSON/metric events for power10 platform. Fixes: 3ca3af7d1f23 ("perf vendor events power10: Add metric events JSON file for power10 platform") Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/metrics.json | 50 +-- 1 file

[PATCH 4/7] perf vendor events: Move JSON/events to appropriate files for power10 platform

2023-08-14 Thread Kajol Jain
Move some of the power10 JSON/events to appropriate files. Fixes: 32daa5d7899e ("perf vendor events: Initial JSON/events list for power10 platform") Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/cache.json | 45 .../arch/powerpc/power10/floating_point.json | 67 +

[PATCH 5/7] perf vendor events: Update JSON/events for power10 platform

2023-08-14 Thread Kajol Jain
Update JSON/events for power10 platform with additional events. Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/frontend.json| 25 + .../arch/powerpc/power10/marked.json | 30 .../arch/powerpc/power10/memory.json | 10 ++

[PATCH 3/7] perf vendor events: Drop STORES_PER_INST metric event for power10 platform

2023-08-14 Thread Kajol Jain
Drop STORES_PER_INST metric event for the power10 platform, as the metric expression of STORES_PER_INST metric event using dropped event PM_ST_FIN. Fixes: 3ca3af7d1f23 ("perf vendor events power10: Add metric events JSON file for power10 platform") Signed-off-by: Kajol Jain ---

[PATCH 2/7] perf vendor events: Drop some of the JSON/events for power10 platform

2023-08-14 Thread Kajol Jain
Drop some of the JSON/events for power10 platform due to counter data mismatch. Fixes: 32daa5d7899e ("perf vendor events: Initial JSON/events list for power10 platform") Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/floating_point.json | 7 ---

[PATCH 1/7] perf vendor events: Update the JSON/events descriptions for power10 platform

2023-08-14 Thread Kajol Jain
Update the description for some of the JSON/events for power10 platform. Fixes: 32daa5d7899e ("perf vendor events: Initial JSON/events list for power10 platform") Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/cache.json | 4 +- .../arch/powerpc/power10/frontend.json

Re: [PATCH v4 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-08-14 Thread Srikar Dronamraju
* Laurent Dufour [2023-07-05 16:51:43]: > From: Michael Ellerman > > Integrate with the generic SMT support, so that when a CPU is DLPAR > onlined it is brought up with the correct SMT mode. > Looks good to me. Reviewed-by: Srikar Dronamraju > Signed-off-by: Michael Ellerman > --- >

Re: [PATCH v4 09/10] powerpc: Add HOTPLUG_SMT support

2023-08-14 Thread Srikar Dronamraju
* Laurent Dufour [2023-07-05 16:51:42]: > From: Michael Ellerman > > Add support for HOTPLUG_SMT, which enables the generic sysfs SMT support > files in /sys/devices/system/cpu/smt, as well as the "nosmt" boot > parameter. > > Implement the recently added hooks to allow partial SMT states,

Re: [PATCH v4 08/10] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-08-14 Thread Srikar Dronamraju
* Laurent Dufour [2023-07-05 16:51:41]: > From: Michael Ellerman > > As part of the generic HOTPLUG_SMT code, there is support for disabling > secondary SMT threads at boot time, by passing "nosmt" on the kernel > command line. > > The way that is implemented is the secondary threads are

Re: [kvm-unit-tests PATCH 2/2] Link with "-z noexecstack" to avoid warning from newer versions of ld

2023-08-14 Thread Thomas Huth
On 27/06/2023 00.34, Sean Christopherson wrote: On Fri, Jun 23, 2023, Thomas Huth wrote: On 23/06/2023 16.24, Sean Christopherson wrote: On Fri, Jun 23, 2023, Thomas Huth wrote: Newer versions of ld (from binutils 2.40) complain on s390x and x86: ld: warning: s390x/cpu.o: missing

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-14 Thread Christophe Leroy
Le 13/08/2023 à 21:38, Erhard Furtner a écrit : > On Fri, 11 Aug 2023 06:45:14 + > Christophe Leroy wrote: > >> Le 11/08/2023 à 01:48, Erhard Furtner a écrit : >>> I wanted to fire up my PowerMac G4 MDD (Dual CPU) with a KASAN debug build >>> of kernel 6.5-rc5 for testing purposes. But

Re: [PATCH v6 00/25] iommu: Make default_domain's mandatory

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:07, Jason Gunthorpe wrote: [ It would be good to get this in linux-next, we have some good test coverage on the ARM side already, thanks! ] It has been a long time coming, this series completes the default_domain transition and makes it so that the core IOMMU code will always have

Re: [PATCH] powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE

2023-08-14 Thread Christophe Leroy
Le 14/08/2023 à 08:24, Nicholas Piggin a écrit : > On Wed Aug 9, 2023 at 6:01 PM AEST, Christophe Leroy wrote: >> With skiboot_defconfig, Clang reports: >> >>CC arch/powerpc/mm/book3s64/radix_tlb.o >> arch/powerpc/mm/book3s64/radix_tlb.c:419:20: error: unused function >>

Re: [PATCH v3 2/6] KVM: PPC: Rename accessor generator macros

2023-08-14 Thread Nicholas Piggin
On Mon Aug 7, 2023 at 11:45 AM AEST, Jordan Niethe wrote: > More "wrapper" style accessor generating macros will be introduced for > the nestedv2 guest support. Rename the existing macros with more > descriptive names now so there is a consistent naming convention. > > Signed-off-by: Jordan Niethe

RE: [PATCH v3 4/6] KVM: PPC: Book3s HV: Hold LPIDs in an unsigned long

2023-08-14 Thread David Laight
From: Jordan Niethe > Sent: 07 August 2023 02:46 > > The LPID register is 32 bits long. The host keeps the lpids for each > guest in an unsigned word struct kvm_arch. Currently, LPIDs are already > limited by mmu_lpid_bits and KVM_MAX_NESTED_GUESTS_SHIFT. > > The nestedv2 API returns a 64 bit

Re: [PATCH v3 4/6] KVM: PPC: Book3s HV: Hold LPIDs in an unsigned long

2023-08-14 Thread Nicholas Piggin
On Mon Aug 7, 2023 at 11:45 AM AEST, Jordan Niethe wrote: > The LPID register is 32 bits long. The host keeps the lpids for each > guest in an unsigned word struct kvm_arch. Currently, LPIDs are already > limited by mmu_lpid_bits and KVM_MAX_NESTED_GUESTS_SHIFT. > > The nestedv2 API returns a 64

Re: [PATCH v3 1/6] KVM: PPC: Use getters and setters for vcpu register state

2023-08-14 Thread Nicholas Piggin
On Mon Aug 7, 2023 at 11:45 AM AEST, Jordan Niethe wrote: > There are already some getter and setter functions used for accessing > vcpu register state, e.g. kvmppc_get_pc(). There are also more > complicated examples that are generated by macros like > kvmppc_get_sprg0() which are generated by

Re: [PATCH] ocxl: Use pci_dev_id() to simplify the code

2023-08-14 Thread Andrew Donnellan
On Fri, 2023-08-11 at 18:20 +0800, Zheng Zengkai wrote: > PCI core API pci_dev_id() can be used to get the BDF number for a pci > device. We don't need to compose it mannually. Use pci_dev_id() to > simplify the code a little bit. > > Signed-off-by: Zheng Zengkai Acked-by: Andrew Donnellan --

Re: [PATCH v6 25/25] iommu: Convert remaining simple drivers to domain_alloc_paging()

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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 incompatible with dma-iommu.c,

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

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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 Tested-by: Nicolin Chen

Re: [PATCH v6 20/25] iommu/sun50i: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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 sun50i_iommu_identity_attach()

Re: [PATCH v6 19/25] iommu/mtk_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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. Signed-off-by: Jason Gunthorpe --- drivers/iommu/mtk_iommu.c | 23 +++ 1 file

Re: [PATCH v6 18/25] iommu/ipmmu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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 ipmmu_utlb_disable()") Signed-off-by:

Re: [PATCH v6 17/25] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-14 Thread Baolu Lu
On 2023/8/3 8:08, 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. Signed-off-by: Jason Gunthorpe --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 39

Re: [PATCH] powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE

2023-08-14 Thread Nicholas Piggin
On Wed Aug 9, 2023 at 6:01 PM AEST, Christophe Leroy wrote: > With skiboot_defconfig, Clang reports: > > CC arch/powerpc/mm/book3s64/radix_tlb.o > arch/powerpc/mm/book3s64/radix_tlb.c:419:20: error: unused function > '_tlbie_pid_lpid' [-Werror,-Wunused-function] > static inline void