Re: [PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-26 Thread Alex Williamson
On Thu, 2012-11-22 at 11:56 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > > ow...@vger.kernel.org] On Behalf Of Alex Williamson > > Sent: Tuesday, November 20, 2012 11:50 PM &

Re: [PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-26 Thread Alex Williamson
On Fri, 2012-11-23 at 13:02 +1100, Alexey Kardashevskiy wrote: > On 22/11/12 22:56, Sethi Varun-B16395 wrote: > > > > > >> -Original Message- > >> From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > >> ow...@vger.kernel.org] On Be

Re: [PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-26 Thread Alex Williamson
On Mon, 2012-11-26 at 08:18 -0700, Alex Williamson wrote: > On Fri, 2012-11-23 at 13:02 +1100, Alexey Kardashevskiy wrote: > > On 22/11/12 22:56, Sethi Varun-B16395 wrote: > > > > > > > > >> -Original Message- > > >> From: linux-kernel-ow

Re: [PATCH 1/2] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-26 Thread Alex Williamson
> + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Derived from original vfio_iommu_type1.c: > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. > + * Author: Alex Williamson > + */

Re: [PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-26 Thread Alex Williamson
On Tue, 2012-11-27 at 14:28 +1100, Alexey Kardashevskiy wrote: > On 27/11/12 05:04, Alex Williamson wrote: > > On Mon, 2012-11-26 at 08:18 -0700, Alex Williamson wrote: > >> On Fri, 2012-11-23 at 13:02 +1100, Alexey Kardashevskiy wrote: > >>> On 22/11/12 2

Re: [PATCH 2/2] vfio powerpc: enabled on powernv platform

2012-11-26 Thread Alex Williamson
On Fri, 2012-11-23 at 20:03 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH 1/2] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-26 Thread Alex Williamson
On Tue, 2012-11-27 at 15:06 +1100, Alexey Kardashevskiy wrote: > On 27/11/12 05:20, Alex Williamson wrote: > > On Fri, 2012-11-23 at 20:03 +1100, Alexey Kardashevskiy wrote: > >> VFIO implements platform independent stuff such as > >> a PCI driver, BAR access (via read

Re: [PATCH 1/2] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-26 Thread Alex Williamson
On Tue, 2012-11-27 at 15:58 +1100, Alexey Kardashevskiy wrote: > On 27/11/12 15:29, Alex Williamson wrote: > > On Tue, 2012-11-27 at 15:06 +1100, Alexey Kardashevskiy wrote: > >> On 27/11/12 05:20, Alex Williamson wrote: > >>> On Fri, 2012-11-23 at 20:03 +11

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-28 Thread Alex Williamson
modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Derived from original vfio_iommu_type1.c: > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. > + * Author: Alex Williamson > + */

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-11-28 Thread Alex Williamson
On Wed, 2012-11-28 at 18:18 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-11-28 Thread Alex Williamson
On Thu, 2012-11-29 at 14:53 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

[PATCH] kvm: Fix user memslot overlap check

2012-11-29 Thread Alex Williamson
s the added benefit of terminating early when we hit the first empty slot, and skip comparison to private slots. Signed-off-by: Alex Williamson Cc: sta...@vger.kernel.org --- virt/kvm/kvm_main.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/virt/kvm/kvm_main.c b

[PATCH v2] kvm: Fix user memslot overlap check

2012-11-29 Thread Alex Williamson
s the added benefit of terminating early when we hit the first empty slot, and skip comparison to private slots. Signed-off-by: Alex Williamson Cc: sta...@vger.kernel.org --- v2: Remove unused variable i virt/kvm/kvm_main.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-)

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-17 Thread Alex Williamson
On Sun, 2013-03-17 at 08:33 -0600, Myron Stowe wrote: > On Sun, 2013-03-17 at 07:38 -0600, Alex Williamson wrote: > > On Sat, 2013-03-16 at 22:36 -0700, Greg KH wrote: > > > On Sat, Mar 16, 2013 at 10:11:22PM -0600, Alex Williamson wrote: > > > > On Sat, 2013-03-16

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-18 Thread Alex Williamson
On Sun, 2013-03-17 at 15:00 +0100, Kay Sievers wrote: > On Sun, Mar 17, 2013 at 2:38 PM, Alex Williamson > wrote: > > I'm assuming that the device only breaks because udevadm is dumping the > > full I/O port register space of the device and that if an actual driver >

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-18 Thread Alex Williamson
On Mon, 2013-03-18 at 10:50 -0400, Don Dutile wrote: > On 03/17/2013 06:28 PM, Alex Williamson wrote: > > On Sun, 2013-03-17 at 08:33 -0600, Myron Stowe wrote: > >> On Sun, 2013-03-17 at 07:38 -0600, Alex Williamson wrote: > >>> On Sat, 2013-03-16 at 22:36 -0700, Gre

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-18 Thread Alex Williamson
On Mon, 2013-03-18 at 09:41 -0700, Greg KH wrote: > On Mon, Mar 18, 2013 at 10:24:40AM -0600, Alex Williamson wrote: > > On Sun, 2013-03-17 at 15:00 +0100, Kay Sievers wrote: > > > On Sun, Mar 17, 2013 at 2:38 PM, Alex Williamson > > > wrote: > > > > I

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-18 Thread Alex Williamson
On Mon, 2013-03-18 at 18:20 +0100, Bjørn Mork wrote: > Alex Williamson writes: > > > At least for KVM the kernel fix is the addition of the vfio driver which > > gives us a non-sysfs way to do this. If this problem was found a few > > years later and we were ready to mak

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-18 Thread Alex Williamson
On Mon, 2013-03-18 at 19:25 +0100, Bjørn Mork wrote: > Alex Williamson wrote: > > >On Mon, 2013-03-18 at 18:20 +0100, Bjørn Mork wrote: > >> Alex Williamson writes: > >> > >> > At least for KVM the kernel fix is the addition of the vfio driver >

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-03-18 Thread Alex Williamson
On Mon, 2013-03-18 at 14:53 +1100, Alexey Kardashevskiy wrote: > On 20/02/13 15:33, Alex Williamson wrote: > > On Wed, 2013-02-20 at 15:20 +1100, Alexey Kardashevskiy wrote: > >> On 20/02/13 14:47, Alex Williamson wrote: > >>> On Wed, 2013-02-20 at 13:31 +11

[GIT PULL] vfio fix for 3.9-rc4

2013-03-19 Thread Alex Williamson
Hi Linus, Please pull for the next rc. Thanks! The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9: Linux 3.9-rc2 (2013-03-10 16:54:19 -0700) are available in the git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v3.9-rc4 for you to fetch chang

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-19 Thread Alex Williamson
On Tue, 2013-03-19 at 20:08 -0700, H. Peter Anvin wrote: > On 03/19/2013 07:48 PM, H. Peter Anvin wrote: > > On 03/19/2013 06:28 PM, Matthew Garrett wrote: > >> Mm. The question is whether we can reliably determine the ranges a > device should be able to access without having to trust userspace > (

Re: [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL

2013-03-19 Thread Alex Williamson
On Tue, 2013-03-19 at 20:22 -0700, H. Peter Anvin wrote: > On 03/19/2013 08:18 PM, Alex Williamson wrote: > >> > >> The "pinning" process needs to involve a call to the kernel to process > >> the page for DMA (pinning the page and opening it in the iommu) a

Re: [PATCH] pciehp: Add pciehp_surprise module option

2013-03-20 Thread Alex Williamson
On Wed, 2013-03-20 at 15:02 +0100, Takashi Iwai wrote: > We encountered a problem that on some HP machines the Realtek PCI-e > card reader device appears only when you inserted a card before the > cold boot. While debugging, it turned out that the device is actually > handled via PCI-e hotplug in

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
spapr"); > > return 0; > > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/drivers/vfio/vfio_iommu_spapr_tce.c > new file mode 100644 > index 000..22ba0b5 > --- /dev/null > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -0,0 +1,365 @@ &g

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
On Thu, 2013-03-21 at 11:57 +1100, Alexey Kardashevskiy wrote: > On 21/03/13 07:45, Alex Williamson wrote: > > On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: > >> VFIO implements platform independent stuff such as > >> a PCI driver, BAR access (via read

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
On Thu, 2013-03-21 at 12:55 +1100, David Gibson wrote: > On Wed, Mar 20, 2013 at 02:45:24PM -0600, Alex Williamson wrote: > > On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: > > > VFIO implements platform independent stuff such as > > > a PCI driver, BAR

Re: [PATCH] iommu: add a function to find an iommu group by id

2013-03-21 Thread Alex Williamson
On Thu, 2013-03-21 at 18:48 +1100, Alexey Kardashevskiy wrote: > As IOMMU groups are exposed to the user space by their numbers, > the user space can use them in various kernel APIs so the kernel > might need an API to find a group by its ID. > > As an example, QEMU VFIO on PPC64 platform needs it

Re: DMAR faults from unrelated device when vfio is used

2013-02-04 Thread Alex Williamson
On Mon, 2013-02-04 at 11:10 +0100, David Gstir wrote: > Hi! > > I get the following error messages over and over again when using vfio > in qemu-kvm: > > [ 1692.021403] dmar: DMAR:[DMA Read] Request device [00:02.0] fault addr > 1a45aa9000 > [ 1692.021403] DMAR:[fault reason 12] non-zero reserv

Re: [PATCH 50/62] vfio: convert to idr_alloc()

2013-02-04 Thread Alex Williamson
On Sat, 2013-02-02 at 17:20 -0800, Tejun Heo wrote: > Convert to the much saner new idr interface. > > Only compile tested. > > Signed-off-by: Tejun Heo > Cc: Alex Williamson > Cc: k...@vger.kernel.org > --- > This patch depends on an earlier idr changes and I think

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Create eventfd per vfio device assigned to a guest and register an > event handler > > - This fd is passed to the vfio_pci driver through the SET_IRQ ioctl > > - When the device encounters an error

Re: [PATCH v3 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signaled > when > an error occurs in the vfio_pci_device > > - Register pci_error_handler for the vfio_pci driver > > - When the device en

Re: [PATCH v3 1/3] VFIO: Wrapper for getting reference to vfio_device from device

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Added vfio_device_get_from_dev() as wrapper to get > reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from > vfio_device. > > Signed-o

Re: [PATCH v3 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either >

Re: [PATCH] intel_irq_remapping: Clean up x2apic optout security warning mess

2013-02-04 Thread Alex Williamson
On Fri, 2013-02-01 at 14:57 -0800, Andy Lutomirski wrote: > Current kernels print this on my Dell server: > >[ cut here ] >WARNING: at drivers/iommu/intel_irq_remapping.c:542 >intel_enable_irq_remapping+0x7b/0x27e() >Hardware name: PowerEdge R620 >Your B

Re: [PATCH] intel_irq_remapping: Clean up x2apic optout security warning mess

2013-02-04 Thread Alex Williamson
On Mon, 2013-02-04 at 11:19 -0800, Andy Lutomirski wrote: > On Mon, Feb 4, 2013 at 11:04 AM, Alex Williamson > wrote: > > On Fri, 2013-02-01 at 14:57 -0800, Andy Lutomirski wrote: > >> Current kernels print this on my Dell server: > >> > >>[

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Alex Williamson
gt; To: Pandarathil, Vijaymohan R > > Cc: Blue Swirl; Alex Williamson; Bjorn Helgaas; Ortiz, Lance E; > > k...@vger.kernel.org; qemu-de...@nongnu.org; linux-...@vger.kernel.org; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AE

Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Alex Williamson
On Tue, 2013-02-05 at 15:42 +0200, Gleb Natapov wrote: > On Tue, Feb 05, 2013 at 06:37:35AM -0700, Alex Williamson wrote: > > On Tue, 2013-02-05 at 12:05 +, Pandarathil, Vijaymohan R wrote: > > > > > > > -Original Message- > > > > From: lin

Re: DMAR faults from unrelated device when vfio is used

2013-02-05 Thread Alex Williamson
On Tue, 2013-02-05 at 14:31 +0100, David Gstir wrote: > Am Montag, den 04.02.2013, 08:49 -0700 schrieb Alex Williamson: > > > Can you clarify what you mean by assign? Are you actually assigning the > > root ports to the qemu guest (1c.0 & 1c.6)? vfio will require they be

Re: DMAR faults from unrelated device when vfio is used

2013-02-05 Thread Alex Williamson
On Tue, 2013-02-05 at 08:37 -0700, Alex Williamson wrote: > On Tue, 2013-02-05 at 14:31 +0100, David Gstir wrote: > > Am Montag, den 04.02.2013, 08:49 -0700 schrieb Alex Williamson: > > > > > Can you clarify what you mean by assign? Are you actually assigning the >

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 19:09 +0100, Richard Weinberger wrote: > Hi, > > Am Tue, 05 Feb 2013 13:36:53 -0700 > schrieb Alex Williamson : > > > Ugh, the infamous and useless error 10. It could be anything. > > > I've got a system with onboard usb3, let me see w

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 21:25 +0100, Richard Weinberger wrote: > Hi, > > Am Wed, 06 Feb 2013 11:47:20 -0700 > schrieb Alex Williamson : > > Does the card work with pci-assign or are both broken? > > It works with pci-assign. :-\ When you tested this, did you detach the g

Re: DMAR faults from unrelated device when vfio is used

2013-02-07 Thread Alex Williamson
On Thu, 2013-02-07 at 23:23 +0100, Richard Weinberger wrote: > Hi, > > Am Wed, 06 Feb 2013 15:45:37 -0700 > schrieb Alex Williamson : > > > On Wed, 2013-02-06 at 21:25 +0100, Richard Weinberger wrote: > > > Hi, > > > > > > Am Wed, 06 Feb 2

Re: [PATCH 1/2] vfio powerpc: enabled on powernv platform

2013-02-11 Thread Alex Williamson
On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

Re: [PATCH 2/2] vfio powerpc: implemented IOMMU driver for VFIO

2013-02-11 Thread Alex Williamson
ogram is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Derived from original vfio_iommu_type1.c: > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved

Re: [PATCH 1/2] vfio powerpc: enabled on powernv platform

2013-02-11 Thread Alex Williamson
On Tue, 2013-02-12 at 10:19 +1100, Alexey Kardashevskiy wrote: > On 12/02/13 09:16, Alex Williamson wrote: > > On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > >> @@ -707,11 +709,39 @@ struct iommu_table *iommu_init_table(struct > >> iommu_table *tbl,

Re: [PATCH 2/2] vfio powerpc: implemented IOMMU driver for VFIO

2013-02-11 Thread Alex Williamson
On Tue, 2013-02-12 at 10:45 +1100, Alexey Kardashevskiy wrote: > On 12/02/13 09:17, Alex Williamson wrote: > > On Mon, 2013-02-11 at 22:54 +1100, Alexey Kardashevskiy wrote: > >> VFIO implements platform independent stuff such as > >> a PCI driver, BAR access (via read

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-11 Thread Alex Williamson
On Tue, 2013-02-12 at 15:06 +1100, Alexey Kardashevskiy wrote: > Having this patch in a tree, adding new nodes in sysfs > for IOMMU groups is going to be easier. > > The first candidate for this change is a "dma-window-size" > property which tells a size of a DMA window of the specific > IOMMU gro

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-12 Thread Alex Williamson
On Wed, 2013-02-13 at 01:42 +1100, Alexey Kardashevskiy wrote: > On 12/02/13 16:07, Alex Williamson wrote: > > On Tue, 2013-02-12 at 15:06 +1100, Alexey Kardashevskiy wrote: > >> Having this patch in a tree, adding new nodes in sysfs > >> for IOMMU groups is going to be

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-03 Thread Alex Williamson
On Tue, 2013-04-02 at 18:18 +0200, Joerg Roedel wrote: > Cc'ing Alex Williamson > > Alex, can you please review the iommu-group part of this patch? Sure, it looks pretty reasonable. AIUI, all PCI devices are below some kind of host bridge that is either new and supports partition

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-04 Thread Alex Williamson
On Thu, 2013-04-04 at 13:00 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, April 03, 2013 11:32 PM > > To: Joerg Roedel > > Cc: Sethi Varun-B16395; Yoder Stuart-

Re: [PATCH 5/5 v11] iommu/fsl: Freescale PAMU driver and iommu implementation.

2013-04-04 Thread Alex Williamson
On Thu, 2013-04-04 at 16:35 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, April 04, 2013 8:52 PM > > To: Sethi Varun-B16395 > > Cc: Joerg Roedel; Yoder Stuart-

Re: [PATCH v2 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-01-29 Thread Alex Williamson
On Mon, 2013-01-28 at 12:31 -0700, Alex Williamson wrote: > On Mon, 2013-01-28 at 09:54 +, Pandarathil, Vijaymohan R wrote: > > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signalled > > when > > an error occurs in the vfio_pci_device &g

[PATCH v2] vfio-pci: Add support for VGA region access

2013-01-29 Thread Alex Williamson
necessary. Signed-off-by: Alex Williamson --- v2: Revise the region access based on VFIO AER discussion. We don't need to add flags for everything or over-engineer generic legacy resources. GET_REGION_INFO.num_regions should return the the highest index, as the documentation specifies,

Re: [PATCH] x86, x2apic: Only WARN on broken BIOSes inside a virtual guest

2013-01-31 Thread Alex Williamson
On Thu, 2013-01-31 at 22:00 +0200, Gleb Natapov wrote: > On Thu, Jan 31, 2013 at 02:34:27PM -0500, Don Zickus wrote: > > On Thu, Jan 31, 2013 at 08:52:00PM +0200, Gleb Natapov wrote: > > > > http://www.invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf > > > > > > > >

[PATCH 0/2] kvm: IOMMU read-only mapping support

2013-01-24 Thread Alex Williamson
A couple patches to make KVM IOMMU support honor read-only mappings. This causes an un-map, re-map when the read-only flag changes and makes use of it when setting IOMMU attributes. Thanks, Alex --- Alex Williamson (2): kvm: Force IOMMU remapping on memory slot read-only flag changes

[PATCH 1/2] kvm: Force IOMMU remapping on memory slot read-only flag changes

2013-01-24 Thread Alex Williamson
: Alex Williamson --- virt/kvm/kvm_main.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5e709eb..3fec2cd 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -731,6 +731,7 @@ int

[PATCH 2/2] kvm: Obey read-only mappings in iommu

2013-01-24 Thread Alex Williamson
We've been ignoring read-only mappings and programming everything into the iommu as read-write. Fix this to only include the write access flag when read-only is not set. Signed-off-by: Alex Williamson --- virt/kvm/iommu.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [PATCH] kvm: Fix irqfd resampler list walk

2013-01-28 Thread Alex Williamson
On Mon, 2012-12-10 at 18:16 -0200, Marcelo Tosatti wrote: > On Thu, Dec 06, 2012 at 02:44:59PM -0700, Alex Williamson wrote: > > Typo for the next pointer means we're walking random data here. > > > > Signed-off-by: Alex Williamson > > Cc: sta...@vger.kernel.org

Re: [PATCH 0/2] kvm: IOMMU read-only mapping support

2013-01-28 Thread Alex Williamson
On Mon, 2013-01-28 at 21:25 +0900, Takuya Yoshikawa wrote: > On Mon, 28 Jan 2013 12:59:03 +0200 > Gleb Natapov wrote: > > > > It sets spte based on the old value that means the readonly flag check > > > is missed. We need to call kvm_arch_flush_shadow_all under this case. > > Why not just disallo

Re: [PATCH v2 1/3] VFIO: Wrappers for getting/putting reference to vfio_device

2013-01-28 Thread Alex Williamson
On Mon, 2013-01-28 at 09:54 +, Pandarathil, Vijaymohan R wrote: > - Added vfio_device_get_from_vdev(), vfio_device_put_vdev() > as wrappers to get/put reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from >

Re: [PATCH v2 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-01-28 Thread Alex Williamson
On Mon, 2013-01-28 at 09:54 +, Pandarathil, Vijaymohan R wrote: > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signalled > when > an error occurs in the vfio_pci_device > > - Register pci_error_handler for the vfio_pci driver > > - When the device e

Re: [PATCH] drivers/vfio: remove depends on CONFIG_EXPERIMENTAL

2013-02-24 Thread Alex Williamson
> Signed-off-by: Kees Cook > Cc: Alex Williamson > --- > drivers/vfio/pci/Kconfig |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig > index e84300b..c41b01e 100644 > --- a/drivers/vfio/pci/K

igb: NULL pointer dereference

2013-02-24 Thread Alex Williamson
On Linus' current tree I get the the oops below. I realize I'm still using the deprecated max_vfs= module option, but this isn't a very compatible or friendly migration path. I'm using an 82576 PF as an interface for connecting an iscsi root disk and I also use the VF off this interface for misc

[GIT PULL] VFIO updates for v3.9-rc1

2013-02-24 Thread Alex Williamson
capability support - Cleans up read/write access functions - Fix Removal test to properly wait until devices are unused - Enable pcieport driver usage for non-accessible devices w/in groups - Extensions for PCI VGA support Alex

Re: [PATCH v5 1/3] VFIO: Wrapper for getting reference to vfio_device from device

2013-02-25 Thread Alex Williamson
On Sat, 2013-02-23 at 23:25 -0600, Vijay Mohan Pandarathil wrote: > - Added vfio_device_get_from_dev() as wrapper to get > reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from > vfio_device. > > Signed-off

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-18 Thread Alex Williamson
On Mon, 2013-02-18 at 17:15 +1100, Alexey Kardashevskiy wrote: > On 13/02/13 04:15, Alex Williamson wrote: > > On Wed, 2013-02-13 at 01:42 +1100, Alexey Kardashevskiy wrote: > >> On 12/02/13 16:07, Alex Williamson wrote: > >>> On Tue, 2013-02-12 at 15:06 +11

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alex Williamson
On Tue, 2013-02-19 at 16:48 +1100, Alexey Kardashevskiy wrote: > On 19/02/13 16:24, Alex Williamson wrote: > > On Mon, 2013-02-18 at 17:15 +1100, Alexey Kardashevskiy wrote: > >> On 13/02/13 04:15, Alex Williamson wrote: > >>> On Wed, 2013-02-13 at 01:42 +11

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alex Williamson
On Tue, 2013-02-19 at 18:38 +1100, David Gibson wrote: > On Mon, Feb 18, 2013 at 10:24:00PM -0700, Alex Williamson wrote: > > On Mon, 2013-02-18 at 17:15 +1100, Alexey Kardashevskiy wrote: > > > On 13/02/13 04:15, Alex Williamson wrote: > > > > On Wed, 201

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alex Williamson
On Wed, 2013-02-20 at 13:31 +1100, Alexey Kardashevskiy wrote: > On 20/02/13 07:11, Alex Williamson wrote: > > On Tue, 2013-02-19 at 18:38 +1100, David Gibson wrote: > >> On Mon, Feb 18, 2013 at 10:24:00PM -0700, Alex Williamson wrote: > >>> On Mon, 2013-02-18 at 17:

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-19 Thread Alex Williamson
On Wed, 2013-02-20 at 15:20 +1100, Alexey Kardashevskiy wrote: > On 20/02/13 14:47, Alex Williamson wrote: > > On Wed, 2013-02-20 at 13:31 +1100, Alexey Kardashevskiy wrote: > >> On 20/02/13 07:11, Alex Williamson wrote: > >>> On Tue, 2013-02-19 at 18:38 +1100, Dav

Re: [PATCH] iommu: making IOMMU sysfs nodes API public

2013-02-21 Thread Alex Williamson
On Fri, 2013-02-22 at 11:04 +1100, David Gibson wrote: > On Tue, Feb 19, 2013 at 01:11:51PM -0700, Alex Williamson wrote: > > On Tue, 2013-02-19 at 18:38 +1100, David Gibson wrote: > > > On Mon, Feb 18, 2013 at 10:24:00PM -0700, Alex Williamson wrote: > > > > On

[PATCH] igb: Fix null pointer dereference

2013-03-12 Thread Alex Williamson
pointless, to set vfs_allocated_count separate from vf_data, but limiting max_vfs is enough to avoid the null pointer. Signed-off-by: Alex Williamson --- drivers/net/ethernet/intel/igb/igb_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/i

Re: [PATCH v7 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-03-12 Thread Alex Williamson
On Sat, 2013-03-09 at 01:52 -0600, Vijay Mohan Pandarathil wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either > th

[PATCH] igb: SR-IOV init reordering

2013-03-12 Thread Alex Williamson
dering. Signed-off-by: Alex Williamson --- drivers/net/ethernet/intel/igb/igb_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index d5b8289..ac65c39 100644 --- a/drivers/net/eth

Re: [PATCH] vfio: include for kmalloc

2013-03-15 Thread Alex Williamson
On Thu, 2013-03-14 at 22:56 +0100, Arnd Bergmann wrote: > The vfio drivers call kmalloc or kzalloc, but do not > include , which causes build errors on > ARM. > > Signed-off-by: Arnd Bergmann > Cc: Alex Williamson > Cc: k...@vger.kernel.org > --- > Please apply for

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-16 Thread Alex Williamson
On Sat, 2013-03-16 at 18:03 -0700, Greg KH wrote: > On Sat, Mar 16, 2013 at 05:50:53PM -0600, Myron Stowe wrote: > > On Sat, 2013-03-16 at 15:11 -0700, Greg KH wrote: > > > On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: > > > > Sysfs includes entries to memory that backs a PCI device'

Re: [PATCH] udevadm-info: Don't access sysfs 'resource' files

2013-03-17 Thread Alex Williamson
On Sat, 2013-03-16 at 22:36 -0700, Greg KH wrote: > On Sat, Mar 16, 2013 at 10:11:22PM -0600, Alex Williamson wrote: > > On Sat, 2013-03-16 at 18:03 -0700, Greg KH wrote: > > > On Sat, Mar 16, 2013 at 05:50:53PM -0600, Myron Stowe wrote: > > > > On Sat, 2013-03-16

[PATCH 0/2] VFIO PCI INTx fixes

2012-10-04 Thread Alex Williamson
These patches are now available in my next tree to fix a couple issues with PCI INTx. Thanks, Alex --- Alex Williamson (2): vfio: Fix PCI INTx disable consistency vfio: Move PCI INTx eventfd setting earlier drivers/vfio/pci/vfio_pci_intrs.c | 18 +++--- 1 file

[PATCH 1/2] vfio: Move PCI INTx eventfd setting earlier

2012-10-04 Thread Alex Williamson
-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_intrs.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index d8dedc7..c8139a5 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci

[PATCH 2/2] vfio: Fix PCI INTx disable consistency

2012-10-04 Thread Alex Williamson
oting a qemu guest), the hardware has DisINTx+, but the management of INTx thinks it's enabled, making it impossible to actually clear DisINTx. Fix this by updating the handler state when INTx is re-enabled. Cc: sta...@vger.kernel.org Signed-off-by: Alex Williamson --- driver

[GIT PULL (PATCH 0/4) v2] VFIO driver for v3.6

2012-07-26 Thread Alex Williamson
On Wed, 2012-07-25 at 08:53 -0600, Alex Williamson wrote: > Hi Linus, > > This series includes the VFIO userspace driver interface for the > 3.6 kernel merge window. This driver is intended to provide a > secure interface for device access using IOMMU protection for >

Re: linux-next: Tree for July 26 (vfio)

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 08:43 -0700, Randy Dunlap wrote: > On 07/25/2012 10:04 PM, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20120725: > > > > > > > on x86_64: > > CC [M] drivers/vfio/pci/vfio_pci_intrs.o > drivers/vfio/pci/vfio_pci_intrs.c: In function 'virqfd_enable

Re: more interrupts (lower performance) in bare-metal compared with running VM

2012-07-27 Thread Alex Williamson
On Fri, 2012-07-27 at 22:09 -0500, sheng qiu wrote: > Hi all, > > i am comparing network throughput performance under bare-metal case > with that running VM with assigned-device (assigned NIC). i have two > physical machines (each has a 10Gbit NIC), one is used as remote > server (run netserver) a

Re: [PATCH v7 1/2] kvm: Extend irqfd to support level interrupts

2012-07-30 Thread Alex Williamson
On Sun, 2012-07-29 at 18:01 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 24, 2012 at 02:43:14PM -0600, Alex Williamson wrote: > > In order to inject a level interrupt from an external source using an > > irqfd, we need to allocate a new irq_source_id. This allows us to > >

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

2012-07-30 Thread Alex Williamson
On Sun, 2012-07-29 at 17:54 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 24, 2012 at 02:43:22PM -0600, Alex Williamson wrote: > > This new ioctl enables an eventfd to be triggered when an EOI is > > written for a specified irqchip pin. The first user of this will > &g

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-30 Thread Alex Williamson
On Fri, 2012-07-27 at 15:32 +1000, Paul Mackerras wrote: > On Wed, Jul 25, 2012 at 08:53:06AM -0600, Alex Williamson wrote: > > Hi Linus, > > > > This series includes the VFIO userspace driver interface for the > > 3.6 kernel merge window. This driver is inten

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

2012-07-30 Thread Alex Williamson
On Tue, 2012-07-31 at 03:01 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2012 at 10:22:10AM -0600, Alex Williamson wrote: > > On Sun, 2012-07-29 at 17:54 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 24, 2012 at 02:43:22PM -0600, Alex Williamson wrote: > > >

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

2012-07-30 Thread Alex Williamson
On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2012 at 06:26:31PM -0600, Alex Williamson wrote: > > On Tue, 2012-07-31 at 03:01 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 30, 2012 at 10:22:10AM -0600, Alex Williamson wrote: > > >

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: > On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson > wrote: > > > > I'm pretty anxious to find out as well. Linus, ping, any thoughts on > > including this in 3.6? Thanks, > > I just pulled it, but th

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Tue, 2012-07-31 at 08:53 -0600, Alex Williamson wrote: > On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: > > On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson > > wrote: > > > > > > I'm pretty anxious to find out as well. Linus, ping, any t

[PATCH] vfio: Fix virqfd release race

2012-09-21 Thread Alex Williamson
nding releases are completed. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_intrs.c | 76 +++-- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index 211a492..d8

[PATCH v11] kvm: Add resampling irqfds for level triggered interrupts

2012-09-21 Thread Alex Williamson
new one for this interface. Signed-off-by: Alex Williamson --- Taking Michael's idea to create our own lock for resampling irqfds simplifies things significantly. We can now avoid any nesting with the irqfds.lock spinlock so we can call everything we need to directly. Documentation/virtua

[GIT PULL] VFIO fixes for 3.6

2012-09-24 Thread Alex Williamson
for you to fetch changes up to b68e7fa879cd3b1126a7c455d9da1b70299efc0d: vfio: Fix virqfd release race (2012-09-21 10:48:28 -0600) VFIO doc update and virqfd race fix ---

Re: linux-next: Tree for Sept 24 (iommu)

2012-09-24 Thread Alex Williamson
;s a patch to get it past this. It still doesn't fully build, but the rest isn't iommu related. Thanks, Alex commit 6955e1f06cb20ddd25665984c330b945443cce36 Author: Alex Williamson Date: Mon Sep 24 21:13:52 2012 -0600 iommu: inline iommu group stub functions Signed-o

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
ils down to this commit: > > 9dcd61303af862c279df86aa97fde7ce371be774 is the first bad commit > commit 9dcd61303af862c279df86aa97fde7ce371be774 > Author: Alex Williamson > Date: Wed May 30 14:19:07 2012 -0600 > > amd_iommu: Support IOMMU groups > > Add IOMMU group support to

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 12:32 -0600, Alex Williamson wrote: > On Mon, 2012-09-24 at 21:03 +0200, Florian Dazinger wrote: > > Hi, > > I think I've found a regression, which causes an early boot crash, I > > appended the kernel output via jpg file, since I do not have a

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 20:54 +0200, Florian Dazinger wrote: > Am Tue, 25 Sep 2012 12:32:50 -0600 > schrieb Alex Williamson : > > > On Mon, 2012-09-24 at 21:03 +0200, Florian Dazinger wrote: > > > Hi, > > > I think I've found a regression, which causes an

Re: 3.6-rc7 boot crash + bisection

2012-09-25 Thread Alex Williamson
On Wed, 2012-09-26 at 01:01 +0200, Florian Dazinger wrote: > Am Tue, 25 Sep 2012 13:43:46 -0600 > schrieb Alex Williamson : > > > On Tue, 2012-09-25 at 20:54 +0200, Florian Dazinger wrote: > > > Am Tue, 25 Sep 2012 12:32:50 -0600 > > > schrieb Alex Williamson :

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 15:20 +0200, Roedel, Joerg wrote: > On Tue, Sep 25, 2012 at 01:43:46PM -0600, Alex Williamson wrote: > > Joerg, any thoughts on a quirk for this? Unfortunately we can't just > > skip IOMMU groups when an alias is broken because it puts the other > >

  1   2   3   4   5   6   7   8   9   10   >