Re: [PATCH v4 06/12] ARM: dove: add gigabit ethernet and mvmdio device tree nodes

2013-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2013 at 09:10:10AM -0400, Jason Cooper wrote: > iirc, our solution to this was to parse the ATAGs for the mac addr and > update the appended dtb. This way, module load and unload would work > without loosing the mac address. I believe Jason Gunthorpe has a p

Re: [PATCH v4 06/12] ARM: dove: add gigabit ethernet and mvmdio device tree nodes

2013-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2013 at 07:32:51PM +0200, Sebastian Hesselbarth wrote: > Not neccessary anyway, after talking Jason C in a Kirkwood-only > workaround I prepared a patch that reads mac address registers early > and stores it in the local-mac-address property. That sounds great, but, FWIW, our boo

Re: [PATCH 2/2] net: mv643xx_eth: proper initialization for Kirkwood SoCs

2013-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2013 at 10:04:02PM +0200, Sebastian Hesselbarth wrote: > Ethernet controllers found on Kirkwood SoCs not only suffer from loosing > MAC address register contents on clock gating but also some important > registers are reset to values that would break ethernet. This patch FWIW, we

Re: [PATCH 2/2] net: mv643xx_eth: proper initialization for Kirkwood SoCs

2013-05-23 Thread Jason Gunthorpe
On Thu, May 23, 2013 at 12:01:11PM -0400, Jason Cooper wrote: > > > + /* Kirkwood resets some registers on gated clocks. Especially > > > + * CLK125_BYPASS_EN must be cleared but is not available on > > > + * all other SoCs/System Controllers using this driver. > > > + */ > > > + if (of_machine_

Re: [PATCH 2/2] net: mv643xx_eth: proper initialization for Kirkwood SoCs

2013-05-23 Thread Jason Gunthorpe
On Thu, May 23, 2013 at 01:23:39PM -0400, Jason Cooper wrote: > Shouldn't it rather be > > compatible = "marvell,kirkwood-eth", "marvell,orion-eth"; Not sure about orion-eth? > I'm inclined to go with of_machine_is_compatible() since the only > concrete difference we know is that the twe

Re: [PATCH 2/2] net: mv643xx_eth: proper initialization for Kirkwood SoCs

2013-05-23 Thread Jason Gunthorpe
On Thu, May 23, 2013 at 02:40:28PM -0400, Jason Cooper wrote: > > But there is a larger problem here then just this one bit. > > > > The PSC1 register must be set properly for the board layout, and today > > we rely on the bootloader to set it. In fact, even with Sebastian's > > change the ethern

Re: [PATCH 2/2] net: mv643xx_eth: proper initialization for Kirkwood SoCs

2013-05-24 Thread Jason Gunthorpe
On Fri, May 24, 2013 at 12:46:36PM -0400, Jason Cooper wrote: > > Why are you not keen on this? It seems like normal device driver > > practice, that is what the data field of of_device_id is typically > > used for.. > > I'm not keen on it because we don't have a document saying "All kirkwood > S

Re: [tpmdd-devel] Has anyone a ATMEL TPM Chip on PPC64 (CONFIG_TCG_ATMEL)?

2013-10-28 Thread Jason Gunthorpe
On Mon, Oct 28, 2013 at 01:03:43PM -0500, Joel Schopp wrote: > On 10/27/2013 05:06 PM, Peter H?we wrote: > > Hi, > > > > I was wondering if anyone here on this list still has a machine with an old > > ATMEL TPM (trusted platform module) lying around? > > > >>From the kconfig entry it becomes evi

[PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-04 Thread Jason Gunthorpe
set is not called, and the bootloader has not set the correct address then the driver will fail to function. Tested on Kirkwood. Signed-off-by: Jason Gunthorpe --- Cc: David Miller Cc: Lennert Buytenhek Cc: Jason Cooper Cc: Andrew Lunn Cc: Benjamin Herrenschmidt Cc: net...@vger.kernel.org Cc:

[PATCH v2] NTP: Add a CONFIG_RTC_SYSTOHC configuration

2012-12-14 Thread Jason Gunthorpe
n ARM kirkwood and PPC405 Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/time.c |2 +- drivers/rtc/Kconfig|9 + drivers/rtc/Makefile |1 + drivers/rtc/systohc.c | 44 include/linux/time.h |1 + k

[PATCH v3] NTP: Add a CONFIG_RTC_SYSTOHC configuration

2012-12-17 Thread Jason Gunthorpe
n ARM kirkwood and PPC405 Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/time.c |2 +- drivers/rtc/Kconfig| 10 +- drivers/rtc/Makefile |1 + drivers/rtc/systohc.c | 44 include/linux/rtc.h|1 + k

Re: [PATCH 5/5] mv643xx_eth: convert to use the Marvell Orion MDIO driver

2013-01-29 Thread Jason Gunthorpe
On Tue, Jan 29, 2013 at 04:24:08PM +0100, Florian Fainelli wrote: > This patch converts the Marvell MV643XX ethernet driver to use the > Marvell Orion MDIO driver. As a result, PowerPC and ARM platforms > registering the Marvell MV643XX ethernet driver are also updated to > register a Marvell Orion

Re: [PATCH 4/5] net: mvmdio: allow Device Tree and platform device to coexist

2013-01-29 Thread Jason Gunthorpe
On Tue, Jan 29, 2013 at 04:24:07PM +0100, Florian Fainelli wrote: > - dev->err_interrupt = irq_of_parse_and_map(pdev->dev.of_node, 0); > + if (pdev->dev.of_node) { > + dev->regs = of_iomap(pdev->dev.of_node, 0); > + if (!dev->regs) { > + dev_er

Re: [PATCH 2/2] of: use platform_device_add

2013-02-19 Thread Jason Gunthorpe
On Sun, Feb 17, 2013 at 10:49:08AM +, Grant Likely wrote: > > > The patch introduce a regression on imx6q boot. The IOMUXC block on > > > imx6q is special. It acts not only a pin controller but also a system > > > controller with a bunch of system level registers in there. That's why > > > w

Re: [PATCH V2] powerpc/infiniband: Use cache inhibitted and guarded mapping on powerpc

2016-04-22 Thread Jason Gunthorpe
On Fri, Apr 22, 2016 at 08:47:56AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2016-04-20 at 03:58 -0400, Aneesh Kumar K.V wrote: > > The driver was requesting for a writethrough mapping. But with thoses > > flags we will end up with a SAO mapping because we now have memory > > conherence always

Re: [RESEND 4/7] mm/gup: Add FOLL_LONGTERM capability to GUP fast

2019-03-25 Thread Jason Gunthorpe
On Mon, Mar 25, 2019 at 01:42:26AM -0700, Ira Weiny wrote: > On Fri, Mar 22, 2019 at 03:12:55PM -0700, Dan Williams wrote: > > On Sun, Mar 17, 2019 at 7:36 PM wrote: > > > > > > From: Ira Weiny > > > > > > DAX pages were previously unprotected from longterm pins when users > > > called get_user_p

Re: [RESEND 4/7] mm/gup: Add FOLL_LONGTERM capability to GUP fast

2019-03-25 Thread Jason Gunthorpe
On Mon, Mar 25, 2019 at 02:23:15AM -0700, Ira Weiny wrote: > > > Unfortunately holding the lock is required to support FOLL_LONGTERM (to > > > check > > > the VMAs) but we don't want to hold the lock to be optimal (specifically > > > allow > > > FAULT_FOLL_ALLOW_RETRY). So I'm maintaining the op

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Fri, Feb 21, 2020 at 11:24:56AM -0700, Logan Gunthorpe wrote: > Hi, > > This is v3 of the patchset which cleans up a number of minor issues > from the feedback of v2 and rebases onto v5.6-rc2. Additional feedback > is welcome. > > Thanks, > > Logan > > -- > > Changes in v3: > * Rebased ont

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2020 at 10:21:50AM -0700, Logan Gunthorpe wrote: > > > On 2020-02-27 10:17 a.m., Jason Gunthorpe wrote: > >> Instead of this, this series proposes a change to arch_add_memory() > >> to take the pgprot required by the mapping which allows us to &g

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2020 at 09:55:04AM -0800, Dan Williams wrote: > On Thu, Feb 27, 2020 at 9:43 AM Jason Gunthorpe wrote: > > > > On Thu, Feb 27, 2020 at 10:21:50AM -0700, Logan Gunthorpe wrote: > > > > > > > > > On 2020-02-27 10:17 a.m., Jason Gunthorpe wr

Re: [PATCH 08/12] docs: fix broken references to text files

2020-03-17 Thread Jason Gunthorpe
s/Kconfig | 6 +++--- > include/linux/mm.h | 4 ++-- > include/uapi/linux/ethtool_netlink.h | 2 +- > include/uapi/rdma/rdma_user_ioctl_cmds.h | 2 +- For the rdma files Acked-by: Jason Gunthorpe Jason

Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-04 Thread Jason Gunthorpe
On Mon, Nov 04, 2019 at 12:09:05PM -0800, John Hubbard wrote: > Note for Jason: the (a) or (b) items are talking about the vfio case, which is > one of the two call sites that now use pin_longterm_pages_remote(), and the > other one is infiniband: > > drivers/infiniband/core/umem_odp.c:646:

Re: [PATCH v2 07/18] infiniband: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-04 Thread Jason Gunthorpe
On Sun, Nov 03, 2019 at 01:18:02PM -0800, John Hubbard wrote: > Convert infiniband to use the new wrapper calls, and stop > explicitly setting FOLL_LONGTERM at the call sites. > > The new pin_longterm_*() calls replace get_user_pages*() > calls, and set both FOLL_LONGTERM and a new FOLL_PIN > flag

Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-04 Thread Jason Gunthorpe
On Mon, Nov 04, 2019 at 03:31:53PM -0500, Jerome Glisse wrote: > > Note for Jason: the (a) or (b) items are talking about the vfio case, which > > is > > one of the two call sites that now use pin_longterm_pages_remote(), and the > > other one is infiniband: > > > > drivers/infiniband/core/umem_o

Re: [PATCH v2 07/18] infiniband: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-04 Thread Jason Gunthorpe
On Mon, Nov 04, 2019 at 12:48:13PM -0800, John Hubbard wrote: > On 11/4/19 12:33 PM, Jason Gunthorpe wrote: > ... > >> diff --git a/drivers/infiniband/core/umem.c > >> b/drivers/infiniband/core/umem.c > >> index 24244a2f68cc..c5a78d3e674b 100644 > >

Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-04 Thread Jason Gunthorpe
On Mon, Nov 04, 2019 at 12:57:59PM -0800, John Hubbard wrote: > On 11/4/19 12:37 PM, Jason Gunthorpe wrote: > > On Mon, Nov 04, 2019 at 03:31:53PM -0500, Jerome Glisse wrote: > >>> Note for Jason: the (a) or (b) items are talking about the vfio case, > >>> which i

Re: [PATCH v2 07/18] infiniband: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-04 Thread Jason Gunthorpe
On Mon, Nov 04, 2019 at 02:03:43PM -0800, John Hubbard wrote: > On 11/4/19 12:57 PM, Jason Gunthorpe wrote: > > On Mon, Nov 04, 2019 at 12:48:13PM -0800, John Hubbard wrote: > >> On 11/4/19 12:33 PM, Jason Gunthorpe wrote: > >> ... > >>>> diff --git

Re: [PATCH v3 00/23] mm/gup: track dma-pinned pages: FOLL_PIN, FOLL_LONGTERM

2019-11-12 Thread Jason Gunthorpe
On Mon, Nov 11, 2019 at 04:06:37PM -0800, John Hubbard wrote: > Hi, > > The cover letter is long, so the more important stuff is first: > > * Jason, if you or someone could look at the the VFIO cleanup (patch 8) > and conversion to FOLL_PIN (patch 18), to make sure it's use of > remote and lo

Re: [PATCH v3 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-12 Thread Jason Gunthorpe
gt; to take advantage of this, fixing a bug as a result: the VFIO caller > is logically a FOLL_LONGTERM user. > > Thanks to Jason Gunthorpe for pointing out a clean way to fix this. > > Suggested-by: Jason Gunthorpe > Cc: Jerome Glisse > Cc: Ira Weiny > Signed-

Re: [PATCH v3 11/23] IB/{core,hw,umem}: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-12 Thread Jason Gunthorpe
On Mon, Nov 11, 2019 at 04:06:48PM -0800, John Hubbard wrote: > @@ -542,7 +541,7 @@ static int ib_umem_odp_map_dma_single_page( > } > > out: > - put_user_page(page); > + put_page(page); > > if (remove_existing_mapping) { > ib_umem_notifier_start_account(umem_o

Re: [PATCH v3 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-12 Thread Jason Gunthorpe
On Tue, Nov 12, 2019 at 02:45:51PM -0800, Dan Williams wrote: > On Tue, Nov 12, 2019 at 2:43 PM John Hubbard wrote: > > > > On 11/12/19 12:43 PM, Jason Gunthorpe wrote: > > ... > > >> -} > > >> +ret = get_user_pages_remote(NULL

Re: [PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-13 Thread Jason Gunthorpe
, which in turn > calls check_dax_vmas(). It's lightly explained in the comments as well. > > Thanks to Jason Gunthorpe for pointing out a clean way to fix this, > and to Dan Williams for helping clarify the DAX refactoring. > > Suggested-by: Jason Gunthorpe > Cc: Dan Will

Re: [PATCH v5 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-15 Thread Jason Gunthorpe
, which in turn > calls check_dax_vmas(). It's lightly explained in the comments as well. > > Thanks to Jason Gunthorpe for pointing out a clean way to fix this, > and to Dan Williams for helping clarify the DAX refactoring. > > Suggested-by: Jason Gunthorpe > Cc: Dan Willi

Re: [PATCH v5 12/24] IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP

2019-11-15 Thread Jason Gunthorpe
2 +- > 8 files changed, 13 insertions(+), 14 deletions(-) Ok Reviewed-by: Jason Gunthorpe Jason

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-21 Thread Jason Gunthorpe
locked(), which takes the mmap_sem as needed. > > > > Reviewed-by: Jan Kara > > Reviewed-by: Jason Gunthorpe > > Reviewed-by: Ira Weiny > > Signed-off-by: John Hubbard > > Looks fine, > > Reviewed-by: Christoph Hellwig > > Jason, can you que

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-24 Thread Jason Gunthorpe
return -EINVAL; While we think this WARN_ON is probably bogus, resolving this will have to wait. Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/umem.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/umem.c b/dri

Regression from patch 'tty: hvc: hvc_poll() break hv read loop'

2018-09-04 Thread Jason Gunthorpe
Hi Nicholas, I am testing 4.19-rc2 and I see bad behavior with my qemu hvc0 console.. Running interactive with qemu (qemu-2.11.2-1.fc28) on the console providing hvc0, using options like: -nographic -chardev stdio,id=stdio,mux=on,signal=off -mon chardev=stdio -dev

Re: Regression from patch 'tty: hvc: hvc_poll() break hv read loop'

2018-09-04 Thread Jason Gunthorpe
On Wed, Sep 05, 2018 at 07:15:29AM +1000, Nicholas Piggin wrote: > On Tue, 4 Sep 2018 11:48:08 -0600 > Jason Gunthorpe wrote: > > > Hi Nicholas, > > > > I am testing 4.19-rc2 and I see bad behavior with my qemu hvc0 > > console.. > > > > Running

Re: [PATCH 0/3] tty: hvc: latency break regression fixes

2018-09-05 Thread Jason Gunthorpe
th another. > > I think those went upstream via Michael's tree, but he's away > at the moment so if you would be able to consider them for > the tty tree that would be appreciated. Series works for me too, thanks. Tested-by: Jason Gunthorpe Jason

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Jason Gunthorpe
atic const struct file_operations uverbs_mmap_fops = { > .release = ib_uverbs_close, > .llseek = no_llseek, > .unlocked_ioctl = ib_uverbs_ioctl, > - .compat_ioctl = ib_uverbs_ioctl, > + .compat_ioctl = generic_compat_ioctl_ptrarg, > }; > > static struct ib_client uverbs_client = { For uverbs: Acked-by: Jason Gunthorpe It is very strange, this patch did not appear in the RDMA patchworks, I almost missed it :| Jason

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-18 Thread Jason Gunthorpe
On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > Acked-by: Darren Hart (VMware) > > > > > > As for a longer term solution, would it be possible to in

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Jason Gunthorpe
On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > >

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
tions(-) Reviewed-by: Jason Gunthorpe

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: > This will allow sparc64 to override its ADI tags for > get_user_pages and get_user_pages_fast. > > Signed-off-by: Christoph Hellwig > mm/gup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/gup

Re: [PATCH 02/16] mm: simplify gup_fast_permitted

2019-06-21 Thread Jason Gunthorpe
> --- > arch/s390/include/asm/pgtable.h | 8 +--- > arch/x86/include/asm/pgtable_64.h | 8 +--- > mm/gup.c | 17 +++-- > 3 files changed, 9 insertions(+), 24 deletions(-) Much cleaner Reviewed-by: Jason Gunthorpe Jason

Re: [PATCH 03/16] mm: lift the x86_32 PAE version of gup_get_pte to common code

2019-06-21 Thread Jason Gunthorpe
| 51 --- > 5 files changed, 52 insertions(+), 52 deletions(-) Yep, the sh and mips conversions look right too. Reviewed-by: Jason Gunthorpe > diff --git a/mm/Kconfig b/mm/Kconfig > index f0c76ba47695..fe51f104a9e0 100644 > --- a/mm/Kconfig > +++ b/mm/Kc

Re: [PATCH 04/16] MIPS: use the generic get_user_pages_fast code

2019-06-21 Thread Jason Gunthorpe
(!cpu_has_dc_aliases) > + Today this check is only being done on the get_user_pages_fast() - after this patch it is also done for __get_user_pages_fast(). Which means __get_user_pages_fast is now non-functional on a range of MIPS CPUs, but that seems OK as far as I can tell, so: Reviewed-by: Jas

Re: [PATCH 10/16] mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:56PM +0200, Christoph Hellwig wrote: > We only support the generic GUP now, so rename the config option to > be more clear, and always use the mm/Kconfig definition of the > symbol and select it from the arch Kconfigs. Looks OK to me Reviewed-by: Jason

Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:57PM +0200, Christoph Hellwig wrote: > @@ -2168,7 +2221,7 @@ static void gup_pgd_range(unsigned long addr, unsigned > long end, > */ > static bool gup_fast_permitted(unsigned long start, unsigned long end) > { > - return true; > + return IS_ENABLED(CONFIG_

Re: switch the remaining architectures to use generic GUP v3

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:46PM +0200, Christoph Hellwig wrote: > Hi Linus and maintainers, > > below is a series to switch mips, sh and sparc64 to use the generic > GUP code so that we only have one codebase to touch for further > improvements to this code. I don't have hardware for any of th

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
On Fri, Jun 21, 2019 at 09:35:11AM -0600, Khalid Aziz wrote: > On 6/21/19 7:39 AM, Jason Gunthorpe wrote: > > On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: > >> This will allow sparc64 to override its ADI tags for > >> get_user_pages and get_user_p

Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-25 Thread Jason Gunthorpe
On Tue, Jun 25, 2019 at 09:56:50AM +0200, Christoph Hellwig wrote: > On Fri, Jun 21, 2019 at 11:41:31AM -0300, Jason Gunthorpe wrote: > > > static bool gup_fast_permitted(unsigned long start, unsigned long end) > > > { > > > - return true; > > > + return

Re: [PATCH v2] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-08 Thread Jason Gunthorpe
On Mon, Jul 08, 2019 at 06:24:04PM -0400, Mimi Zohar wrote: > Hi Jarkko, > > On Mon, 2019-07-08 at 18:11 +0300, Jarkko Sakkinen wrote: > > On Sat, 2019-07-06 at 20:18 -0400, Nayna Jain wrote: > > > +/* > > > + * tpm_get_pcr_allocation() - initialize the chip allocated banks for > > > PCRs > > > +

Re: [PATCH v5 1/7] kvmppc: HMM backend driver to manage pages of secure guest

2019-07-10 Thread Jason Gunthorpe
On Tue, Jul 09, 2019 at 01:55:28PM -0500, janani wrote: > > +int kvmppc_hmm_init(void) > > +{ > > + int ret = 0; > > + unsigned long size; > > + > > + size = kvmppc_get_secmem_size(); > > + if (!size) { > > + ret = -ENODEV; > > + goto out; > > + } > > + > > + kvmppc

Re: [PATCH v5 7/7] KVM: PPC: Ultravisor: Add PPC_UV config option

2019-07-10 Thread Jason Gunthorpe
On Wed, Jul 10, 2019 at 08:24:56AM -0500, janani wrote: > On 2019-07-09 05:25, Bharata B Rao wrote: > > From: Anshuman Khandual > > > > CONFIG_PPC_UV adds support for ultravisor. > > > > Signed-off-by: Anshuman Khandual > > Signed-off-by: Bharata B Rao > > Signed-off-by: Ram Pai > > [ Update

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2019-01-05 Thread Jason Gunthorpe
On Fri, Jan 04, 2019 at 02:44:01PM +1100, David Gibson wrote: > On Thu, Dec 06, 2018 at 08:45:09AM +0200, Leon Romanovsky wrote: > > On Thu, Dec 06, 2018 at 03:19:51PM +1100, David Gibson wrote: > > > Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when > > > unbound from their re

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2019-01-07 Thread Jason Gunthorpe
On Sun, Jan 06, 2019 at 09:43:46AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2019-01-05 at 10:51 -0700, Jason Gunthorpe wrote: > > > > > Interesting. I've investigated this further, though I don't have as > > > many new clues as I'd like. The prob

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2019-01-09 Thread Jason Gunthorpe
On Wed, Jan 09, 2019 at 04:09:02PM +1100, Benjamin Herrenschmidt wrote: > > POWER 8 firmware is good? If the link does eventually come back, is > > the POWER8's D3 resumption timeout long enough? > > > > If this doesn't lead to an obvious conclusion you'll probably need to > > connect to IBM's Me

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 05:44:32PM -0500, Daniel Jordan wrote: > Hi, > > This series converts users that account pinned pages with locked_vm to > account with pinned_vm instead, pinned_vm being the correct counter to > use. It's based on a similar patch I posted recently[0]. > > The patches are

Re: [PATCH 1/5] vfio/type1: use pinned_vm instead of locked_vm to account pinned pages

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 05:44:33PM -0500, Daniel Jordan wrote: > Beginning with bc3e53f682d9 ("mm: distinguish between mlocked and pinned > pages"), locked and pinned pages are accounted separately. Type1 > accounts pinned pages to locked_vm; use pinned_vm instead. > > pinned_vm recently became a

Re: [PATCH 1/5] vfio/type1: use pinned_vm instead of locked_vm to account pinned pages

2019-02-13 Thread Jason Gunthorpe
On Wed, Feb 13, 2019 at 01:03:30PM -0700, Alex Williamson wrote: > > PeterZ posted an RFC that addresses this point[1]. It kept pinned_vm and > > locked_vm accounting separate, but allowed the two to be added safely to be > > compared against RLIMIT_MEMLOCK. > > Unless I'm incorrect in the concer

Re: [PATCH V2 3/7] mm/gup: Change GUP fast to use flags rather than a write 'bool'

2019-02-13 Thread Jason Gunthorpe
On Wed, Feb 13, 2019 at 03:04:51PM -0800, ira.we...@intel.com wrote: > From: Ira Weiny > > To facilitate additional options to get_user_pages_fast() change the > singular write parameter to be gup_flags. So now we have: long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-13 Thread Jason Gunthorpe
On Wed, Feb 13, 2019 at 05:53:14PM -0800, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 03:54:47PM -0700, Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 05:44:32PM -0500, Daniel Jordan wrote: > > > > > All five of these places, and probably some of Davidlohr's conver

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Jason Gunthorpe
On Thu, Feb 14, 2019 at 11:33:53AM -0800, Ira Weiny wrote: > > I think it had to do with double accounting pinned and mlocked pages > > and thus delivering a lower than expected limit to userspace. > > > > vfio has this bug, RDMA does not. RDMA has a bug where it can > > overallocate locked memor

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Jason Gunthorpe
On Thu, Feb 14, 2019 at 01:46:51PM -0800, Ira Weiny wrote: > > > > Really unclear how to fix this. The pinned/locked split with two > > > > buckets may be the right way. > > > > > > Are you suggesting that we have 2 user limits? > > > > This is what RDMA has done since CL's patch. > > I don't u

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-19 Thread Jason Gunthorpe
On Thu, Dec 19, 2019 at 12:30:31PM -0800, John Hubbard wrote: > On 12/19/19 5:26 AM, Leon Romanovsky wrote: > > On Mon, Dec 16, 2019 at 02:25:12PM -0800, John Hubbard wrote: > > > Hi, > > > > > > This implements an API naming change (put_user_page*() --> > > > unpin_user_page*()), and also impleme

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-20 Thread Jason Gunthorpe
On Thu, Dec 19, 2019 at 01:13:54PM -0800, John Hubbard wrote: > On 12/19/19 1:07 PM, Jason Gunthorpe wrote: > > On Thu, Dec 19, 2019 at 12:30:31PM -0800, John Hubbard wrote: > > > On 12/19/19 5:26 AM, Leon Romanovsky wrote: > > > > On Mon, Dec 16, 2019 at 02:25:

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-23 Thread Jason Gunthorpe
On Fri, Dec 20, 2019 at 04:32:13PM -0800, Dan Williams wrote: > > > There's already a limit, it's just a much larger one. :) What does "no > > > limit" > > > really mean, numerically, to you in this case? > > > > I guess I mean 'hidden limit' - hitting the limit and failing would > > be managable

[PATCH] PPC: Do not make the entire heap executable

2012-09-30 Thread Jason Gunthorpe
RW BSS sections, which is not the case for PPC. Teach the ELF loader to check the X bit in the relevant load header and create 0 filled anonymous mappings that are executable if the load header requests that. Signed-off-by: Jason Gunthorpe --- arch/powerpc/include/asm/page.h| 10

[PATCH] PPC: Correct the tophys/tovirt macros

2012-09-30 Thread Jason Gunthorpe
asm/page.h discusses the calculation for v2p and p2v, it should be: va = pa + KERNELBASE - PHYSICAL_START which is the same as: va = pa + LOAD_OFFSET tophys/tovirt were using PAGE_OFFSET, which as page.h says, is almost always the same thing. Signed-off-by: Jason Gunthorpe --- arch/powerpc

[PATCH] PPC: Enable the Watchdog vector for 405

2012-09-30 Thread Jason Gunthorpe
Move the body of the PIT exception out of line to make room. Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/head_40x.S | 26 +- arch/powerpc/kernel/traps.c|2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel

Re: [PATCH] PPC: Enable the Watchdog vector for 405

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 08:16:29AM -0400, Josh Boyer wrote: > On Sun, Sep 30, 2012 at 7:27 PM, Jason Gunthorpe > wrote: > > Move the body of the PIT exception out of line to make room. > > What boards did you test this on? What driver are you using for the > watchdog? T

Re: [PATCH] PPC: Enable the Watchdog vector for 405

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 01:32:47PM -0400, Josh Boyer wrote: > On Mon, Oct 1, 2012 at 12:25 PM, Jason Gunthorpe > >> Please leave this wrapped in CONFIG_BOOKE_WDT. I don't agree with > >> unconditionally enabling this for every 405 chip out there. > > > > Wha

Re: [PATCH] PPC: Correct the tophys/tovirt macros

2012-10-04 Thread Jason Gunthorpe
On Thu, Oct 04, 2012 at 09:19:04PM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2012-09-30 at 17:28 -0600, Jason Gunthorpe wrote: > > asm/page.h discusses the calculation for v2p and p2v, it should be: > > va = pa + KERNELBASE - PHYSICAL_START > > which is the

RE: [PATCH v2] PPC: Do not make the entire heap executable

2012-10-04 Thread Jason Gunthorpe
RW BSS sections, which is not the case for PPC. Teach the ELF loader to check the X bit in the relevant load header and create 0 filled anonymous mappings that are executable if the load header requests that. Signed-off-by: Jason Gunthorpe --- arch/powerpc/include/asm/page.h| 10

Re: [PATCHv2] PPC: Enable the Watchdog vector for 405

2012-10-05 Thread Jason Gunthorpe
s for them. Tested that the WDT vector works on a 405F6 core. Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/head_40x.S | 47 --- arch/powerpc/kernel/traps.c|2 +- 2 files changed, 30 insertions(+), 19 deletions(-) Changes in v2: - Move all

[PATCH] TPM: Provide a tpm_tis OF driver

2010-03-09 Thread Jason Gunthorpe
This provides an open firwmare driver binding for tpm_tis. OF is useful on arches where PNP is not used. Allow the tpm_tis driver to be selected if PNP or OF are compiled in. Tested on a PPC405 with a winbond LPC TPM. Signed-off-by: Jason Gunthorpe --- drivers/char/tpm/Kconfig |2

[PATCH] PPC32: Fixup pmd_page to work when ARCH_PFN_OFFSET is non-zero

2010-03-09 Thread Jason Gunthorpe
Instead of referencing mem_map directly, use pfn_to_page. Otherwise the kernel crashes when trying to start userspace if ARCH_PFN_OFFSET is non-zero and CONFIG_BOOKE is not defined Signed-off-by: Jason Gunthorpe --- arch/powerpc/include/asm/pgtable-ppc32.h |2 +- 1 files changed, 1

[PATCH] PPC: Skip over OF_DT_NOP when unflattening the device tree

2010-03-09 Thread Jason Gunthorpe
NOPs within the property section are skipped, but NOPs between OF_DT_END_NODE and OF_DT_BEGIN_NODE were not. My firmware NOPs out entire nodes depending on various environment parameters. of_scan_flat_dt already handles NOP more generally.. Signed-off-by: Jason Gunthorpe --- arch/powerpc

Re: [PATCH] PPC: Skip over OF_DT_NOP when unflattening the device tree

2010-03-18 Thread Jason Gunthorpe
On Fri, Mar 19, 2010 at 04:50:38PM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2010-03-09 at 12:30 -0700, Jason Gunthorpe wrote: > > NOPs within the property section are skipped, but NOPs between > > OF_DT_END_NODE and OF_DT_BEGIN_NODE were not. My firmware NOPs out > > e

Re: [tpmdd-devel] [PATCH] TPM: Provide a tpm_tis OF driver

2010-03-24 Thread Jason Gunthorpe
On Thu, Mar 25, 2010 at 01:20:41AM -0300, Rajiv Andrade wrote: > Why not > > +#ifdef CONFIG_OF > + return of_register_platform_driver(&tis_of_driver); > +#elif CONFIG_PNP > + return pnp_register_driver(&tis_pnp_driver); > +#endif > > ? AFAIK they are not exclusive options? I can't imag

Re: [PATCH v9 2/8] KVM: PPC: Move pages between normal and secure memory

2019-09-25 Thread Jason Gunthorpe
On Wed, Sep 25, 2019 at 10:36:43AM +0530, Bharata B Rao wrote: > Manage migration of pages betwen normal and secure memory of secure > guest by implementing H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. > > H_SVM_PAGE_IN: Move the content of a normal page to secure page > H_SVM_PAGE_OUT: Move the conte

Re: [PATCH v9 0/8] KVM: PPC: Driver to manage pages of secure guest

2019-09-25 Thread Jason Gunthorpe
On Wed, Sep 25, 2019 at 10:36:41AM +0530, Bharata B Rao wrote: > [The main change in this version is the introduction of new > locking to prevent concurrent page-in and page-out calls. More > details about this are present in patch 2/8] > > Hi, > > A pseries guest can be run as a secure guest on

[PATCH v8 05/24] iommu/fsl_pamu: Implement a PLATFORM domain

2023-09-13 Thread Jason Gunthorpe
Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/fsl_pamu_domain.c | 41 ++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index 4ac0e247ec2b51..e9d2bff4659b7c 100644 --- a

[PATCH v8 03/24] powerpc/iommu: Setup a default domain and remove set_platform_dma_ops

2023-09-13 Thread Jason Gunthorpe
BLOCKED domain an alias for it. BLOCKED is required for VFIO. Also removes the leaky allocation of the BLOCKED domain by using a global static. Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/iommu.c | 38

[PATCH v8 07/24] iommu/mtk_iommu_v1: Implement an IDENTITY domain

2023-09-13 Thread Jason Gunthorpe
-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/mtk_iommu_v1.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 8a0a5e5d049f4a..cc3e7d53d33ad9 100644 --- a/dri

[PATCH v8 02/24] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-09-13 Thread Jason Gunthorpe
ws the driver to trivially force any single domain as the default domain. Update iommufd selftest to use this instead of set_platform_dma_ops Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c| 13 + drivers/

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

2023-09-13 Thread Jason Gunthorpe
sted-by: Steven Price Tested-by: Marek Szyprowski Tested-by: Nicolin Chen Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/iommu.c

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

2023-09-13 Thread Jason Gunthorpe
it is fine to support dma-iommu.c Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/omap-iommu.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iomm

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

2023-09-13 Thread Jason Gunthorpe
: Jason Gunthorpe --- drivers/iommu/iommu.c | 59 +-- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index cfb597751f5bad..38856d542afc35 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu

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

2023-09-13 Thread Jason Gunthorpe
thus hook it back up the same was as the old ops->detach_dev(). Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/sun50i-iommu.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/sun50i-iommu.c b/driv

[PATCH v8 01/24] iommu: Add iommu_ops->identity_domain

2023-09-13 Thread Jason Gunthorpe
Tested-by: Nicolin Chen Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c| 6 +- drivers/iommu/iommufd/selftest.c | 5 - drivers/iommu/rockchip-iommu.c | 9 + include/linux/iommu.h| 3 +++ 4 files

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

2023-09-13 Thread Jason Gunthorpe
is fine to support dma-iommu.c Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/msm_iommu.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c in

[PATCH v8 04/24] iommu: Add IOMMU_DOMAIN_PLATFORM for S390

2023-09-13 Thread Jason Gunthorpe
VFIO). This is the same time the original design would have called op->detach_dev(). This is temporary until the S390 dma-iommu.c conversion is merged. Tested-by: Heiko Stuebner Tested-by: Niklas Schnelle Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe ---

[PATCH v8 06/24] iommu/tegra-gart: Remove tegra-gart

2023-09-13 Thread Jason Gunthorpe
hed * It doesn't clear the HW of maps once the domain is detached (made worse by having the wrong groups) Cc: Thierry Reding Cc: Dmitry Osipenko Acked-by: Thierry Reding Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- arch/arm/configs/mult

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

2023-09-13 Thread Jason Gunthorpe
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 Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/arm/arm-smmu/qcom

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

2023-09-13 Thread Jason Gunthorpe
e ops->def_domain_type() to return IOMMU_DOMAIN_IDENTITY for only the quirky devices. Add support for IOMMU_DOMAIN_DMA and force IOMMU_DOMAIN_IDENTITY mode for everything so no behavior changes. Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/tegra-smmu.c | 2 +-

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

2023-09-13 Thread Jason Gunthorpe
ted-by: Nicolin Chen Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c | 21 - drivers/iommu/mtk_iommu_v1.c | 12 drivers/iommu/rockchip-iommu.c | 10 -- 3 files changed, 20 insertions(

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

2023-09-13 Thread Jason Gunthorpe
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 Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe --- driv

[PATCH v8 00/24] iommu: Make default_domain's mandatory

2023-09-13 Thread Jason Gunthorpe
the gdev from the group alloc path, instead add a new function __iommu_group_domain_alloc() that takes in the group and uses the first device. Split this to its own patch - New patch to make iommufd's mock selftest into a real driver - New patch to fix power's partial iommu driver v

  1   2   3   4   5   6   >