Re: [PATCH v5 3/4] kvm: Create kvm_clear_irq()

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 00:05 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 01:51:27PM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 21:55 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 10:45:52AM -0600, Alex Williamson wrote: > > >

Re: [PATCH v5 2/4] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 00:23 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 02:03:05PM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 21:58 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 10:52:16AM -0600, Alex Williamson wrote: > > >

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 01:00 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 03:57:41PM -0600, Alex Williamson wrote: > > On Wed, 2012-07-18 at 00:26 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 16, 2012 at 02:33:47PM -0600, Alex Williamson wrote: >

Re: [PATCH v5 3/4] kvm: Create kvm_clear_irq()

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 01:05 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 04:01:40PM -0600, Alex Williamson wrote: > > On Wed, 2012-07-18 at 00:05 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 01:51:27PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v5 2/4] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 01:24 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 04:09:25PM -0600, Alex Williamson wrote: > > On Wed, 2012-07-18 at 00:23 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 02:03:05PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 15:07 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 02:48:44PM +0300, Gleb Natapov wrote: > > On Wed, Jul 18, 2012 at 02:39:10PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 18, 2012 at 02:22:19PM +0300, Michael S. Tsirkin wrote: > > > > > > > > > > So as wa

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 18:38 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 08:47:23AM -0600, Alex Williamson wrote: > > On Wed, 2012-07-18 at 15:07 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 18, 2012 at 02:48:44PM +0300, Gleb Natapov wrote: > > > >

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 15:42 -0300, Marcelo Tosatti wrote: > On Wed, Jul 18, 2012 at 06:58:24PM +0300, Michael S. Tsirkin wrote: > > > > > > > Back to original point though current > > > > > > > situation is that calling kvm_set_irq() under spinlock is not > > > > > > > worse for > > > > > > > scal

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 13:07 -0600, Alex Williamson wrote: > On Wed, 2012-07-18 at 15:42 -0300, Marcelo Tosatti wrote: > > On Wed, Jul 18, 2012 at 06:58:24PM +0300, Michael S. Tsirkin wrote: > > > > > > > > Back to original point though current > > > >

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 13:13 -0600, Alex Williamson wrote: > On Wed, 2012-07-18 at 13:07 -0600, Alex Williamson wrote: > > On Wed, 2012-07-18 at 15:42 -0300, Marcelo Tosatti wrote: > > > On Wed, Jul 18, 2012 at 06:58:24PM +0300, Michael S. Tsirkin wrote: > > > > &g

Re: [PATCH] kvm: fix race with level interrupts

2012-07-18 Thread Alex Williamson
On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > When more than 1 source id is in use for the same GSI, we have the > following race related to handling irq_states: > > CPU 0 clears bit in irq_states. CPU 0 reads irq_state as 0. > CPU 1 sets bit in irq_states. CPU 1 calls kvm_ioapic

Re: [PATCH] kvm: fix race with level interrupts

2012-07-18 Thread Alex Williamson
On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > When more than 1 source id is in use for the same GSI, we have the > following race related to handling irq_states: > > CPU 0 clears bit in irq_states. CPU 0 reads irq_state as 0. > CPU 1 sets bit in irq_states. CPU 1 calls kvm_ioapic

Re: [PATCH] kvm: fix race with level interrupts

2012-07-18 Thread Alex Williamson
On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:26:41PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > > > When more than 1 source id is in use for the same GSI, we have the > > >

Re: [PATCH] kvm: fix race with level interrupts

2012-07-18 Thread Alex Williamson
On Thu, 2012-07-19 at 01:44 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:16:14PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > > > When more than 1 source id is in use for the same GSI, we have the > > >

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 12:15 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 05:22:42PM -0600, Alex Williamson wrote: > > I hate reviewing code > > > > where I have to differentiate 'l' vs '1'. > > > > > > l is an illeg

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 12:07 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 05:20:40PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 18, 2012 at 04:26:41PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 19:59 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > > v5: > > - irqfds now have a one-to-one mapping with eoifds to prevent users > >from consuming all of kernel memory by repeatedly creating

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 20:45 +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 11:29:38AM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 19:59 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > > >

[PATCH] vfio/pci: Fix racy vfio_device_get_from_dev() call

2015-05-27 Thread Alex Williamson
make sure the driver is still what we expect, so that we don't interfere with devices we don't own. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 16 +--- drivers/vfio/vfio.c | 27 +++ 2 files changed, 28 insertions(+), 1

Re: [v4 12/16] KVM: kvm-vfio: implement the VFIO skeleton for VT-d Posted-Interrupts

2015-06-11 Thread Alex Williamson
On Thu, 2015-06-11 at 18:51 +0800, Feng Wu wrote: > This patch adds the kvm-vfio interface for VT-d Posted-Interrupts. > When guests update MSI/MSI-x information for an assigned-device, > QEMU will use KVM_DEV_VFIO_DEVICE_POST_IRQ attribute to setup > IRTE for VT-d PI. Userspace program can also us

Re: [v4 13/16] KVM: x86: kvm-vfio: VT-d posted-interrupts setup

2015-06-11 Thread Alex Williamson
On Thu, 2015-06-11 at 18:51 +0800, Feng Wu wrote: > This patch defines macro __KVM_HAVE_ARCH_KVM_VFIO_POST and > implement kvm_arch_vfio_update_pi_irte for x86 architecture. > What's vfio specific in any of this? It's obviously called from the kvm-vfio device interface, but nothing below is vfio

Re: [PATCH v3 1/4] VFIO: platform: add reset struct and lookup table

2015-06-11 Thread Alex Williamson
On Thu, 2015-06-11 at 14:08 +0200, Eric Auger wrote: > This patch introduces the vfio_platform_reset_combo struct that > stores all the information useful to handle the reset modality: > compat string, name of the reset function, name of the module that > implements the reset function. A lookup tab

Re: [PATCH v3 1/4] VFIO: platform: add reset struct and lookup table

2015-06-12 Thread Alex Williamson
On Fri, 2015-06-12 at 15:41 +0200, Eric Auger wrote: > Hi Alex, > On 06/11/2015 11:11 PM, Alex Williamson wrote: > > On Thu, 2015-06-11 at 14:08 +0200, Eric Auger wrote: > >> This patch introduces the vfio_platform_reset_combo struct that > >> stores all the informat

Re: [v4 12/16] KVM: kvm-vfio: implement the VFIO skeleton for VT-d Posted-Interrupts

2015-06-12 Thread Alex Williamson
On Fri, 2015-06-12 at 04:54 +, Wu, Feng wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, June 12, 2015 1:15 AM > > To: Wu, Feng > > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel

Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding

2015-06-12 Thread Alex Williamson
On Fri, 2015-06-12 at 00:23 +, Wu, Feng wrote: > > > -Original Message- > > From: Avi Kivity [mailto:avi.kiv...@gmail.com] > > Sent: Friday, June 12, 2015 3:59 AM > > To: Wu, Feng; k...@vger.kernel.org; linux-kernel@vger.kernel.org > > Cc: pbonz...@redhat.com; mtosa...@redhat.com; > >

Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding

2015-06-12 Thread Alex Williamson
On Fri, 2015-06-12 at 21:48 +0300, Avi Kivity wrote: > On 06/12/2015 06:41 PM, Alex Williamson wrote: > > On Fri, 2015-06-12 at 00:23 +, Wu, Feng wrote: > >>> -Original Message- > >>> From: Avi Kivity [mailto:avi.kiv...@gmail.com] > >>> Sen

Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding

2015-06-15 Thread Alex Williamson
On Mon, 2015-06-15 at 18:17 +0200, Eric Auger wrote: > Hi Alex, all, > On 06/12/2015 09:03 PM, Alex Williamson wrote: > > On Fri, 2015-06-12 at 21:48 +0300, Avi Kivity wrote: > >> On 06/12/2015 06:41 PM, Alex Williamson wrote: > >>> On Fri, 2015-06-

Re: Panic when cpu hot-remove

2015-06-17 Thread Alex Williamson
On Wed, 2015-06-17 at 13:52 +0200, Joerg Roedeljoro wrote: > On Wed, Jun 17, 2015 at 10:42:49AM +, 范冬冬 wrote: > > Hi maintainer, > > > > We found a problem that a panic happen when cpu was hot-removed. We also > > trace the problem according to the calltrace information. > > An endless loop h

Re: [PATCH v4 0/4] VFIO platform reset

2015-06-17 Thread Alex Williamson
On Mon, 2015-06-15 at 11:09 +0200, Eric Auger wrote: > In situations where the userspace driver is stopped abnormally and the > VFIO platform device is released, the assigned HW device currently is > left running. As a consequence the HW device might continue issuing IRQs > and performing DMA acces

Re: [PATCH v4 0/4] VFIO platform reset

2015-06-22 Thread Alex Williamson
st patches and get a pull request out. Thanks, Alex > On Thu, Jun 18, 2015 at 6:17 PM, Alex Williamson > wrote: > > On Thu, 2015-06-18 at 17:23 +0200, Baptiste Reynal wrote: > >> Hello everyone, > >> > >> I tested and reviewed the patches, everything'

Re: [PATCH] VFIO: platform: enable ARM64 build

2015-06-22 Thread Alex Williamson
On Mon, 2015-06-22 at 17:56 +0200, Eric Auger wrote: > Hi Baptiste, > > No unfortunately I don't have any HW to test this currently. I just > test-compiled this. Up to you to decide whether you prefer waiting for a > functional test for this. I sent that patch since I expect ARM64 to be > the main

Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding

2015-06-24 Thread Alex Williamson
On Wed, 2015-06-24 at 18:25 +0200, Eric Auger wrote: > Hi Joerg, > > On 06/24/2015 05:50 PM, Joerg Roedel wrote: > > On Mon, Jun 15, 2015 at 06:17:03PM +0200, Eric Auger wrote: > >> I guess this discussion also is relevant wrt "[RFC v6 00/16] KVM-VFIO > >> IRQ forward control" series? Or is that "

[PATCH] PCI: pciehp: Wait for hotplug command completion where necessary

2015-06-08 Thread Alex Williamson
1a068661c ("PCI: pciehp: Wait for hotplug command completion lazily") Cc: sta...@vger.kernel.org # v3.17+ Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pciehp_hpc.c | 52 -- 1 file changed, 38 insertions(+), 14 deletions(-) diff --

Re: [PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Alex Williamson
On Thu, 2015-06-04 at 16:33 +0200, Paolo Bonzini wrote: > > On 04/06/2015 16:31, Bandan Das wrote: > > > VFIO has proved itself a much better option than KVM's built-in > > > device assignment. It is mature, provides better isolation because > > > it enforces ACS, and even the userspace code is b

Re: [PATCH v2 3/4] VFIO: platform: populate the reset function on probe

2015-06-09 Thread Alex Williamson
On Fri, 2015-06-05 at 17:06 +0200, Eric Auger wrote: > The reset function lookup happens on vfio-platform probe. The reset > module load is requested and a reference to the function symbol is > hold. The reference is released on vfio-platform remove. > > Signed-off-by: Eric Auger > > --- > > v

Re: [PATCH v2 1/4] VFIO: platform: add reset struct and lookup table

2015-06-09 Thread Alex Williamson
On Fri, 2015-06-05 at 17:06 +0200, Eric Auger wrote: > This patch introduces the vfio_platform_reset_combo struct that > stores all the information useful to handle the reset modality: > compat string, name of the reset function, name of the module that > implements the reset function. A lookup tab

Re: [PATCH v2 3/4] VFIO: platform: populate the reset function on probe

2015-06-10 Thread Alex Williamson
On Wed, 2015-06-10 at 13:44 +0200, Eric Auger wrote: > On 06/09/2015 08:26 PM, Alex Williamson wrote: > > On Fri, 2015-06-05 at 17:06 +0200, Eric Auger wrote: > >> The reset function lookup happens on vfio-platform probe. The reset > >> module load is requested and

Re: [PATCH v4 0/4] VFIO platform reset

2015-06-18 Thread Alex Williamson
s, though I don't > think the volume of patches about VFIO will justify a new mailing > list. Ok, I'll officially post the patch for MAINTAINERS then. Until someone complains, we'll continue to use the kvm list. Thanks, Alex > On Thu, Jun 18, 2015 at 12:31 AM, Alex Willi

[PATCH] MAINTAINERS: Add vfio-platform sub-maintainer

2015-06-18 Thread Alex Williamson
Add Baptiste Reynal as the VFIO platform driver sub-maintainer. Signed-off-by: Alex Williamson Cc: Baptiste Reynal --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8afd29..c6bf7f6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding

2015-06-18 Thread Alex Williamson
[Adding Joerg since he was part of this original idea] On Thu, 2015-06-18 at 09:16 +, Wu, Feng wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, June 16, 2015 12:45 AM > > To: Eric Auger &

Re: [PATCH v4 1/2] vfio/mdev: Check globally for duplicate devices

2018-05-22 Thread Alex Williamson
[Cc +GVT-g maintainers/lists] On Tue, 22 May 2018 10:13:46 +0200 Cornelia Huck wrote: > On Fri, 18 May 2018 13:10:25 -0600 > Alex Williamson wrote: > > > When we create an mdev device, we check for duplicates against the > > parent device and return -EEXIST if found

Re: [PATCH v4 0/2] vfio/mdev: Device namespace protection

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 19:17:07 +0200 Halil Pasic wrote: > From vfio-ccw perspective I join Connie's assessment: vfio-ccw should > be fine with these changes. I'm however not too deeply involved with > the mdev framework, thus I don't feel comfortable r-b-ing. That results > in > Acked-by: Halil Pa

Re: [PATCH 2/2] NTB: PCI Quirk to Enable Switchtec NT Functionality with IOMMU On

2018-05-22 Thread Alex Williamson
On Tue, 22 May 2018 16:51:26 -0500 Bjorn Helgaas wrote: > [+cc Alex] > > On Tue, May 22, 2018 at 02:09:59PM -0700, Doug Meyer wrote: > > Logan answered the questions quite thoroughly. (Thanks, Logan!) > > When you repost it, please rework the commit log so it answers the > questions directly.

Re: [PATCH] PCI: Expand documentation for pci_add_dma_alias()

2018-05-23 Thread Alex Williamson
function and common reasons it would > be used. > > Signed-off-by: Logan Gunthorpe > Cc: Bjorn Helgaas > Cc: Alex Williamson > Cc: Doug Meyer > --- > drivers/pci/pci.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/drive

Re: [PATCH v4 4/6] vfio/type1: check dma map request is within a valid iova range

2018-02-28 Thread Alex Williamson
y, February 28, 2018 9:02 AM > >> To: Shameerali Kolothum Thodi ; > >> Alex Williamson > >> Cc: pmo...@linux.vnet.ibm.com; k...@vger.kernel.org; linux- > >> ker...@vger.kernel.org; Linuxarm ; John Garry > >> ; xuwei (O) ; Robin Murphy > >> >

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

2018-02-28 Thread Alex Williamson
ding the endian nature of this interface. * Rebase to v4.16-rc3 Thanks, Alex --- Alex Williamson (3): vfio/pci: Pull BAR mapping setup from read-write path vfio/pci: Use endian neutral helpers vfio/pci: Add ioeventfd support drivers/vfio/pci/vfio_pci.c | 34 ++

[PATCH 1/3] vfio/pci: Pull BAR mapping setup from read-write path

2018-02-28 Thread Alex Williamson
This creates a common helper that we'll use for ioeventfd setup. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 39 ++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfi

[PATCH 2/3] vfio/pci: Use endian neutral helpers

2018-02-28 Thread Alex Williamson
change other than big endian systems aren't penalized with wasted swaps. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_rdwr.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfi

[PATCH 3/3] vfio/pci: Add ioeventfd support

2018-02-28 Thread Alex Williamson
virtualized region in order to allow the MSI interrupt to re-trigger. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 34 ++ drivers/vfio/pci/vfio_pci_private.h | 18 + drivers/vfio/pci/vfio_pci_rdwr.c| 115 +++ include

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-02-28 Thread Alex Williamson
On Wed, 28 Feb 2018 09:49:21 -0800 Alexander Duyck wrote: > On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck > wrote: > > On Tue, Feb 27, 2018 at 1:40 PM, Alex Williamson > > wrote: > >> On Tue, 27 Feb 2018 11:06:54 -0800 > >> Alexander Duyck wrote

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck wrote: > On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson > wrote: > > On Wed, 28 Feb 2018 09:49:21 -0800 > > Alexander Duyck wrote: > > > >> On Tue, Feb 27, 2018 at 2:25 PM, Alexander Duyck > >> wr

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 18:54:01 + "Stephen Bates" wrote: > Thanks for the detailed review Bjorn! > > >> > >> +Enabling this option will also disable ACS on all ports behind > >> +any PCIe switch. This effictively puts all devices behind any > >> +switch into the same IOMMU group.

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-01 Thread Alex Williamson
On Thu, 1 Mar 2018 14:42:40 -0800 Alexander Duyck wrote: > On Thu, Mar 1, 2018 at 12:22 PM, Alex Williamson > wrote: > > On Wed, 28 Feb 2018 16:36:38 -0800 > > Alexander Duyck wrote: > > > >> On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson > >> wr

Re: [PATCH] PCI: Add Intel 7th & 8th Gen mobile to ACS quirks

2018-04-27 Thread Alex Williamson
On Fri, 27 Apr 2018 13:09:56 -0500 Bjorn Helgaas wrote: > On Wed, Apr 25, 2018 at 02:27:37PM -0600, Alex Williamson wrote: > > The specification update indicates these have the same errate for > > implementing non-standard ACS capabilities. > > > > Signed-off-by: Alex

Re: [PATCH v6 4/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-04-30 Thread Alex Williamson
On Tue, 24 Apr 2018 13:16:19 + Shameerali Kolothum Thodi wrote: > Hi Joerg, > > Could you please take a look at this patch and let me know. > > I have rebased this to 4.17-rc1 and added Robin's R-by. > > This series[1] is now pending on this patch as without this it will break few > ARM p

Re: [PATCH] VFIO: Fix Documentation

2018-04-30 Thread Alex Williamson
On Fri, 20 Apr 2018 18:07:27 +0800 "dongbo (E)" wrote: > From: Dong Bo > > Signed-off-by: Dong Bo > --- Hi Dong Bo, The patch is corrupted, please resend and also include a commit log, something as simple as "Update vfio_add_group_dev description to match the current API" would be fine. Tha

Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-05-29 Thread Alex Williamson
On Wed, 30 May 2018 01:41:43 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 30, 2018 4:09 AM > > > > On Fri, 20 Apr 2018 16:42:51 -0700 > > Jacob Pan wrote: > > > > >

Re: [PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-06-05 Thread Alex Williamson
[Cc +dwmw2] On Fri, 25 May 2018 14:54:08 -0600 Alex Williamson wrote: > On Fri, 25 May 2018 08:45:36 + > Shameerali Kolothum Thodi wrote: > > > Yes, the above changes related to list empty cases looks fine to me. > > Thanks Shameer, applied to my next branch wit

[PATCH] vfio/mdev: Check globally for duplicate devices

2018-05-15 Thread Alex Williamson
and remove paths, so mdev_parent.lock is removed. If we can show that vendor drivers handle the create/remove paths themselves, perhaps we can refine the locking granularity. Signed-off-by: Alex Williamson --- drivers/vfio/mdev/mdev_core.c| 79 ++ drivers

Re: [PATCH] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
On Wed, 16 May 2018 11:05:06 +0200 Cornelia Huck wrote: > On Tue, 15 May 2018 14:17:04 -0600 > Alex Williamson wrote: > > > When we create an mdev device, we check for duplicates against the > > parent device and return -EEXIST if found, but the mdev device > > name

[PATCH v2] vfio/mdev: Check globally for duplicate devices

2018-05-16 Thread Alex Williamson
and remove paths, so mdev_parent.lock is removed. If we can show that vendor drivers handle the create/remove paths themselves, perhaps we can refine the locking granularity. Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson --- v2: Remove unnecessary ret init per Cornelia's review dr

[PATCH] PCI: Add Intel 7th & 8th Gen mobile to ACS quirks

2018-04-25 Thread Alex Williamson
The specification update indicates these have the same errate for implementing non-standard ACS capabilities. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index

[PATCH] PCI: Add link_change error handler and vfio-pci user

2019-04-23 Thread Alex Williamson
x-pci/155597243666.19387.1205950870601742062.st...@gimli.home/T/#u Signed-off-by: Alex Williamson --- Changing to pci_dbg() logging is not super usable, so let's try the previous idea of letting the driver handle link change events as they see fit. Ideally this might be two patches, but for easie

Re: [PATCH] PCI: Add link_change error handler and vfio-pci user

2019-04-24 Thread Alex Williamson
On Wed, 24 Apr 2019 16:45:45 + wrote: > On 4/23/2019 5:42 PM, Alex Williamson wrote: > > The PCIe bandwidth notification service generates logging any time a > > link changes speed or width to a state that is considered downgraded. > > Unfortunately, it cannot different

Re: [RFC PATCH 8/8] svm: Allow AVIC with in-kernel irqchip mode

2019-02-05 Thread Alex Williamson
On Mon, 4 Feb 2019 14:42:32 + "Suthikulpanit, Suravee" wrote: > Once the IRQ ack notifier for in-kernel PIT is no longer required > and run-time AVIC activate/deactivate is supported, we can remove > the kernel irqchip split mode requirement for AVIC. > > Hence, remove the check for irqchip

Re: [PATCH] vfio: platform: reset: fix up include directives to remove ccflags-y

2019-02-05 Thread Alex Williamson
On Wed, 30 Jan 2019 11:52:31 +0900 Masahiro Yamada wrote: > For the include directive with double-quotes "", the preprocessor > searches the header in the relative path to the current file. > > Fix them up, and remove the header search path option. > > Signed-off-by: Masahiro Yamada > --- > >

[GIT PULL] VFIO fixes for v5.0-rc4

2019-01-25 Thread Alex Williamson
Hi Linus, The following changes since commit 49a57857aeea06ca831043acbb0fa5e0f50602fd: Linux 5.0-rc3 (2019-01-21 13:14:44 +1300) are available in the Git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v5.0-rc4 for you to fetch changes up to 9a71ac7e15a723e90fc40388b4b92e

Re: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence

2019-03-26 Thread Alex Williamson
On Tue, 26 Mar 2019 05:53:22 + Parav Pandit wrote: > > -Original Message- > > From: linux-kernel-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Parav Pandit > > Sent: Monday, March 25, 2019 10:19 PM > > To: Alex Williamson > > Cc

Re: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence

2019-03-26 Thread Alex Williamson
On Tue, 26 Mar 2019 12:36:22 +0530 Kirti Wankhede wrote: > On 3/23/2019 4:50 AM, Parav Pandit wrote: > > There are five problems with current code structure. > > 1. mdev device is placed on the mdev bus before it is created in the > > vendor driver. Once a device is placed on the mdev bus without

Re: [RFC v2 1/2] vfio/pci: export common symbols in vfio-pci

2019-03-26 Thread Alex Williamson
On Tue, 26 Mar 2019 12:37:37 + "Liu, Yi L" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, March 26, 2019 2:17 AM > > To: Liu, Yi L > > Subject: Re: [RFC v2 1/2] vfio/pci: export common symbols in vfio-pci > >

Re: [PATCH V31 10/25] PCI: Lock down BAR access when the kernel is locked down

2019-03-26 Thread Alex Williamson
On Tue, 26 Mar 2019 13:55:39 -0700 Andy Lutomirski wrote: > On Tue, Mar 26, 2019 at 11:28 AM Matthew Garrett > wrote: > > > > From: Matthew Garrett > > > > Any hardware that can potentially generate DMA has to be locked down in > > order to avoid it being possible for an attacker to modify kern

[PATCH] vfio/type1: Limit DMA mappings per container

2019-04-01 Thread Alex Williamson
concurrent mappings). This fixes CVE-2019-3882. Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 73652e21efec..7fc8fd7d4dc7 100644 ---

Re: [PATCH] vfio/type1: Limit DMA mappings per container

2019-04-01 Thread Alex Williamson
On Tue, 2 Apr 2019 10:41:15 +0800 Peter Xu wrote: > On Mon, Apr 01, 2019 at 02:16:52PM -0600, Alex Williamson wrote: > > [...] > > > @@ -1081,8 +1088,14 @@ static int vfio_dma_do_map(struct vfio_iommu *iommu, > > goto out_unlock; > > } > &

Re: [PATCH] vfio/type1: Limit DMA mappings per container

2019-04-02 Thread Alex Williamson
On Tue, 2 Apr 2019 13:18:02 +0800 Peter Xu wrote: > On Mon, Apr 01, 2019 at 10:34:13PM -0600, Alex Williamson wrote: > > On Tue, 2 Apr 2019 10:41:15 +0800 > > Peter Xu wrote: > > > > > On Mon, Apr 01, 2019 at 02:16:52P

[PATCH v2] vfio/type1: Limit DMA mappings per container

2019-04-02 Thread Alex Williamson
concurrent mappings). This fixes CVE-2019-3882. Signed-off-by: Alex Williamson --- v2: Remove unnecessary atomic, all runtime access occurs while holding vfio_iommu.lock. Change to unsigned int since we're no longer bound by the atomic_t. drivers/vfio/vfio_iommu_type1.c | 14 ++

Re: [PATCHv1 6/7] vfio/mdev: Fix aborting mdev child device removal if one fails

2019-04-02 Thread Alex Williamson
On Tue, 2 Apr 2019 19:59:58 + Parav Pandit wrote: > > -Original Message- > > From: Cornelia Huck > > Sent: Monday, April 1, 2019 12:39 PM > > To: Parav Pandit > > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel.org; > > kwankh...@nvidia.com; alex.william...@redhat.com; c...@nvidi

Re: [PATCH] vfio/pci: use correct format characters

2019-04-03 Thread Alex Williamson
On Thu, 28 Feb 2019 19:48:12 + Louis Taylor wrote: > When compiling with -Wformat, clang emits the following warnings: > > drivers/vfio/pci/vfio_pci.c:1601:5: warning: format specifies type > 'unsigned short' but the argument has type 'unsigned int' [-Wformat] >

Re: [PATCH] vfio/spapr_tce: Make symbol 'tce_iommu_driver_ops' static

2019-04-03 Thread Alex Williamson
On Wed, 20 Mar 2019 02:47:23 -0400 Wang Hai wrote: > Fixes the following sparse warning: > > drivers/vfio/vfio_iommu_spapr_tce.c:1401:36: warning: > symbol 'tce_iommu_driver_ops' was not declared. Should it be static? > > Fixes: 5ffd229c0273 ("powerpc/vfio: Implement IOMMU driver for VFIO") >

Re: [PATCH v2] vfio/type1: Limit DMA mappings per container

2019-04-03 Thread Alex Williamson
On Wed, 3 Apr 2019 15:24:26 -0400 Jerome Glisse wrote: > On Tue, Apr 02, 2019 at 10:15:38AM -0600, Alex Williamson wrote: > > Memory backed DMA mappings are accounted against a user's locked > > memory limit, including multiple mappings of the same memory. This > > ac

Re: [PATCHv1 7/7] vfio/mdev: Fix race conditions with mdev device life cycle APIs

2019-04-03 Thread Alex Williamson
On Tue, 26 Mar 2019 22:45:45 -0500 Parav Pandit wrote: > Below race condition and call trace exist with current device life cycle > sequence. > > 1. In following sequence, child devices created while removing mdev parent > device can be left out, or it may lead to race of removing half > initial

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-11 Thread Alex Williamson
On Thu, 11 Feb 2021 08:44:26 + Christoph Hellwig wrote: > On Tue, Feb 02, 2021 at 04:59:23PM -0700, Alex Williamson wrote: > > vfio-pci-igd support knows very little about the device, we're > > effectively just exposing a firmware table and some of the host bridge > &g

[PATCH] vfio/type1: Use follow_pte()

2021-02-12 Thread Alex Williamson
follow_pfn() doesn't make sure that we're using the correct page protections, get the pte with follow_pte() so that we can test protections and get the pfn from the pte. Fixes: 5cbf3264bc71 ("vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()") Signed-

[PATCH 0/3] vfio: Device memory DMA mapping improvements

2021-02-12 Thread Alex Williamson
x27;d love an outline to accomplish this same with that method. Thanks, Alex [1]https://lore.kernel.org/kvm/158947414729.12590.4345248265094886807.st...@gimli.home/ --- Alex Williamson (3): vfio: Introduce vma ops registration and notifier vfio/pci: Implement vm_ops registration

[PATCH 1/3] vfio: Introduce vma ops registration and notifier

2021-02-12 Thread Alex Williamson
register a notifier for relavant changes to the device mapping. For now we define only a notifier action for closing the device. Signed-off-by: Alex Williamson --- drivers/vfio/vfio.c | 120 ++ include/linux/vfio.h | 20 2 files

[PATCH 2/3] vfio/pci: Implement vm_ops registration

2021-02-12 Thread Alex Williamson
. The close notifier is implemented for when the device is released, rather than closing the vma to avoid possibly breaking userspace (ie. mmap -> dma map -> munmap is currently allowed and maintains the dma mapping to the device). Signed-off-by: Alex Williamson --- drivers/vfio/pci/K

[PATCH 3/3] vfio/type1: Implement vma registration and restriction

2021-02-12 Thread Alex Williamson
support. A new module option is provided to opt-out should this conflict with existing use cases. Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 192 +++ 1 file changed, 155 insertions(+), 37 deletions(-) diff --git a/drivers/vfio

Re: [PATCH] vfio/type1: Use follow_pte()

2021-02-12 Thread Alex Williamson
On Fri, 12 Feb 2021 15:08:51 -0400 Jason Gunthorpe wrote: > On Fri, Feb 12, 2021 at 12:01:50PM -0700, Alex Williamson wrote: > > follow_pfn() doesn't make sure that we're using the correct page > > protections, get the pte with follow_pte() so that we can test > &

Re: [PATCH v2 0/3] vfio/type1: Batch page pinning

2021-02-23 Thread Alex Williamson
On Fri, 19 Feb 2021 11:13:02 -0500 Daniel Jordan wrote: > v2: > - Fixed missing error unwind in patch 3 (Alex). After more thought, >the ENODEV case is fine, so it stayed the same. > > - Rebased on linux-vfio.git/next (no conflicts). > > --- > > The VFIO type1 driver is calling pin_user

[GIT PULL] VFIO updates for v5.12-rc1

2021-02-24 Thread Alex Williamson
fixes and cleanups (Max Gurtovoy) - Fixes for dirty bitmap handling, non-mdev page pinning, and improved pinned dirty scope tracking (Keqian Zhu) - Batched page pinning enhancement (Daniel Jordan) - Page access permission fix (Alex

Re: [RFC PATCH 04/10] vfio/pci: Use vfio_device_unmap_mapping_range()

2021-02-24 Thread Alex Williamson
On Mon, 22 Feb 2021 13:22:30 -0400 Jason Gunthorpe wrote: > On Mon, Feb 22, 2021 at 09:51:13AM -0700, Alex Williamson wrote: > > > + vfio_device_unmap_mapping_range(vdev->device, > > + VFIO_PCI_INDEX_TO_OFFSET(VFIO_

Re: [RFC PATCH 10/10] vfio/type1: Register device notifier

2021-02-24 Thread Alex Williamson
On Mon, 22 Feb 2021 13:55:23 -0400 Jason Gunthorpe wrote: > On Mon, Feb 22, 2021 at 09:52:32AM -0700, Alex Williamson wrote: > > Introduce a new default strict MMIO mapping mode where the vma for > > a VM_PFNMAP mapping must be backed by a vfio device. This allows > > holdi

Re: [RFC PATCH 05/10] vfio: Create a vfio_device from vma lookup

2021-02-24 Thread Alex Williamson
On Mon, 22 Feb 2021 13:29:13 -0400 Jason Gunthorpe wrote: > On Mon, Feb 22, 2021 at 09:51:25AM -0700, Alex Williamson wrote: > > > diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c > > index da212425ab30..399c42b77fbb 100644 > > +++ b/drivers/vfio/vfio.c >

Re: [PATCH v2 0/9] Introduce vfio-pci-core subsystem

2021-02-10 Thread Alex Williamson
On Wed, 10 Feb 2021 09:34:52 -0400 Jason Gunthorpe wrote: > On Wed, Feb 10, 2021 at 07:52:08AM +, Tian, Kevin wrote: > > > This subsystem framework will also ease on adding vendor specific > > > functionality to VFIO devices in the future by allowing another module > > > to provide the pci_dr

Re: [PATCH 3/3] vfio/type1: batch page pinning

2021-02-18 Thread Alex Williamson
On Wed, 3 Feb 2021 15:47:56 -0500 Daniel Jordan wrote: > Pinning one 4K page at a time is inefficient, so do it in batches of 512 > instead. This is just an optimization with no functional change > intended, and in particular the driver still calls iommu_map() with the > largest physically cont

Re: [PATCH 1/3] vfio: Introduce vma ops registration and notifier

2021-02-18 Thread Alex Williamson
On Wed, 17 Feb 2021 21:12:09 -0400 Jason Gunthorpe wrote: > On Fri, Feb 12, 2021 at 05:20:57PM -0400, Jason Gunthorpe wrote: > > On Fri, Feb 12, 2021 at 12:27:39PM -0700, Alex Williamson wrote: > > > Create an interface through vfio-core where a vfio bus driver (ex. &

Re: [PATCH 5/9] vfio-pci/zdev: remove unused vdev argument

2021-02-02 Thread Alex Williamson
On Tue, 2 Feb 2021 08:57:55 +0100 Cornelia Huck wrote: > On Mon, 1 Feb 2021 16:28:24 + > Max Gurtovoy wrote: > > > Zdev static functions does not use vdev argument. Remove it. > > s/does not use/do not use the/ > > > > > Signed-off-by: Max Gurtovoy > > --- > > drivers/vfio/pci/vfio_p

Re: [PATCH v3 0/2] vfio/iommu_type1: some fixes

2021-02-02 Thread Alex Williamson
On Fri, 22 Jan 2021 17:26:33 +0800 Keqian Zhu wrote: > v3: > - Populate bitmap unconditionally. > - Sanity check notifier when remove all domains. > > v2: > - Address suggestions from Alex. > - Remove unnecessary patches. > > > Keqian Zhu (2): > vfio/iommu_type1: Populate full dirty whe

Re: [PATCH] vfio/iommu_type1: Mantainance a counter for non_pinned_groups

2021-02-02 Thread Alex Williamson
On Mon, 25 Jan 2021 10:46:42 +0800 Keqian Zhu wrote: > With this counter, we never need to traverse all groups to update > pinned_scope of vfio_iommu. > > Suggested-by: Alex Williamson > Signed-off-by: Keqian Zhu > --- > drivers/vfio/vf

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-02 Thread Alex Williamson
On Tue, 2 Feb 2021 19:41:16 +0200 Max Gurtovoy wrote: > On 2/2/2021 6:06 PM, Cornelia Huck wrote: > > On Mon, 1 Feb 2021 11:42:30 -0700 > > Alex Williamson wrote: > > > >> On Mon, 1 Feb 2021 12:49:12 -0500 > >> Matthew Rosato wrote: > >>

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-02 Thread Alex Williamson
On Tue, 2 Feb 2021 14:50:17 -0400 Jason Gunthorpe wrote: > On Tue, Feb 02, 2021 at 10:54:55AM -0700, Alex Williamson wrote: > > > As noted previously, if we start adding ids for vfio drivers then we > > create conflicts with the native host driver. We cannot register a > &

<    5   6   7   8   9   10   11   12   13   14   >