[PATCH] vfio/pci: Revert nvlink removal uAPI breakage

2021-05-04 Thread Alex Williamson
Revert the uAPI changes from the below commit with notice that these regions and capabilities are no longer provided. Fixes: b392a1989170 ("vfio/pci: remove vfio_pci_nvlink2") Reported-by: Greg Kurz Signed-off-by: Alex Williamson --- Greg (Kurz), please double check this resolves

Re: [PATCH kernel v2] vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU

2020-12-03 Thread Alex Williamson
On Sun, 22 Nov 2020 18:39:50 +1100 Alexey Kardashevskiy wrote: > We execute certain NPU2 setup code (such as mapping an LPID to a device > in NPU2) unconditionally if an Nvlink bridge is detected. However this > cannot succeed on POWER8NVL machines as the init helpers return an error > other than

Re: [PATCH kernel v3] powerpc/powernv: Isolate NVLinks between GV100GL on Witherspoon

2019-04-30 Thread Alex Williamson
On Tue, 30 Apr 2019 16:14:35 +1000 Alexey Kardashevskiy wrote: > On 30/04/2019 15:45, Alistair Popple wrote: > > Alexey, > > > > +void pnv_try_isolate_nvidia_v100(struct pci_dev *bridge) > > +{ > > + u32 mask, val; > > + void __iomem *bar0_0, *bar0_12, *bar0_a00

Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak

2019-05-06 Thread Alex Williamson
On Fri, 19 Apr 2019 17:37:17 +0200 Greg Kurz wrote: > If vfio_pci_register_dev_region() fails then we should rollback > previous changes, ie. unmap the ATSD registers. > > Signed-off-by: Greg Kurz > --- Applied to vfio next branch for v5.2 with Alexey's R-b. Thanks! Alex > drivers/vfio/pci

Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak

2019-05-07 Thread Alex Williamson
On Tue, 7 May 2019 09:01:45 +0200 Greg Kurz wrote: > On Tue, 7 May 2019 11:52:44 +1000 > Sam Bobroff wrote: > > > On Mon, May 06, 2019 at 03:58:45PM -0600, Alex Williamson wrote: > > > On Fri, 19 Apr 2019 17:37:17 +0200 > > > Greg K

Re: [PATCH v2] mm: add account_locked_vm utility function

2019-05-29 Thread Alex Williamson
On Tue, 28 May 2019 11:04:24 -0400 Daniel Jordan wrote: > On Sat, May 25, 2019 at 02:51:18PM -0700, Andrew Morton wrote: > > On Fri, 24 May 2019 13:50:45 -0400 Daniel Jordan > > wrote: > > > > > locked_vm accounting is done roughly the same way in five places, so > > > unify them in a helper

Re: [PATCH v3] mm: add account_locked_vm utility function

2019-06-03 Thread Alex Williamson
the same, so user-visible behavior does too. The one > exception is that the -EPERM case in tce_account_locked_vm is removed > because Alexey has never seen it triggered. > > Signed-off-by: Daniel Jordan > Tested-by: Alexey Kardashevskiy > Cc: Alan Tull > Cc: Alex Williamson &g

Re: [PATCH kernel v8 00/10] powerpc/kvm/vfio: Enable in-kernel acceleration

2017-03-14 Thread Alex Williamson
On Tue, 14 Mar 2017 11:55:33 +1100 David Gibson wrote: > On Tue, Mar 14, 2017 at 11:54:03AM +1100, Alexey Kardashevskiy wrote: > > On 10/03/17 15:48, David Gibson wrote: > > > On Fri, Mar 10, 2017 at 02:53:27PM +1100, Alexey Kardashevskiy wrote: > > >> This is my current queue of patches to a

Re: [PATCH kernel v8 03/10] powerpc/iommu/vfio_spapr_tce: Cleanup iommu_table disposal

2017-03-14 Thread Alex Williamson
able_group > *table_group) > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > index cf3de91fbfe7..fbec7348a7e5 100644 > --- a/drivers/vfio/vfio_iommu_spapr_tce.c > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -680,7 +680,7 @@ static void tce_iommu_free_table(struct tce_container > *container, > unsigned long pages = tbl->it_allocated_size >> PAGE_SHIFT; > > tce_iommu_userspace_view_free(tbl, container->mm); > - tbl->it_ops->free(tbl); > + iommu_free_table(tbl, ""); > decrement_locked_vm(container->mm, pages); > } > Acked-by: Alex Williamson

Re: [PATCH kernel v8 04/10] powerpc/vfio_spapr_tce: Add reference counting to iommu_table

2017-03-14 Thread Alex Williamson
e(table_group); > } > diff --git a/arch/powerpc/platforms/pseries/vio.c > b/arch/powerpc/platforms/pseries/vio.c > index 720493932486..744d639da92c 100644 > --- a/arch/powerpc/platforms/pseries/vio.c > +++ b/arch/powerpc/platforms/pseries/vio.c > @@ -1318,7 +1318,7 @@ static void vio_dev_release(struct device *dev) > struct iommu_table *tbl = get_iommu_table_base(dev); > > if (tbl) > - iommu_free_table(tbl, of_node_full_name(dev->of_node)); > + iommu_table_put(tbl); > of_node_put(dev->of_node); > kfree(to_vio_dev(dev)); > } > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > index fbec7348a7e5..4f6ca9d80ead 100644 > --- a/drivers/vfio/vfio_iommu_spapr_tce.c > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -680,7 +680,7 @@ static void tce_iommu_free_table(struct tce_container > *container, > unsigned long pages = tbl->it_allocated_size >> PAGE_SHIFT; > > tce_iommu_userspace_view_free(tbl, container->mm); > - iommu_free_table(tbl, ""); > + iommu_table_put(tbl); > decrement_locked_vm(container->mm, pages); > } > Acked-by: Alex Williamson

Re: [PATCH kernel v8 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-14 Thread Alex Williamson
On Fri, 10 Mar 2017 14:53:37 +1100 Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user space and back. >

Re: [PATCH kernel v8 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-15 Thread Alex Williamson
On Wed, 15 Mar 2017 15:40:14 +1100 David Gibson wrote: > > > diff --git a/arch/powerpc/kvm/book3s_64_vio.c > > > b/arch/powerpc/kvm/book3s_64_vio.c > > > index e96a4590464c..be18cda01e1b 100644 > > > --- a/arch/powerpc/kvm/book3s_64_vio.c > > > +++ b/arch/powerpc/kvm/book3s_64_vio.c > > > @@ -28,

Re: [PATCH kernel v8 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-15 Thread Alex Williamson
On Thu, 16 Mar 2017 00:21:07 +1100 Alexey Kardashevskiy wrote: > On 15/03/17 08:05, Alex Williamson wrote: > > On Fri, 10 Mar 2017 14:53:37 +1100 > > Alexey Kardashevskiy wrote: > > > >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT

Re: [PATCH kernel v9 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-16 Thread Alex Williamson
On Thu, 16 Mar 2017 18:09:32 +1100 Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user space and back. >

Re: [PATCH kernel v10 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-21 Thread Alex Williamson
On Fri, 17 Mar 2017 16:09:59 +1100 Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user space and back. >

Re: [PATCH kernel v11 04/10] powerpc/vfio_spapr_tce: Add reference counting to iommu_table

2017-03-24 Thread Alex Williamson
/arch/powerpc/platforms/pseries/vio.c > b/arch/powerpc/platforms/pseries/vio.c > index 720493932486..28b09fd797ec 100644 > --- a/arch/powerpc/platforms/pseries/vio.c > +++ b/arch/powerpc/platforms/pseries/vio.c > @@ -1318,7 +1318,7 @@ static void vio_dev_release(struct device *dev) > struct iommu_table *tbl = get_iommu_table_base(dev); > > if (tbl) > - iommu_free_table(tbl, of_node_full_name(dev->of_node)); > + iommu_tce_table_put(tbl); > of_node_put(dev->of_node); > kfree(to_vio_dev(dev)); > } > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > index fbec7348a7e5..8031d3a55a17 100644 > --- a/drivers/vfio/vfio_iommu_spapr_tce.c > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -680,7 +680,7 @@ static void tce_iommu_free_table(struct tce_container > *container, > unsigned long pages = tbl->it_allocated_size >> PAGE_SHIFT; > > tce_iommu_userspace_view_free(tbl, container->mm); > - iommu_free_table(tbl, ""); > + iommu_tce_table_put(tbl); > decrement_locked_vm(container->mm, pages); > } > Acked-by: Alex Williamson

Re: [PATCH kernel v11 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-03-24 Thread Alex Williamson
if (group_id < 0) > + return NULL; > + > + return iommu_group_get_by_id(group_id); > +} > + > +static void kvm_spapr_tce_release_vfio_group(struct kvm *kvm, > + struct vfio_group *vfio_group) > +{ > + struct iommu_group *grp = kvm_vfio_group_get_iommu_group(vfio_group); > + > + if (WARN_ON_ONCE(!grp)) > + return; > + > + kvm_spapr_tce_release_iommu_group(kvm, grp); > + iommu_group_put(grp); > +} > +#endif > + > /* > * Groups can use the same or different IOMMU domains. If the same then > * adding a new group may change the coherency of groups we've previously > @@ -211,6 +256,9 @@ static int kvm_vfio_set_group(struct kvm_device *dev, > long attr, u64 arg) > > mutex_unlock(&kv->lock); > > +#ifdef CONFIG_SPAPR_TCE_IOMMU > + kvm_spapr_tce_release_vfio_group(dev->kvm, vfio_group); > +#endif > kvm_vfio_group_set_kvm(vfio_group, NULL); > > kvm_vfio_group_put_external_user(vfio_group); > @@ -218,6 +266,57 @@ static int kvm_vfio_set_group(struct kvm_device *dev, > long attr, u64 arg) > kvm_vfio_update_coherency(dev); > > return ret; > + > +#ifdef CONFIG_SPAPR_TCE_IOMMU > + case KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: { > + struct kvm_vfio_spapr_tce param; > + struct kvm_vfio *kv = dev->private; > + struct vfio_group *vfio_group; > + struct kvm_vfio_group *kvg; > + struct fd f; > + struct iommu_group *grp; > + > + if (copy_from_user(¶m, (void __user *)arg, > + sizeof(struct kvm_vfio_spapr_tce))) > + return -EFAULT; > + > + f = fdget(param.groupfd); > + if (!f.file) > + return -EBADF; > + > + vfio_group = kvm_vfio_group_get_external_user(f.file); > + fdput(f); > + > + if (IS_ERR(vfio_group)) > + return PTR_ERR(vfio_group); > + > + grp = kvm_vfio_group_get_iommu_group(vfio_group); > + if (WARN_ON_ONCE(!grp)) { > + kvm_vfio_group_put_external_user(vfio_group); > + return -EIO; > + } > + > + ret = -ENOENT; > + > + mutex_lock(&kv->lock); > + > + list_for_each_entry(kvg, &kv->group_list, node) { > + if (kvg->vfio_group != vfio_group) > + continue; > + > + ret = kvm_spapr_tce_attach_iommu_group(dev->kvm, > + param.tablefd, grp); > + break; > + } > + > + mutex_unlock(&kv->lock); > + > + iommu_group_put(grp); > + kvm_vfio_group_put_external_user(vfio_group); > + > + return ret; > + } > +#endif /* CONFIG_SPAPR_TCE_IOMMU */ > } > > return -ENXIO; > @@ -242,6 +341,9 @@ static int kvm_vfio_has_attr(struct kvm_device *dev, > switch (attr->attr) { > case KVM_DEV_VFIO_GROUP_ADD: > case KVM_DEV_VFIO_GROUP_DEL: > +#ifdef CONFIG_SPAPR_TCE_IOMMU > + case KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: > +#endif > return 0; > } > > @@ -257,6 +359,9 @@ static void kvm_vfio_destroy(struct kvm_device *dev) > struct kvm_vfio_group *kvg, *tmp; > > list_for_each_entry_safe(kvg, tmp, &kv->group_list, node) { > +#ifdef CONFIG_SPAPR_TCE_IOMMU > + kvm_spapr_tce_release_vfio_group(dev->kvm, kvg->vfio_group); > +#endif > kvm_vfio_group_set_kvm(kvg->vfio_group, NULL); > kvm_vfio_group_put_external_user(kvg->vfio_group); > list_del(&kvg->node); Acked-by: Alex Williamson

Re: [PATCH guest kernel] vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check

2017-03-24 Thread Alex Williamson
On Fri, 24 Mar 2017 17:44:06 +1100 Alexey Kardashevskiy wrote: > The existing SPAPR TCE driver advertises both VFIO_SPAPR_TCE_IOMMU and > VFIO_SPAPR_TCE_v2_IOMMU types to the userspace and the userspace usually > picks the v2. > > Normally the userspace would create a container, attach an IOMMU

Re: [PATCH guest kernel] vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check

2017-04-04 Thread Alex Williamson
On Tue, 4 Apr 2017 20:12:45 +1000 Alexey Kardashevskiy wrote: > On 25/03/17 23:25, Alexey Kardashevskiy wrote: > > On 25/03/17 07:29, Alex Williamson wrote: > >> On Fri, 24 Mar 2017 17:44:06 +1100 > >> Alexey Kardashevskiy wrote: > >> > >>&g

Re: [PATCH kernel 0/3 REPOST] vfio-pci: Add support for mmapping MSI-X table

2017-06-22 Thread Alex Williamson
On Thu, 15 Jun 2017 15:48:42 +1000 Alexey Kardashevskiy wrote: > Here is a patchset which Yongji was working on before > leaving IBM LTC. Since we still want to have this functionality > in the kernel (DPDK is the first user), here is a rebase > on the current upstream. > > > Current vfio-pci i

Re: [PATCH kernel 0/3 REPOST] vfio-pci: Add support for mmapping MSI-X table

2017-06-23 Thread Alex Williamson
On Fri, 23 Jun 2017 15:06:37 +1000 Alexey Kardashevskiy wrote: > On 23/06/17 07:11, Alex Williamson wrote: > > On Thu, 15 Jun 2017 15:48:42 +1000 > > Alexey Kardashevskiy wrote: > > > >> Here is a patchset which Yongji was working on before > >> leavi

Re: [PATCH kernel 0/3 REPOST] vfio-pci: Add support for mmapping MSI-X table

2017-06-29 Thread Alex Williamson
On Wed, 28 Jun 2017 17:27:32 +1000 Alexey Kardashevskiy wrote: > On 24/06/17 01:17, Alex Williamson wrote: > > On Fri, 23 Jun 2017 15:06:37 +1000 > > Alexey Kardashevskiy wrote: > > > >> On 23/06/17 07:11, Alex Williamson wrote: > >>> On Th

Re: [PATCH kernel v3] vfio/spapr: Add cond_resched() for huge updates

2017-09-29 Thread Alex Williamson
On Thu, 28 Sep 2017 19:16:12 +1000 Alexey Kardashevskiy wrote: > Clearing very big IOMMU tables can trigger soft lockups. This adds > cond_resched() to allow the scheduler to do context switching when > it decides to. > > Signed-off-by: Alexey Kardashevskiy > --- > > The testcase is POWER9 box

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-13 Thread Alex Williamson
On Fri, 13 Oct 2017 07:01:48 -0500 Steven Royer wrote: > On 2017-10-13 06:53, Steven Royer wrote: > > On 2017-10-12 22:34, Bjorn Helgaas wrote: > >> [+cc Alex, Bodong, Eli, Saeed] > >> > >> On Thu, Oct 12, 2017 at 02:59:23PM -0500, Bryant G. Ly wrote: > >>> On 10/12/17 1:29 PM, Bjorn Helgaas

Re: [PATCH kernel] vfio/spapr: Add trace points for map/unmap

2017-11-16 Thread Alex Williamson
On Tue, 14 Nov 2017 10:47:12 +1100 Alexey Kardashevskiy wrote: > On 27/10/17 14:00, Alexey Kardashevskiy wrote: > > This adds trace_map/trace_unmap tracepoints to spapr driver. Type1 already > > uses these via the IOMMU API (iommu_map/__iommu_unmap). > > > > Signed-off-by: Alexey Kardashevskiy

Re: [PATCH kernel] vfio/spapr: Add trace points for map/unmap

2017-11-29 Thread Alex Williamson
On Thu, 23 Nov 2017 15:13:37 +1100 Alexey Kardashevskiy wrote: > On 17/11/17 17:58, Alexey Kardashevskiy wrote: > > On 17/11/17 11:13, Alex Williamson wrote: > >> On Tue, 14 Nov 2017 10:47:12 +1100 > >> Alexey Kardashevskiy wrote: > >> > >>&g

Re: [PATCH kernel v7 5/7] vfio/spapr: Postpone default window creation

2016-12-01 Thread Alex Williamson
40 > +++++++-- > 1 file changed, 25 insertions(+), 15 deletions(-) Acked-by: Alex Williamson > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > index a67bbfd..88622be 100644 > --- a/drivers/vfio/vfio_iommu_sp

Re: [PATCH kernel v7 4/7] vfio/spapr: Add a helper to create default DMA window

2016-12-01 Thread Alex Williamson
s: > v6: > * new to the patchset > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 87 > ++--- > 1 file changed, 42 insertions(+), 45 deletions(-) Acked-by: Alex Williamson > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vf

Re: [PATCH kernel v7 3/7] vfio/spapr: Postpone allocation of userspace version of TCE table

2016-12-01 Thread Alex Williamson
seems to be a minor change. > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 20 +++----- > 1 file changed, 7 insertions(+), 13 deletions(-) Acked-by: Alex Williamson > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > index d0c38b2..4efd2b2

Re: [PATCH kernel v7 2/7] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-12-01 Thread Alex Williamson
+++- > drivers/vfio/vfio_iommu_spapr_tce.c| 14 --- > 3 files changed, 36 insertions(+), 40 deletions(-) Acked-by: Alex Williamson > diff --git a/arch/powerpc/include/asm/mmu_context.h > b/arch/powerpc/include/asm/mmu_context.h > index 424844b..b9e3

Re: [PATCH kernel v7 7/7] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-12-01 Thread Alex Williamson
> v2: > * updated commit log > --- > arch/powerpc/mm/mmu_context_book3s64.c | 4 +-- > arch/powerpc/mm/mmu_context_iommu.c| 11 -- > drivers/vfio/vfio_iommu_spapr_tce.c| 61 > +- > 3 files changed, 61 insertions(+), 15 deletions(-

Re: [PATCH kernel v7 6/7] vfio/spapr: Reference mm in tce_container

2016-12-01 Thread Alex Williamson
not referencing task > > v5: > * postpone referencing of mm > > v4: > * added check for container->mm!=current->mm in tce_iommu_ioctl() > for all ioctls and removed other redundand checks > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 160 > +++

Re: [PATCH kernel 9/9] KVM: PPC: Add in-kernel acceleration for VFIO

2016-12-08 Thread Alex Williamson
On Thu, 8 Dec 2016 19:19:56 +1100 Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user space and back. >

Re: [PATCH kernel 9/9] KVM: PPC: Add in-kernel acceleration for VFIO

2016-12-09 Thread Alex Williamson
On Fri, 9 Dec 2016 18:53:43 +1100 Alexey Kardashevskiy wrote: > On 09/12/16 04:55, Alex Williamson wrote: > > On Thu, 8 Dec 2016 19:19:56 +1100 > > Alexey Kardashevskiy wrote: > > > >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > >

Re: [PATCH kernel v2 10/11] vfio: Check for unregistered notifiers when group is actually released

2016-12-19 Thread Alex Williamson
On Mon, 19 Dec 2016 18:41:05 +0800 Jike Song wrote: > On 12/18/2016 09:28 AM, Alexey Kardashevskiy wrote: > > This moves a check for unregistered notifiers from fops release > > callback to the place where the group will actually be released. > > > > Signed-off-by: Alexey Kardashevskiy > > ---

Re: [PATCH kernel 9/9] KVM: PPC: Add in-kernel acceleration for VFIO

2016-12-19 Thread Alex Williamson
On Wed, 14 Dec 2016 14:53:13 +1100 Alexey Kardashevskiy wrote: > On 10/12/16 02:35, Alex Williamson wrote: > > On Fri, 9 Dec 2016 18:53:43 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 09/12/16 04:55, Alex Williamson wrote: > >>> On Th

Re: [PATCH kernel] vfio/spapr: Fix missing mutex unlock when creating a window

2017-02-01 Thread Alex Williamson
On Wed, 1 Feb 2017 14:26:16 +1100 Alexey Kardashevskiy wrote: > d9c728949ddc: "vfio/spapr: Postpone default window creation" added > an additional exit to the VFIO_IOMMU_SPAPR_TCE_CREATE case and made it > possible to return from tce_iommu_ioctl() without unlocking > container->lock; this fixes

Re: [PATCH] vfio: Fix build break when SPAPR_TCE_IOMMU=n

2017-02-02 Thread Alex Williamson
On Thu, 02 Feb 2017 20:50:48 +1100 Michael Ellerman wrote: > Michael Ellerman writes: > > > Currently the kconfig logic for VFIO_IOMMU_SPAPR_TCE and VFIO_SPAPR_EEH > > is broken when SPAPR_TCE_IOMMU=n. Leading to: > > > > warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct

Re: [PATCH kernel] vfio/spapr_tce: Set window when adding additional groups to container

2017-02-07 Thread Alex Williamson
create default DMA window") did not just simplify the code but also removed the set_window() calls in the case of attaching groups to a container which already has tables so it broke VFIO PCI hotplug. This reverts set_window() bits in tce_iommu_take_ownership_ddw(). Fi

Re: [PATCH] vfio: Fix build break when SPAPR_TCE_IOMMU=n

2016-11-07 Thread Alex Williamson
On Mon, 07 Nov 2016 19:34:42 +1100 Michael Ellerman wrote: > Paolo Bonzini writes: > > On 04/11/2016 06:48, Michael Ellerman wrote: > >> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig > >> index da6e2ce77495..6b51a4ebed8a 100644 > >> --- a/drivers/vfio/Kconfig > >> +++ b/drivers/vfio

Re: [PATCH] vfio: Fix build break when SPAPR_TCE_IOMMU=n

2016-11-07 Thread Alex Williamson
On Tue, 08 Nov 2016 10:49:35 +1100 Michael Ellerman wrote: > Alex Williamson writes: > > On Mon, 07 Nov 2016 19:34:42 +1100 > > Michael Ellerman wrote: > >> Paolo Bonzini writes: > >> > On 04/11/2016 06:48, Michael Ellerman wrote: > >> &

Re: [PATCH kernel v4 3/4] vfio/spapr: Reference mm in tce_container

2016-11-08 Thread Alex Williamson
On Mon, 24 Oct 2016 17:53:09 +1100 Alexey Kardashevskiy wrote: > In some situations the userspace memory context may live longer than > the userspace process itself so if we need to do proper memory context > cleanup, we better have tce_container take a reference to mm_struct and > use it later w

Re: [PATCH kernel v4 0/4] powerpc/spapr/vfio: Put pages on VFIO container shutdown

2016-11-08 Thread Alex Williamson
On Tue, 08 Nov 2016 18:54:28 +1100 Michael Ellerman wrote: > Alexey Kardashevskiy writes: > > These patches are to fix a bug when pages stay pinned hours > > after QEMU which requested pinning exited. > > > > Please comment. Thanks. > > > > Alexey Kardashevskiy (4): > > powerpc/iommu: Pass mm_

Re: [PATCH kernel v5 5/6] vfio/spapr: Reference mm in tce_container

2016-11-17 Thread Alex Williamson
On Thu, 17 Nov 2016 18:39:41 +1100 Alexey Kardashevskiy wrote: > On 11/11/16 23:32, Alexey Kardashevskiy wrote: > > In some situations the userspace memory context may live longer than > > the userspace process itself so if we need to do proper memory context > > cleanup, we better have tce_conta

Re: [PATCH kernel v4 01/11] vfio_pci: Test for extended capabilities if config space > 256 bytes

2016-04-29 Thread Alex Williamson
On Fri, 29 Apr 2016 18:55:14 +1000 Alexey Kardashevskiy wrote: > PCI-Express spec says that reading 4 bytes at offset 100h should return > zero if there is no extended capability so VFIO reads this dword to > know if there are extended capabilities. > > However it is not always possible to acces

Re: [PATCH kernel v4 02/11] vfio/spapr: Relax the IOMMU compatibility check

2016-04-29 Thread Alex Williamson
) { > pr_warn("tce_vfio: Group %d is incompatible with group > %d\n", > iommu_group_id(iommu_group), > iommu_group_id(tcegrp->grp)); Acked-by: Alex Williamson __

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-05 Thread Alex Williamson
On Thu, 5 May 2016 12:15:46 + "Tian, Kevin" wrote: > > From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com] > > Sent: Thursday, May 05, 2016 7:43 PM > > > > Hi David and Kevin, > > > > On 2016/5/5 17:54, David Laight wrote: > > > > > From: Tian, Kevin > > >> Sent: 05 May 2016 10:37 >

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-06 Thread Alex Williamson
On Fri, 6 May 2016 16:35:38 +1000 Alexey Kardashevskiy wrote: > On 05/06/2016 01:05 AM, Alex Williamson wrote: > > On Thu, 5 May 2016 12:15:46 + > > "Tian, Kevin" wrote: > > > >>> From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com] > >>&

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-11 Thread Alex Williamson
On Wed, 11 May 2016 06:29:06 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, May 05, 2016 11:05 PM > > > > On Thu, 5 May 2016 12:15:46 + > > "Tian, Kevin" wrote: > > &g

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-11 Thread Alex Williamson
On Thu, 12 May 2016 01:19:44 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 11, 2016 11:54 PM > > > > On Wed, 11 May 2016 06:29:06 + > > "Tian, Kevin" wrote: > &g

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-12 Thread Alex Williamson
On Thu, 12 May 2016 04:53:19 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, May 12, 2016 10:21 AM > > > > On Thu, 12 May 2016 01:19:44 + > > "Tian, Kevin" wrote: > &g

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-12 Thread Alex Williamson
On Fri, 13 May 2016 02:33:18 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, May 13, 2016 1:48 AM > > > > On Thu, 12 May 2016 04:53:19 + > > "Tian, Kevin" wrote: > &g

Re: [PATCH 5/5] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-05-13 Thread Alex Williamson
On Fri, 13 May 2016 06:50:25 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, May 13, 2016 1:33 PM > > > > > > > > As argued previously in this thread, there's nothing special about a

Re: [RESEND PATCH v2 0/6] vfio-pci: Add support for mmapping MSI-X table

2016-06-02 Thread Alex Williamson
AFAICT, you posted this *3* days ago, has something changed here or is this just expedited nagging for review? This also depends on a non-upstream series and crosses multiple functional areas, all of which make it difficult for maintainers to actually do anything with this series. Thanks, Alex

Re: [RFC 12/18] limits: track RLIMIT_MEMLOCK actual max

2016-06-13 Thread Alex Williamson
On Mon, 13 Jun 2016 22:44:19 +0300 Topi Miettinen wrote: > Track maximum size of locked memory, presented in /proc/self/limits. > > Signed-off-by: Topi Miettinen > --- > arch/ia64/kernel/perfmon.c | 1 + > arch/powerpc/kvm/book3s_64_vio.c | 1 + > arch/powerpc/mm/mm

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-08 Thread Alex Williamson
On Wed, 3 Aug 2016 18:40:55 +1000 Alexey Kardashevskiy wrote: > This exports helpers which are needed to keep a VFIO container in > memory while there are external users such as KVM. > > Signed-off-by: Alexey Kardashevskiy > --- > drivers/vfio/vfio.c | 30 +

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-09 Thread Alex Williamson
On Tue, 9 Aug 2016 15:19:39 +1000 Alexey Kardashevskiy wrote: > On 09/08/16 02:43, Alex Williamson wrote: > > On Wed, 3 Aug 2016 18:40:55 +1000 > > Alexey Kardashevskiy wrote: > > > >> This exports helpers which are needed to keep a VFIO container in > &

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-10 Thread Alex Williamson
On Wed, 10 Aug 2016 15:37:17 +1000 Alexey Kardashevskiy wrote: > On 09/08/16 22:16, Alex Williamson wrote: > > On Tue, 9 Aug 2016 15:19:39 +1000 > > Alexey Kardashevskiy wrote: > > > >> On 09/08/16 02:43, Alex Williamson wrote: > >>> On We

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-12 Thread Alex Williamson
On Fri, 12 Aug 2016 15:46:01 +1000 David Gibson wrote: > On Wed, Aug 10, 2016 at 10:46:30AM -0600, Alex Williamson wrote: > > On Wed, 10 Aug 2016 15:37:17 +1000 > > Alexey Kardashevskiy wrote: > > > > > On 09/08/16 22:16, Alex Williamson wrote: > > &

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-15 Thread Alex Williamson
On Mon, 15 Aug 2016 13:59:47 +1000 Paul Mackerras wrote: > On Tue, Aug 09, 2016 at 06:16:30AM -0600, Alex Williamson wrote: > > On Tue, 9 Aug 2016 15:19:39 +1000 > > Alexey Kardashevskiy wrote: > > > > > On 09/08/16 02:43, Alex Williamson wrote: > > >

Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH

2017-07-25 Thread Alex Williamson
[cc +Alexey, David] Any comments from the usual suspects for vfio/spapr? Thanks, Alex On Tue, 25 Jul 2017 10:56:38 -0300 Murilo Opsfelder Araújo wrote: > On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote: > > When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the > > followin

Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH

2017-07-26 Thread Alex Williamson
On Tue, 18 Jul 2017 14:22:20 -0300 Murilo Opsfelder Araujo wrote: > When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the > following: > > drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release': > vfio_pci.c:(.text+0xa98): undefined reference to > `.vfio_spapr_pci_ee

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-15 Thread Alex Williamson
On Mon, 14 Aug 2017 14:12:33 +0100 Robin Murphy wrote: > On 14/08/17 10:45, Alexey Kardashevskiy wrote: > > Folks, > > > > Is there anything to change besides those compiler errors and David's > > comment in 5/5? Or the while patchset is too bad? Thanks. > > While I now understand it's not th

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-16 Thread Alex Williamson
On Wed, 16 Aug 2017 10:35:49 +1000 Benjamin Herrenschmidt wrote: > On Tue, 2017-08-15 at 10:37 -0600, Alex Williamson wrote: > > Of course I don't think either of those are worth imposing a > > performance penalty where we don't otherwise need one. However, if we > &

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-17 Thread Alex Williamson
On Thu, 17 Aug 2017 10:56:35 + David Laight wrote: > From: Alex Williamson > > Sent: 16 August 2017 17:56 > ... > > Firmware pissing match... Processors running with 8k or less page size > > fall within the recommendations of the PCI spec for register alignment &g

Re: Raptor Engineering dedicating resources to KVM on PowerNV + KVM CI/CD

2025-01-07 Thread Alex Williamson
On Mon, 6 Jan 2025 13:47:50 -0600 Shawn Anastasio wrote: > Hi all, > > Just wanted to check in and let the community know that Raptor > Engineering will be officially dedicating development resources towards > maintaining, developing, and testing the existing Linux KVM facilities > for PowerNV m

Re: [PATCH] vfio: pci: Advertise INTx only if LINE is connected

2025-03-21 Thread Alex Williamson
On Thu, 20 Mar 2025 23:24:49 +0530 Shivaprasad G Bhat wrote: > On 3/18/25 11:28 PM, Alex Williamson wrote: > > On Tue, 18 Mar 2025 17:29:21 + > > Shivaprasad G Bhat wrote: > > > >> On POWER systems, when the device is behind the io expander, > &g

Re: [PATCH] vfio: pci: Advertise INTx only if LINE is connected

2025-03-18 Thread Alex Williamson
8aa3bf.alex.william...@redhat.com/ > > Signed-off-by: Shivaprasad G Bhat > Suggested-By: Alex Williamson > --- > drivers/vfio/pci/vfio_pci_core.c |4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/vfio/pci/vfio_pci_core.c > b/drivers/vfio/pci/vfio_

Re: [PATCH v4 08/13] crypto: s390/sha256 - implement library instead of shash

2025-05-29 Thread Alex Williamson
On Mon, 28 Apr 2025 10:00:33 -0700 Eric Biggers wrote: > From: Eric Biggers > > Instead of providing crypto_shash algorithms for the arch-optimized > SHA-256 code, instead implement the SHA-256 library. This is much > simpler, it makes the SHA-256 library functions be arch-optimized, and > it

<    1   2   3   4