Re: [PATCH v2 0/3] vfio/pci: ioeventfd support

2018-03-19 Thread Alexey Kardashevskiy
| 27 + > 4 files changed, 245 insertions(+), 20 deletions(-) > LGTM, I gave it a try to make sure 2/3 does not break and it does not in all combinations of le/be host <=> le/be guest but I did not try the actual feature - cannot make up a test quickly... Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> -- Alexey

Re: [RFC PATCH] vfio/pci: Add ioeventfd support

2018-02-07 Thread Alexey Kardashevskiy
On 08/02/18 01:12, Alex Williamson wrote: > On Wed, 7 Feb 2018 15:48:26 +1100 > Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > >> On 07/02/18 15:25, Alex Williamson wrote: >>> On Wed, 7 Feb 2018 15:09:22 +1100 >>> Alexey Kardashevskiy <a...@ozlabs

Re: [RFC PATCH] vfio/pci: Add ioeventfd support

2018-02-06 Thread Alexey Kardashevskiy
On 07/02/18 15:25, Alex Williamson wrote: > On Wed, 7 Feb 2018 15:09:22 +1100 > Alexey Kardashevskiy <a...@ozlabs.ru> wrote: >> On 07/02/18 11:08, Alex Williamson wrote: >>> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h >>> ind

Re: [RFC PATCH] vfio/pci: Add ioeventfd support

2018-02-06 Thread Alexey Kardashevskiy
On 07/02/18 11:08, Alex Williamson wrote: > The ioeventfd here is actually irqfd handling of an ioeventfd such as > supported in KVM. A user is able to pre-program a device write to > occur when the eventfd triggers. This is yet another instance of > eventfd-irqfd triggering between KVM and

Re: [PATCH -next] ipmi/powernv: Fix error return code in ipmi_powernv_probe()

2018-01-17 Thread Alexey Kardashevskiy
On 17/01/18 22:25, Wei Yongjun wrote: > Fix to return a negative error code from the request_irq() error > handling case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Reviewed-by: Alexey Kardashevsk

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-17 Thread Alexey Kardashevskiy
On 16/12/17 05:18, Bjorn Helgaas wrote: > [+cc Russell, Sinan, Herbert, Srikanth, Derek, Satanand, Felix, Raghu] > > On Fri, Dec 15, 2017 at 09:48:02AM -0600, Govinda Tatti wrote: >> On 12/13/2017 3:24 PM, Bjorn Helgaas wrote: >>> On Wed, Dec 13, 2017 at 02:46:57PM -0600, Govinda Tatti wrote: >

Re: [PATCH] vfio: Simplify capability helper

2017-12-12 Thread Alexey Kardashevskiy
helper to do is allocate sufficient > space in the caps buffer and chain this capability into the list. > Reduce it to that simple task. > > Signed-off-by: Alex Williamson <alex.william...@redhat.com> Makes more sense now, thanks. I'll repost mine on top of this. Rev

Re: [PATCH 2/3] powernv/pci: Use common code in pnv_ioda_pick_m64_pe()

2017-10-17 Thread Alexey Kardashevskiy
On 18/10/17 02:39, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 17 Oct 2017 17:07:54 +0200 > > Add a jump target so that a bit of code can be better reused > at the end of this function. Rather than moving bits around, I'd rather allocate pe_alloc

Re: [PATCH 3/3] powernv/pci: Improve a size determination in pnv_pci_init_ioda_phb()

2017-10-17 Thread Alexey Kardashevskiy
ct pnv_phb), 0); > + phb = memblock_virt_alloc(sizeof(*phb), 0); > > /* Allocate PCI controller */ > phb->hose = hose = pcibios_alloc_controller(np); > Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> -- Alexey

Re: [PATCH 1/3] powernv/pci: Delete an error message for a failed memory allocation in pnv_ioda_pick_m64_pe()

2017-10-17 Thread Alexey Kardashevskiy
e_alloc) > return NULL; > - } > > /* Figure out reserved PE numbers by the PE */ > pnv_ioda_reserve_m64_pe(bus, pe_alloc, all); > Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> -- Alexey

Re: [RESEND RFC PATCH 0/7] sun8i H3 HDMI glue driver for DW HDMI

2017-09-30 Thread Alexey Kardashevskiy
On 01/10/17 04:56, Jernej Škrabec wrote: > Hi, > > Dne sobota, 30. september 2017 ob 13:58:03 CEST je Alexey Kardashevskiy > napisal(a): >> On 21/09/17 06:01, Jernej Skrabec wrote: >>> [added media mailing list due to CEC question] >>> >>> This patch

Re: [RESEND RFC PATCH 0/7] sun8i H3 HDMI glue driver for DW HDMI

2017-09-30 Thread Alexey Kardashevskiy
On 21/09/17 06:01, Jernej Skrabec wrote: > [added media mailing list due to CEC question] > > This patch series adds a HDMI glue driver for Allwinner H3 SoC. For now, only > video and CEC functionality is supported. Audio needs more tweaks. > > Series is based on the H3 DE2 patch series

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

2017-09-10 Thread Alexey Kardashevskiy
On 29/08/17 12:58, Alexey Kardashevskiy wrote: > On 21/08/17 12:47, Alexey Kardashevskiy wrote: >> Folks, >> >> Ok, people did talk, exchanged ideas, lovely :) What happens now? Do I >> repost this or go back to PCI bus flags or something else? Thanks. > > >

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-30 Thread Alexey Kardashevskiy
On 31/08/17 05:02, Bjorn Helgaas wrote: > On Fri, Aug 11, 2017 at 06:19:33PM +1000, Alexey Kardashevskiy wrote: >> From: Gavin Shan <gws...@linux.vnet.ibm.com> >> >> The PowerNV platform is the only user of pcibios_sriov_disable(). >> The IOV BAR could be s

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

2017-08-28 Thread Alexey Kardashevskiy
On 21/08/17 12:47, Alexey Kardashevskiy wrote: > Folks, > > Ok, people did talk, exchanged ideas, lovely :) What happens now? Do I > repost this or go back to PCI bus flags or something else? Thanks. Anyone, any help? How do we proceed with this? Thanks. > > > > O

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-20 Thread Alexey Kardashevskiy
On 19/08/17 01:27, Bjorn Helgaas wrote: > On Fri, Aug 18, 2017 at 08:05:42AM +1000, Alexey Kardashevskiy wrote: >> On 11/08/17 18:19, Alexey Kardashevskiy wrote: >>> From: Gavin Shan <gws...@linux.vnet.ibm.com> >>> >>> The PowerNV platform is the only us

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

2017-08-20 Thread Alexey Kardashevskiy
Folks, Ok, people did talk, exchanged ideas, lovely :) What happens now? Do I repost this or go back to PCI bus flags or something else? Thanks. On 14/08/17 19:45, Alexey Kardashevskiy wrote: > Folks, > > Is there anything to change besides those compiler errors and David's > co

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-17 Thread Alexey Kardashevskiy
On 11/08/17 18:19, Alexey Kardashevskiy wrote: > From: Gavin Shan <gws...@linux.vnet.ibm.com> > > The PowerNV platform is the only user of pcibios_sriov_disable(). > The IOV BAR could be shifted by pci_iov_update_resource(). The > warning message in the function is printed

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

2017-08-14 Thread Alexey Kardashevskiy
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. On 07/08/17 17:25, Alexey Kardashevskiy wrote: > This is a followup for "[PATCH kernel v4 0/6] vfio-pci: Add support for > mmapping MSI-X ta

[PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-11 Thread Alexey Kardashevskiy
om> Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> Tested-by: Carol L Soto <cls...@us.ibm.com> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- This is repost. Since Gavin left the team, I am trying to push it out. The previos converstion is here: https://patc

[RFC PATCH v5 5/5] vfio-pci: Allow to expose MSI-X table to userspace when safe

2017-08-07 Thread Alexey Kardashevskiy
to other devices or cause spurious interrupts visible to the kernel. This adds a wrapping helper to check if a capability is supported by an IOMMU group. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- include/linux/vfio.h | 1 + drivers/vfio/pci/vfio_pci.c

[RFC PATCH v5 4/5] powerpc/iommu: Set IOMMU_GROUP_CAP_ISOLATE_MSIX

2017-08-07 Thread Alexey Kardashevskiy
upt Vector Table (IVT) to identify the interrupt server. Without these translations in place, MSIX messages won't pass PHB. [1] 3.2.4. MSI Design http://openpowerfoundation.org/wp-content/uploads/resources/IODA2Spec/IODA2WGSpec-1.0.0-20160217.pdf Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.

[RFC PATCH v5 2/5] iommu: Set IOMMU_GROUP_CAP_ISOLATE_MSIX if MSI controller enables IRQ remapping

2017-08-07 Thread Alexey Kardashevskiy
This sets IOMMU_GROUP_CAP_ISOLATE_MSIX to a group if MSI remapping is enabled on an IRQ domain; this is expected to set the capability on ARM. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- drivers/iommu/iommu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers

[RFC PATCH v5 1/5] iommu: Add capabilities to a group

2017-08-07 Thread Alexey Kardashevskiy
to the userspace. Various architectures will enable it when they decide that it is safe to do so. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- include/linux/iommu.h | 20 drivers/iommu/iommu.c | 28 2 files changed, 48 insertions(+) diff

[RFC PATCH v5 3/5] iommu/intel/amd: Set IOMMU_GROUP_CAP_ISOLATE_MSIX if IRQ remapping is enabled

2017-08-07 Thread Alexey Kardashevskiy
/documents/product-specifications/vt-directed-io-spec.pdf [2] "2.2 Data Structures" and "2.2.5 Interrupt Remapping Tables" https://support.amd.com/TechDocs/48882_IOMMU.pdf Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- drivers/iommu/amd_iommu.c | 3 +++ drivers/

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

2017-08-07 Thread Alexey Kardashevskiy
" Please comment. Thanks. Changelog: v5: * redid the whole thing via so-called IOMMU group capabilities v4: * rebased on recent upstream * got all 6 patches from v2 (v3 was missing some) Alexey Kardashevskiy (5): iommu: Add capabilities to a group iommu: Set IOMMU_GROUP_CAP_ISOLATE_MSIX

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

2017-07-25 Thread Alexey Kardashevskiy
On 26/07/17 01:44, Alex Williamson wrote: > [cc +Alexey, David] > > Any comments from the usual suspects for vfio/spapr? Thanks, [trying once again as mailists rejected the previous response due to broken outgoing mail encoding config in my thunderbird] Reviewed-by: Alexey Kard

Re: [PATCH] vfio: Remove unnecessary uses of vfio_container.group_lock

2017-07-09 Thread Alexey Kardashevskiy
/detach_group but these are also using tce_container::lock so spapr is going to be fine. Acked-by: Alexey Kardashevskiy <a...@ozlabs.ru> > Thanks, > > Alex > > drivers/vfio/vfio.c | 38 -- > 1 file changed, 38 deletions(-) &g

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

2017-06-28 Thread Alexey Kardashevskiy
On 24/06/17 01:17, Alex Williamson wrote: > On Fri, 23 Jun 2017 15:06:37 +1000 > Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > >> On 23/06/17 07:11, Alex Williamson wrote: >>> On Thu, 15 Jun 2017 15:48:42 +1000 >>> Alexey Kardashevskiy <a...@ozlabs.ru>

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

2017-06-22 Thread Alexey Kardashevskiy
On 23/06/17 07:11, Alex Williamson wrote: > On Thu, 15 Jun 2017 15:48:42 +1000 > Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > >> Here is a patchset which Yongji was working on before >> leaving IBM LTC. Since we still want to have this functionality >> in t

Re: [PATCH v2 2/9] kvm-vfio: Decouple only when we match a group

2017-06-19 Thread Alexey Kardashevskiy
liam...@redhat.com> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Eric Auger <eric.au...@redhat.com> > Cc: Alexey Kardashevskiy <a...@ozlabs.ru> > Cc: sta...@vger.kernel.org > --- > virt/kvm/vfio.c | 12 +--- > 1 file changed, 5 insertions(+), 7 dele

[PATCH kernel 1/3] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag

2017-06-14 Thread Alexey Kardashevskiy
igned-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index 8039f9f0ca05..2c6dbb3dd0da 100644 --- a/include/linux/pci.

[PATCH kernel 2/3] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge

2017-06-14 Thread Alexey Kardashevskiy
From: Yongji Xie <elohi...@gmail.com> Any IODA host bridge have the capability of IRQ remapping. So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge is detected. Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <a...@ozlab

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

2017-06-14 Thread Alexey Kardashevskiy
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 implementation disallows to mmap the page containing MSI-X table in case that

[PATCH kernel 3/3] vfio-pci: Allow to expose MSI-X table to userspace if interrupt remapping is enabled

2017-06-14 Thread Alexey Kardashevskiy
riting to the exposed MSI-X table directly. Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- drivers/vfio/pci/vfio_pci.c | 18 +++--- drivers/vfio/pci/vfio_pci_rdwr.c | 3 ++- 2 files changed, 17 insertio

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

2017-06-14 Thread Alexey Kardashevskiy
Ouch, this is a wrong one, please ignore. I'll repost in a sec. On 15/06/17 15:06, 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

[PATCH kernel 2/3] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge

2017-06-14 Thread Alexey Kardashevskiy
From: Yongji Xie <xyj...@linux.vnet.ibm.com> Any IODA host bridge have the capability of IRQ remapping. So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge is detected. Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <a...@ozlabs

[PATCH kernel 3/3] vfio-pci: Allow to expose MSI-X table to userspace if interrupt remapping is enabled

2017-06-14 Thread Alexey Kardashevskiy
From: Yongji Xie This patch tries to expose MSI-X tables to userspace if hardware enables interrupt remapping which can ensure that a given PCI device can only shoot the MSIs assigned for it. So we could never worry that userspace driver can hurt other devices by

[PATCH kernel 1/3] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag

2017-06-14 Thread Alexey Kardashevskiy
From: Yongji Xie We introduce a new pci_bus_flags, PCI_BUS_FLAGS_MSI_REMAP which indicates interrupts of all devices on the bus are managed by the hardware enabling IRQ remapping(intel naming). When the capability is enabled, a given PCI device can only shoot the MSIs

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

2017-06-14 Thread Alexey Kardashevskiy
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 implementation disallows to mmap the page containing MSI-X table in case that

Re: [PATCH kernel] powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path

2017-06-14 Thread Alexey Kardashevskiy
On 14/06/17 21:04, Michael Ellerman wrote: > Alexey Kardashevskiy <a...@ozlabs.ru> writes: > >> When trapped on WARN_ON(), report_bug() is expected to return >> BUG_TRAP_TYPE_WARN so the caller could increment NIP by 4 and continue. >> The __builtin_constant_p() pat

[PATCH kernel] powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path

2017-06-13 Thread Alexey Kardashevskiy
makes report_bug() report a bug rather than a warning. Fixes: 19d436268dde95389 ("debug: Add _ONCE() logic to report_bug()") Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- Actually 19d436268dde95389 replaced __WARN_TAINT() with __WARN_FLAGS() and lo

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

2017-06-08 Thread Alexey Kardashevskiy
On 08/06/17 22:45, Murilo Opsfelder Araújo wrote: > On 06/08/2017 08:41 AM, Michael Ellerman wrote: >> Alexey Kardashevskiy <a...@ozlabs.ru> writes: >> >>> Hi, >>> >>> How did you manage to have CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n? "make

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

2017-06-07 Thread Alexey Kardashevskiy
On 08/06/17 15:35, Alexey Kardashevskiy wrote: > Hi, > > How did you manage to have CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n? "make > oldconfig" fixes this to CONFIG_VFIO_SPAPR_EEH=y. Also, the attached config has "CONFIG_VFIO_SPAPR_EEH=m" and cannot produce th

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

2017-06-07 Thread Alexey Kardashevskiy
0: >include/linux/vfio.h:168:20: note: previous definition of > 'vfio_spapr_iommu_eeh_ioctl' was here > static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, > ^~ > > vim +/vfio_spapr_pci_eeh_open +22 driv

[PATCH kernel v2] powerpc/iommu: Do not call PageTransHuge() on tail pages

2017-04-11 Thread Alexey Kardashevskiy
for PageCompound(), and it contains PageTail() and PageHead(), we can simplify the check by leaving just PageCompound() and therefore avoid possible VM_BUG_ON_PAGE. Fixes: 2e5bbb5461f1 ("KVM: PPC: Book3S HV: Migrate pinned pages out of CMA") Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Alexey Kar

Re: [RFC PATCH kernel] gcc-goto.sh: Allow to pass with CONFIG_DEBUG_INFO_SPLIT=y

2017-03-26 Thread Alexey Kardashevskiy
On 15/03/17 13:27, Alexey Kardashevskiy wrote: > On 14/03/17 13:54, Alexey Kardashevskiy wrote: >> On 03/03/17 11:51, Alexey Kardashevskiy wrote: >>> With just CONFIG_DEBUG_INFO=y, the makefile adds "-g" to >>> KBUILD_CFLAGS/KBUILD_AFLAGS

Re: [RFC PATCH kernel] gcc-goto.sh: Allow to pass with CONFIG_DEBUG_INFO_SPLIT=y

2017-03-14 Thread Alexey Kardashevskiy
On 14/03/17 13:54, Alexey Kardashevskiy wrote: > On 03/03/17 11:51, Alexey Kardashevskiy wrote: >> With just CONFIG_DEBUG_INFO=y, the makefile adds "-g" to >> KBUILD_CFLAGS/KBUILD_AFLAGS and the test passes. >> >> However, if CONFIG_DEBUG_INFO_SPLIT is also e

Re: [RFC PATCH kernel] gcc-goto.sh: Allow to pass with CONFIG_DEBUG_INFO_SPLIT=y

2017-03-13 Thread Alexey Kardashevskiy
On 03/03/17 11:51, Alexey Kardashevskiy wrote: > With just CONFIG_DEBUG_INFO=y, the makefile adds "-g" to > KBUILD_CFLAGS/KBUILD_AFLAGS and the test passes. > > However, if CONFIG_DEBUG_INFO_SPLIT is also enabled, the makefile > adds "-gsplit-dwarf" instead w

[RFC PATCH kernel] gcc-goto.sh: Allow to pass with CONFIG_DEBUG_INFO_SPLIT=y

2017-03-02 Thread Alexey Kardashevskiy
debug info: objcopy: Warning: '/dev/null' is not an ordinary file This changes the output to $(mktemp) which fixes the problem. I am pretty sure there better ways, this is just to demonstrate the bug. gcc 5.4.1, ppc64le (does not really matter). Cc: Jason Baron <jba...@redhat.com

Re: [PATCH v3 -next 1/2] ARM: sunxi: add support for H2+ SoC

2016-12-05 Thread Alexey Kardashevskiy
On 05/12/16 20:19, Maxime Ripard wrote: > On Fri, Dec 02, 2016 at 11:05:12PM +0800, Icenowy Zheng wrote: >> Allwinner H2+ is a quad-core Cortex-A7 SoC. >> >> It is very like H3, that they share the same SoC ID (0x1680), and H3 >> memory maps as well as drivers works well on the SoC. >> >>

Re: [PATCH v3 -next 2/2] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Alexey Kardashevskiy
On 03/12/16 02:05, Icenowy Zheng wrote: > Orange Pi Zero is a board that came with the new Allwinner H2+ SoC and a > SDIO Wi-Fi chip by Allwinner (XR819). > > Add a device tree file for it. > > Signed-off-by: Icenowy Zheng > --- > Changes since v2: > - Merged SDIO Wi-Fi patch

Re: [PATCH v3 -next 1/2] ARM: sunxi: add support for H2+ SoC

2016-12-04 Thread Alexey Kardashevskiy
On 03/12/16 02:05, Icenowy Zheng wrote: > Allwinner H2+ is a quad-core Cortex-A7 SoC. > > It is very like H3, that they share the same SoC ID (0x1680), and H3 > memory maps as well as drivers works well on the SoC. What git tree is this made against of? Thanks. > > Signed-off-by: Icenowy

Re: [linux-sunxi] [PATCH v3 -next 2/2] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-04 Thread Alexey Kardashevskiy
On 03/12/16 03:41, Chen-Yu Tsai wrote: > Hi, > > On Fri, Dec 2, 2016 at 11:05 PM, Icenowy Zheng wrote: >> Orange Pi Zero is a board that came with the new Allwinner H2+ SoC and a >> SDIO Wi-Fi chip by Allwinner (XR819). >> >> Add a device tree file for it. >> >> Signed-off-by:

Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero

2016-11-29 Thread Alexey Kardashevskiy
On 29/11/16 21:19, Icenowy Zheng wrote: > > 2016年11月29日 15:16于 Alexey Kardashevskiy <a...@ozlabs.ru>写道: >> >> >> >> On Wed, Nov 23, 2016 at 6:59 PM, Maxime Ripard > <maxime.rip...@free-electrons.com> wrote: >>> >>> Hi, >&g

Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 17:12, Alex Williamson wrote: > On Thu, 17 Nov 2016 16:41:14 +1100 > Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > >> On 17/11/16 07:46, Kirti Wankhede wrote: >>> Add task structure to vfio_dma structure. Task structure is used for: >>> -

Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 07:46, Kirti Wankhede wrote: > Add task structure to vfio_dma structure. Task structure is used for: > - During DMA_UNMAP, same task who mapped it or other task who shares same > address space is allowed to unmap, otherwise unmap fails. > QEMU maps few iova ranges initially, then fork

Re: [PATCH v11 10/22] vfio iommu type1: Add support for mediated devices

2016-11-14 Thread Alexey Kardashevskiy
On 15/11/16 17:33, Kirti Wankhede wrote: > > > On 11/15/2016 10:47 AM, Alexey Kardashevskiy wrote: >> On 08/11/16 17:52, Alexey Kardashevskiy wrote: >>> On 05/11/16 08:10, Kirti Wankhede wrote: >>>> VFIO IOMMU drivers are designed for the devices which are

Re: [PATCH v12 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-14 Thread Alexey Kardashevskiy
On 15/11/16 02:42, Kirti Wankhede wrote: > Add task structure to vfio_dma structure. > During DMA_UNMAP, same task who mapped it or other task who shares same > address space is allowed to unmap, otherwise unmap fails. > QEMU maps few iova ranges initially, then fork threads and from the child >

Re: [PATCH v11 10/22] vfio iommu type1: Add support for mediated devices

2016-11-14 Thread Alexey Kardashevskiy
On 08/11/16 17:52, Alexey Kardashevskiy wrote: > On 05/11/16 08:10, Kirti Wankhede wrote: >> VFIO IOMMU drivers are designed for the devices which are IOMMU capable. >> Mediated device only uses IOMMU APIs, the underlying hardware can be >> managed by an IOMMU domain. >

Re: [PATCH v11 15/22] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-11-08 Thread Alexey Kardashevskiy
On 09/11/16 07:22, Kirti Wankhede wrote: > > > On 11/8/2016 2:16 PM, Alexey Kardashevskiy wrote: >> On 05/11/16 08:10, Kirti Wankhede wrote: >>> Vendor driver using mediated device framework would use same mechnism to >>> validate and prepare IRQs. Introdu

Re: [PATCH v11 13/22] vfio: Introduce common function to add capabilities

2016-11-08 Thread Alexey Kardashevskiy
On 09/11/16 08:42, Alex Williamson wrote: > On Wed, 9 Nov 2016 02:16:17 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 11/8/2016 12:59 PM, Alexey Kardashevskiy wrote: >>> On 05/11/16 08:10, Kirti Wankhede wrote: >>>> Vendor driver

Re: [PATCH v11 17/22] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-08 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > Updated vfio_platform_common.c file to use > vfio_set_irqs_validate_and_prepare() > > Signed-off-by: Kirti Wankhede > Signed-off-by: Neo Jia > Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 > --- >

Re: [PATCH v11 15/22] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-11-08 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > Vendor driver using mediated device framework would use same mechnism to > validate and prepare IRQs. Introducing this function to reduce code > replication in multiple drivers. > > Signed-off-by: Kirti Wankhede > Signed-off-by:

Re: [PATCH v11 13/22] vfio: Introduce common function to add capabilities

2016-11-07 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > Vendor driver using mediated device framework should use > vfio_info_add_capability() to add capabilities. > Introduced this function to reduce code duplication in vendor drivers. > > Signed-off-by: Kirti Wankhede > Signed-off-by:

Re: [PATCH v11 10/22] vfio iommu type1: Add support for mediated devices

2016-11-07 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > VFIO IOMMU drivers are designed for the devices which are IOMMU capable. > Mediated device only uses IOMMU APIs, the underlying hardware can be > managed by an IOMMU domain. > > Aim of this change is: > - To use most of the code of TYPE1 IOMMU driver for

Re: [PATCH v11 07/22] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-07 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input > argument. > > Signed-off-by: Kirti Wankhede > Signed-off-by: Neo Jia > Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 > --- >

Re: [PATCH v11 00/22] Add Mediated device support

2016-11-06 Thread Alexey Kardashevskiy
On 07/11/16 17:36, Kirti Wankhede wrote: > > > On 11/7/2016 11:45 AM, Alexey Kardashevskiy wrote: >> On 07/11/16 14:59, Kirti Wankhede wrote: >>> >>> >>> On 11/7/2016 9:00 AM, Alexey Kardashevskiy wrote: >>>> On 05/11/16 08:10, Kirti Wankhed

Re: [PATCH v11 00/22] Add Mediated device support

2016-11-06 Thread Alexey Kardashevskiy
On 07/11/16 14:59, Kirti Wankhede wrote: > > > On 11/7/2016 9:00 AM, Alexey Kardashevskiy wrote: >> On 05/11/16 08:10, Kirti Wankhede wrote: >>> This series adds Mediated device support to Linux host kernel. Purpose >>> of this series is to provide a com

Re: [PATCH v11 00/22] Add Mediated device support

2016-11-06 Thread Alexey Kardashevskiy
On 05/11/16 08:10, Kirti Wankhede wrote: > This series adds Mediated device support to Linux host kernel. Purpose > of this series is to provide a common interface for mediated device > management that can be used by different devices. This series introduces > Mdev core module that creates and

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-02 Thread Alexey Kardashevskiy
On 03/11/16 00:18, Kirti Wankhede wrote: > > > On 11/2/2016 6:30 PM, Jike Song wrote: >> On 11/02/2016 08:41 PM, Kirti Wankhede wrote: >>> On 11/2/2016 5:51 PM, Jike Song wrote: >>>> On 11/02/2016 12:09 PM, Alexey Kardashevskiy wrote: >>>>

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-01 Thread Alexey Kardashevskiy
On 02/11/16 14:29, Kirti Wankhede wrote: > > > On 11/2/2016 6:54 AM, Alexey Kardashevskiy wrote: >> On 02/11/16 01:01, Kirti Wankhede wrote: >>> >>> >>> On 10/28/2016 7:48 AM, Alexey Kardashevskiy wrote: >>>> On 27/10/16 23:31, Kirti Wa

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-01 Thread Alexey Kardashevskiy
On 02/11/16 01:01, Kirti Wankhede wrote: > > > On 10/28/2016 7:48 AM, Alexey Kardashevskiy wrote: >> On 27/10/16 23:31, Kirti Wankhede wrote: >>> >>> >>> On 10/27/2016 12:50 PM, Alexey Kardashevskiy wrote: >>>> On 18/10/16 08:22, Kirti

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-27 Thread Alexey Kardashevskiy
On 27/10/16 23:31, Kirti Wankhede wrote: > > > On 10/27/2016 12:50 PM, Alexey Kardashevskiy wrote: >> On 18/10/16 08:22, Kirti Wankhede wrote: >>> VFIO IOMMU drivers are designed for the devices which are IOMMU capable. >>> Mediated device only uses IOMMU

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-27 Thread Alexey Kardashevskiy
On 18/10/16 08:22, Kirti Wankhede wrote: > VFIO IOMMU drivers are designed for the devices which are IOMMU capable. > Mediated device only uses IOMMU APIs, the underlying hardware can be > managed by an IOMMU domain. > > Aim of this change is: > - To use most of the code of TYPE1 IOMMU driver for

[PATCH kernel v3] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-10-24 Thread Alexey Kardashevskiy
00\x00\x00'... 0dff Small item 0 bytes; name 0xf End Tag 10f3 Large item 13315 bytes; name 0x62 !!! unknown item name 98: b'\xd0\x03\x00@`\x0c\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00' === Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- Changes: v3: * unconditionally set VP

Re: [PATCH kernel v2] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-10-10 Thread Alexey Kardashevskiy
On 11/10/16 02:23, Alexander Duyck wrote: > On Wed, Sep 28, 2016 at 10:21 PM, Alexey Kardashevskiy <a...@ozlabs.ru> wrote: >> There is at least one Chelsio 10Gb card which uses VPD area to store >> some custom blocks (example below). However pci_vpd_size() returns >> th

Re: [PATCH kernel v2] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-10-09 Thread Alexey Kardashevskiy
Anyone, ping? On 29/09/16 15:21, Alexey Kardashevskiy wrote: > There is at least one Chelsio 10Gb card which uses VPD area to store > some custom blocks (example below). However pci_vpd_size() returns > the length of the first block only assuming that there can be only > one

[PATCH kernel v2] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-09-28 Thread Alexey Kardashevskiy
0-0001-00 H1\x00\x00' #4c [RW] len=173: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'... 0dff Small item 0 bytes; name 0xf End Tag Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- Changes: v2: * used pci_set_vpd_size() helper * added explicit list of IDs from c

Re: [RFC PATCH kernel] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-09-21 Thread Alexey Kardashevskiy
On 07/09/16 04:30, Alexander Duyck wrote: > On Tue, Sep 6, 2016 at 8:48 AM, Bjorn Helgaas <helg...@kernel.org> wrote: >> Hi Alexey, >> >> On Thu, Aug 11, 2016 at 08:03:29PM +1000, Alexey Kardashevskiy wrote: >>> There is at least one Chelsio 10Gb card which us

Re: [RFC][PATCH] Fix a race between rwsem and the scheduler

2016-09-01 Thread Alexey Kardashevskiy
On 01/09/16 11:48, Alexey Kardashevskiy wrote: > On 31/08/16 17:28, Peter Zijlstra wrote: >> On Wed, Aug 31, 2016 at 01:41:33PM +1000, Balbir Singh wrote: >>> On 30/08/16 22:19, Peter Zijlstra wrote: >>>> On Tue, Aug 30, 2016 at 06:49:37PM +1000, Balbir Singh wrote

Re: [RFC][PATCH] Fix a race between rwsem and the scheduler

2016-08-31 Thread Alexey Kardashevskiy
On 31/08/16 17:28, Peter Zijlstra wrote: > On Wed, Aug 31, 2016 at 01:41:33PM +1000, Balbir Singh wrote: >> On 30/08/16 22:19, Peter Zijlstra wrote: >>> On Tue, Aug 30, 2016 at 06:49:37PM +1000, Balbir Singh wrote: The origin of the issue I've seen seems to be related to rwsem

Re: [PATCHv2 3/4] pci: Determine actual VPD size on first access

2016-08-15 Thread Alexey Kardashevskiy
On 12/08/16 04:52, Alexander Duyck wrote: > On Wed, Aug 10, 2016 at 4:54 PM, Benjamin Herrenschmidt > wrote: >> On Wed, 2016-08-10 at 08:47 -0700, Alexander Duyck wrote: >>> >>> The problem is if we don't do this it becomes possible for a guest to >>> essentially cripple

Re: [PATCH] vfio: Enable VFIO device for powerpc

2016-08-11 Thread Alexey Kardashevskiy
On 11/08/16 23:19, Cornelia Huck wrote: > On Thu, 11 Aug 2016 14:57:24 +0200 > Paolo Bonzini wrote: > >> On 26/08/2015 20:54, Paul Mackerras wrote: >>> On Wed, Aug 26, 2015 at 11:34:26AM +0200, Alexander Graf wrote: On 13.08.15 03:15, David Gibson wrote: > ec53500f

[RFC PATCH kernel] PCI: Enable access to custom VPD for Chelsio devices (cxgb3)

2016-08-11 Thread Alexey Kardashevskiy
16: b'610-0001-00 H1\x00\x00' #4c [RW] len=173: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'... #0dff Small item 0 bytes; name 0xf End Tag Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- drivers/pci/quirks.c | 12 1 file changed, 12

Re: [PATCHv2 3/4] pci: Determine actual VPD size on first access

2016-08-09 Thread Alexey Kardashevskiy
On 10/02/16 08:04, Bjorn Helgaas wrote: > On Wed, Jan 13, 2016 at 12:25:34PM +0100, Hannes Reinecke wrote: >> PCI-2.2 VPD entries have a maximum size of 32k, but might actually >> be smaller than that. To figure out the actual size one has to read >> the VPD area until the 'end marker' is reached.

[PATCH kernel v2 1/2] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-07-19 Thread Alexey Kardashevskiy
ive mm_struct instead of using one from @current. This is needed by the following patch to do proper cleanup in time. This depends on "powerpc/powernv/ioda: Fix endianness when reading TCEs" to do proper cleanup via tce_iommu_clear() patch. This should cause no behavioral change. Signed-o

[PATCH kernel v2 2/2] powerpc/mm/iommu: Put pages on process exit

2016-07-19 Thread Alexey Kardashevskiy
albir Singh <bsinghar...@gmail.com> Cc: Nicholas Piggin <npig...@gmail.com> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- arch/powerpc/include/asm/mmu_context.h | 1 - arch/powerpc/mm/mmu_context_book3s64.c | 4 --- arch/powerpc/mm/mmu_context_iommu.c| 10 --- driv

[PATCH kernel v2 0/2] powerpc/mm/iommu: Put pages on process exit

2016-07-19 Thread Alexey Kardashevskiy
This is a fix to a bug when guest memory stays Active after QEMU process exited. This happened because the QEMU memory context was not released in a short period of time after QEMU process exited. More details are in the commit logs. Please comment. Thanks. Alexey Kardashevskiy (2): powerpc

Re: [PATCH kernel] powerpc/mm/iommu: Put pages on process exit

2016-07-14 Thread Alexey Kardashevskiy
On 14/07/16 21:52, Alexey Kardashevskiy wrote: > On 14/07/16 20:12, Balbir Singh wrote: >> On Thu, Jul 14, 2016 at 3:16 PM, Alexey Kardashevskiy <a...@ozlabs.ru> wrote: >>> At the moment VFIO IOMMU SPAPR v2 driver pins all guest RAM pages when >>> the

Re: [PATCH kernel] powerpc/mm/iommu: Put pages on process exit

2016-07-14 Thread Alexey Kardashevskiy
On 14/07/16 20:12, Balbir Singh wrote: > On Thu, Jul 14, 2016 at 3:16 PM, Alexey Kardashevskiy <a...@ozlabs.ru> wrote: >> At the moment VFIO IOMMU SPAPR v2 driver pins all guest RAM pages when >> the userspace starts using VFIO. When the userspace process finishes, >>

[PATCH kernel] powerpc/mm/iommu: Put pages on process exit

2016-07-13 Thread Alexey Kardashevskiy
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> Cc: Paul Mackerras <pau...@samba.org> Cc: Balbir Singh <bsinghar...@gmail.com> Cc: Nick Piggin <npig...@kernel.dk> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- arch/powerpc/include/asm/mmu_context.h | 3 +++

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

2016-05-06 Thread Alexey Kardashevskiy
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] Sent: Thursday, May 05, 2016 7:43 PM Hi David and Kevin, On 2016/5/5 17:54, David Laight wrote: From: Tian, Kevin

Re: [PATCH 4/5] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge

2016-05-06 Thread Alexey Kardashevskiy
On 04/27/2016 10:43 PM, Yongji Xie wrote: Any IODA host bridge have the capability of IRQ remapping. So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge is detected. Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <a...@

Re: [PATCH kernel v4 11/11] powerpc/powernv/npu: Enable NVLink pass through

2016-05-04 Thread Alexey Kardashevskiy
On 05/04/2016 12:08 AM, Alistair Popple wrote: Hi Alexey, On Fri, 29 Apr 2016 18:55:24 Alexey Kardashevskiy wrote: IBM POWER8 NVlink systems come with Tesla K40-ish GPUs each of which also has a couple of fast speed links (NVLink). The interface to links is exposed as an emulated PCI bridge

Re: [PATCH kernel v4 10/11] powerpc/powernv/npu: Rework TCE Kill handling

2016-05-04 Thread Alexey Kardashevskiy
On 05/03/2016 05:37 PM, Alistair Popple wrote: On Fri, 29 Apr 2016 18:55:23 Alexey Kardashevskiy wrote: The pnv_ioda_pe struct keeps an array of peers. At the moment it is only used to link GPU and NPU for 2 purposes: 1. Access NPU quickly when configuring DMA for GPU - this was addressed

[PATCH kernel v4 06/11] powerpc/powernv/npu: Use the correct IOMMU page size

2016-04-29 Thread Alexey Kardashevskiy
This uses the page size from iommu_table instead of hard-coded 4K. This should cause no change in behavior. While we are here, move bits around to prepare for further rework which will define and use iommu_table_group_ops. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> Reviewed-by:

[PATCH kernel v4 09/11] powerpc/powernv/npu: Add set/unset window helpers

2016-04-29 Thread Alexey Kardashevskiy
the hardware. This does not make difference now as the caller - pnv_npu_dma_set_bypass() - enables bypass in the hardware but the next patch will use it to manage TCE table lists for TCE Kill handling. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- arch/powerpc/platforms/powernv/npu

[PATCH kernel v4 10/11] powerpc/powernv/npu: Rework TCE Kill handling

2016-04-29 Thread Alexey Kardashevskiy
as they are not needed anymore. While we are here, add TCE cache invalidation after enabling bypass. Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- Changes: v4: * reworked as "powerpc/powernv/npu: Add set/unset window helpers" has been added --- arch/powerpc/platforms/powernv

[PATCH kernel v4 00/11] powerpc/powernv/npu: Enable PCI pass through for NVLink

2016-04-29 Thread Alexey Kardashevskiy
r: Relax the IOMMU compatibility check" to proceed. Alexey Kardashevskiy (11): vfio_pci: Test for extended capabilities if config space > 256 bytes vfio/spapr: Relax the IOMMU compatibility check powerpc/powernv: Rename pnv_pci_ioda2_tce_invalidate_entire powerpc/powernv: Define

  1   2   3   4   5   6   7   8   9   >