From: Alexey Kardashevskiy Subject: Re: [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table Date: Mon, 10 Jul 2017 12:20:38 +1000 Message-ID: <5d0c6cfe-54b2-880e-7825-e5f91e405873@ozlabs.ru> References: <20170630052436.15212-1-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Cc: David Gibson , Alex Williamson , Bjorn Helgaas , Yongji Xie , Eric Auger To: kvm@vger.kernel.org Return-path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:35878 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753234AbdGJCUn (ORCPT ); Sun, 9 Jul 2017 22:20:43 -0400 Received: by mail-pg0-f66.google.com with SMTP id u36so10882705pgn.3 for ; Sun, 09 Jul 2017 19:20:43 -0700 (PDT) In-Reply-To: <20170630052436.15212-1-aik@ozlabs.ru> Content-Language: en-AU Sender: kvm-owner@vger.kernel.org List-ID: On 30/06/17 15:24, 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 implementation disallows to mmap the page > containing MSI-X table in case that users can write directly > to MSI-X table and generate an incorrect MSIs. > > However, this will cause some performance issue when there > are some critical device registers in the same page as the > MSI-X table. We have to handle the mmio access to these > registers in QEMU emulation rather than in guest. > > To solve this issue, this series allows to expose MSI-X table > to userspace when hardware enables the capability of interrupt > remapping which can ensure that a given PCI device can only > shoot the MSIs assigned for it. And we introduce a new bus_flags > PCI_BUS_FLAGS_MSI_REMAP to test this capability on PCI side > for different archs. > > > This is based on sha1 > 3c2bfbaadff6 Linus Torvalds "Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm". > > Please comment. Thanks. Other than that compile error, is there anything else wrong/missing in this patchset? Thanks. > > Changes: > v4: > * rebased on recent upstream > * got all 6 patches from v2 (v3 was missing some) > > > Alexey Kardashevskiy (1): > PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ > remapping > > Yongji Xie (5): > PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag > PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ > remapping > iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization > pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge > vfio-pci: Allow to expose MSI-X table to userspace if interrupt > remapping is enabled > > include/linux/pci.h | 1 + > arch/powerpc/platforms/powernv/pci-ioda.c | 7 +++++++ > drivers/iommu/iommu.c | 8 ++++++++ > drivers/pci/probe.c | 8 ++++++++ > drivers/vfio/pci/vfio_pci.c | 17 ++++++++++++++--- > drivers/vfio/pci/vfio_pci_rdwr.c | 3 ++- > 6 files changed, 40 insertions(+), 4 deletions(-) > -- Alexey