Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 16:43 +0200, Roedel, Joerg wrote: > Florian, > > On Wed, Sep 26, 2012 at 01:01:54AM +0200, Florian Dazinger wrote: > > you're right, either "amd_iommu=off" or removing the audio card makes > > the failure disappear. I will test the new BIOS rev. tomorrow. > > Can you please

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 17:04 +0200, Roedel, Joerg wrote: > On Wed, Sep 26, 2012 at 08:52:01AM -0600, Alex Williamson wrote: > > Assuming this works, it may be ok as a 3.7 fix, but if there was > > actually more than one device behind the alias we'd expose them as > > separ

Re: 3.6-rc7 boot crash + bisection

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 17:10 +0200, Roedel, Joerg wrote: > On Wed, Sep 26, 2012 at 08:35:59AM -0600, Alex Williamson wrote: > > Hmm, that throws a kink in iommu groups. So perhaps we need to make an > > alias interface to iommu groups. Seems like this could just be an extra &

Re: [PATCH v2] i915: Update VGA arbiter support for newer devices

2013-08-26 Thread Alex Williamson
On Mon, 2013-08-26 at 15:23 +0300, Ville Syrjälä wrote: > On Sat, Aug 24, 2013 at 08:53:40AM -0600, Alex Williamson wrote: > > This is intended to add VGA arbiter support for Intel HD graphics on > > Core processors. The old GMCH registers no longer exist, so even > > though

[PATCH] vfio-pci: Test for extended config space

2013-08-28 Thread Alex Williamson
ff-by: Alex Williamson --- drivers/vfio/pci/vfio_pci_config.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c index 8477963..bcf3624 100644 --- a/drivers/vfio/pci/vfio_pci_config.c +++ b/dr

[PATCH v3] i915: Update VGA arbiter support for newer devices

2013-08-28 Thread Alex Williamson
ow that we don't participate in VGA memory arbitration. We also add a hook on unload to re-enable memory and reinstate VGA memory arbitration. Signed-off-by: Alex Williamson --- v3: Use explicit LEGACY_IO | LEGACY_MEM when restoring rather than LEGACY_MASK, per Ville's comments.

Re: [PATCH] vfio, iommu: Fixed interaction of VFIO_IOMMU_MAP_DMA with IOMMU address limits

2013-08-28 Thread Alex Williamson
rn NULL for addresses beyond what > the > IOMMU can handle. This in turn causes the ioctl call to fail in iommu_map and > (correctly) return EFAULT to the user with a helpful warning message in the > kernel > log. > > Signed-off-by: Julian Stecklina Acked-by: Alex Williamson

[PATCH 4/4] kvm: Add VFIO device for handling IOMMU cache coherency

2013-10-01 Thread Alex Williamson
of the domain as noted in the TODO. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/devices/vfio.txt | 22 ++ arch/x86/kvm/Makefile |2 include/linux/kvm_host.h |1 include/uapi/linux/kvm.h |

[PATCH 2/4] kvm/x86: Convert iommu_flags to iommu_noncoherent

2013-10-01 Thread Alex Williamson
Default to operating in coherent mode. This simplifies the logic when we switch to a model of registering and unregistering noncoherent I/O with KVM. Signed-off-by: Alex Williamson --- arch/ia64/include/asm/kvm_host.h |2 +- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/vmx.c

[PATCH 0/4] KVM noncoherent DMA registration and VFIO pseudo device

2013-10-01 Thread Alex Williamson
to a group and arch callbacks to make use of that information is all that you'll need to add for POWER. Thanks, Alex --- Alex Williamson (4): kvm: Destroy & free KVM devices on release kvm/x86: Convert iommu_flags to iommu_noncoherent kvm: Create non-coherent DMA

[PATCH 1/4] kvm: Destroy & free KVM devices on release

2013-10-01 Thread Alex Williamson
Finally, add a missing kfree for the device creation error path. Signed-off-by: Alex Williamson --- arch/powerpc/kvm/book3s_xics.c |1 - virt/kvm/kvm_main.c|5 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kv

[PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-01 Thread Alex Williamson
: Alex Williamson --- arch/x86/include/asm/kvm_host.h |2 ++ arch/x86/kvm/vmx.c |3 +-- arch/x86/kvm/x86.c | 21 +++-- include/linux/kvm_host.h| 19 +++ virt/kvm/iommu.c|6 ++ 5 files changed, 47

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Alex Williamson
On Wed, 2013-10-02 at 02:53 +0100, Christoffer Dall wrote: > On Tue, Oct 01, 2013 at 05:02:44PM -0500, Kim Phillips wrote: > > On Tue, 1 Oct 2013 13:00:54 -0700 > > Greg Kroah-Hartman wrote: > > > > > On Tue, Oct 01, 2013 at 01:38:31PM -0500, Kim Phillips wrote: > > > > Hi, > > > > > > > > Santo

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-02 Thread Alex Williamson
On Wed, 2013-10-02 at 16:14 +0100, Christoffer Dall wrote: > On Tue, Oct 01, 2013 at 08:35:56PM -0600, Alex Williamson wrote: > > On Wed, 2013-10-02 at 02:53 +0100, Christoffer Dall wrote: > > > On Tue, Oct 01, 2013 at 05:02:44PM -0500, Kim Phillips wrote: > > > > On

Re: [PATCH 1/1] virt/kvm/iommu.c: Add leading zeros to device's BDF notation in debug messages

2013-10-02 Thread Alex Williamson
On Wed, 2013-10-02 at 13:35 +0300, Gleb Natapov wrote: > On Wed, Oct 02, 2013 at 12:23:26PM +0200, Andre Richter wrote: > > When KVM (de)assigns PCI(e) devices to VMs, a debug message is printed > > including the BDF notation of the respective device. Currently, the BDF > > notation does not have t

Re: [PATCH 1/1] virt/kvm/iommu.c: Add leading zeros to device's BDF notation in debug messages

2013-10-02 Thread Alex Williamson
On Wed, 2013-10-02 at 21:08 +0200, Andre Richter wrote: > 2013/10/2 Alex Williamson : > > On Wed, 2013-10-02 at 13:35 +0300, Gleb Natapov wrote: > >> On Wed, Oct 02, 2013 at 12:23:26PM +0200, Andre Richter wrote: > >> > When KVM (de)assigns PCI(e) devices to V

[PATCH v2 4/4] kvm: Add VFIO device for handling IOMMU cache coherency

2013-10-02 Thread Alex Williamson
of the domain as noted in the TODO. Signed-off-by: Alex Williamson --- v2: Patches 1-3 of v1 series remain the same, not resent - Fix cast warning from (int32_t *)u64 from get_user calls - Add a Kconfig variable to protect kvm_vfio_ops for archs not (yet) building virt/kvm/vfio.c Both of

Re: [PATCH v2 4/4] kvm: Add VFIO device for handling IOMMU cache coherency

2013-10-03 Thread Alex Williamson
On Wed, 2013-10-02 at 20:55 -0600, Alex Williamson wrote: > So far we've succeeded at making KVM and VFIO mostly unaware of each > other, but there's an important point where that breaks down. Intel > VT-d hardware may or may not support snoop control. When snoop > contr

Re: [PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 20:02 +1000, Alexey Kardashevskiy wrote: > On 10/02/2013 06:15 AM, Alex Williamson wrote: > > We currently use some ad-hoc arch variables tied to legacy KVM device > > assignment to manage emulation of instructions that depend on whether > > non-co

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 09:54 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: linux-pci-ow...@vger.kernel.org > > [mailto:linux-pci-ow...@vger.kernel.org] > > On Behalf Of Alex Williamson > > Sent: Wednesday, September 25, 2013 10:16

Re: [RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 22:24 +1000, Alexey Kardashevskiy wrote: > This is a very rough change set required for ppc64 to use this KVM device. > > vfio_rm.c is a piece of code which is going to be called from the realmode > (MMU off), > and I will put everything spapr-related under #ifdef CONFIG_SPA

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 16:47 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 9:15 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 17:23 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 10:43 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

[GIT PULL] VFIO for v3.11

2013-07-08 Thread Alex Williamson
. Alex Williamson (6): vfio: Convert type1 iommu to use rbtree vfio: hugepage support for vfio_iommu_type1 vfio: Provide module option to disable vfio_iommu_type1 hugepage support vfio/type1: Fix missed frees and zero sized removes vfio: Limit group opens

Re: [PATCH v2 0/3] pci: ACS fixes & quirks

2013-07-08 Thread Alex Williamson
Ping. Comments? On Thu, 2013-06-27 at 16:39 -0600, Alex Williamson wrote: > v2: > > Revised patch 1/ to match comments from Bjorn. PCIe event collectors > and PCIe-to-PCI bridges now indicate that they do not support ACS. > I've reached out to try to get clarification on th

Re: [PATCH 3/8] vfio: add external user support

2013-07-08 Thread Alex Williamson
On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: > VFIO is designed to be used via ioctls on file descriptors > returned by VFIO. > > However in some situations support for an external user is required. > The first user is KVM on PPC64 (SPAPR TCE protocol) which is going to > use the

Re: [PATCH 3/8] vfio: add external user support

2013-07-09 Thread Alex Williamson
On Tue, 2013-07-09 at 15:40 +1000, Alexey Kardashevskiy wrote: > On 07/09/2013 07:52 AM, Alex Williamson wrote: > > On Sun, 2013-07-07 at 01:07 +1000, Alexey Kardashevskiy wrote: > >> VFIO is designed to be used via ioctls on file descriptors > >> returned by VFIO

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-04 Thread Alex Williamson
On Thu, 2013-07-18 at 01:32 +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The current implementation of acpiphp_check_bridge() is pretty dumb: > - It enables a slot if it's not enabled and the slot status is >ACPI_STA_ALL. > - It disables a slot if it's enabled and the slot

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-04 Thread Alex Williamson
On Thu, 2013-09-05 at 00:54 +0200, Rafael J. Wysocki wrote: > On Wednesday, September 04, 2013 02:36:34 PM Alex Williamson wrote: > > On Thu, 2013-07-18 at 01:32 +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > The current impleme

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-04 Thread Alex Williamson
On Thu, 2013-09-05 at 01:35 +0200, Rafael J. Wysocki wrote: > On Wednesday, September 04, 2013 05:12:14 PM Alex Williamson wrote: > > On Thu, 2013-09-05 at 00:54 +0200, Rafael J. Wysocki wrote: > > > On Wednesday, September 04, 2013 02:36:34 PM Alex Williamson wrote: > > &

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-04 Thread Alex Williamson
On Wed, 2013-09-04 at 21:37 -0600, Alex Williamson wrote: > On Thu, 2013-09-05 at 01:35 +0200, Rafael J. Wysocki wrote: > > On Wednesday, September 04, 2013 05:12:14 PM Alex Williamson wrote: > > > On Thu, 2013-09-05 at 00:54 +0200, Rafael J. Wysocki wrote: > > > > On

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-05 Thread Alex Williamson
On Thu, 2013-09-05 at 13:54 +0200, Rafael J. Wysocki wrote: > On Wednesday, September 04, 2013 10:06:02 PM Alex Williamson wrote: > > On Wed, 2013-09-04 at 21:37 -0600, Alex Williamson wrote: > > > On Thu, 2013-09-05 at 01:35 +0200, Rafael J. Wysocki wrote: > > > > On

Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots

2013-09-05 Thread Alex Williamson
On Thu, 2013-09-05 at 07:19 -0600, Alex Williamson wrote: > On Thu, 2013-09-05 at 13:54 +0200, Rafael J. Wysocki wrote: > > On Wednesday, September 04, 2013 10:06:02 PM Alex Williamson wrote: > > > On Wed, 2013-09-04 at 21:37 -0600, Alex Williamson wrote: > > > > On

Re: Excess dmesg output from ACPIPHP on boot (was: Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots)

2013-09-05 Thread Alex Williamson
On Thu, 2013-09-05 at 23:39 +0200, Rafael J. Wysocki wrote: > On Thursday, September 05, 2013 09:44:26 PM Rafael J. Wysocki wrote: > > On Thursday, September 05, 2013 08:21:41 AM Alex Williamson wrote: > > [...] > > > > > > > > > [ 18.288122]

Re: [PATCH] vfio: fix documentation

2013-09-05 Thread Alex Williamson
On Thu, 2013-09-05 at 15:22 -0700, Zi Shen Lim wrote: > Signed-off-by: Zi Shen Lim > --- Applied. Thanks! Alex > Documentation/vfio.txt | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt > index d7993dc..b9ca023 10

Re: linux-next: back merge of Linus' tree into the vfio tree

2013-09-05 Thread Alex Williamson
On Fri, 2013-09-06 at 09:08 +1000, Stephen Rothwell wrote: > Hi Alex, > > I noticed that you have back merged Linus' tree into yours. Linus > usually takes a dim view of that - especially when there is no > explanation in the merge commit message. i.e. you shouldn't to that > unless you really n

Re: Excess dmesg output from ACPIPHP on boot (was: Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots)

2013-09-05 Thread Alex Williamson
On Fri, 2013-09-06 at 00:40 +0200, Rafael J. Wysocki wrote: > On Thursday, September 05, 2013 04:17:25 PM Alex Williamson wrote: > > On Thu, 2013-09-05 at 23:39 +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 05, 2013 09:44:26 PM Rafael J. Wysocki wrote: > > &g

Re: Excess dmesg output from ACPIPHP on boot (was: Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots)

2013-09-05 Thread Alex Williamson
On Fri, 2013-09-06 at 01:36 +0200, Rafael J. Wysocki wrote: > On Thursday, September 05, 2013 05:08:03 PM Alex Williamson wrote: > > On Fri, 2013-09-06 at 00:40 +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 05, 2013 04:17:25 PM Alex Williamson wrote: > > >

Re: [PATCH 0/2] Re: Excess dmesg output from ACPIPHP on boot

2013-09-06 Thread Alex Williamson
On Fri, 2013-09-06 at 15:42 +0200, Rafael J. Wysocki wrote: > On Friday, September 06, 2013 01:36:28 AM Rafael J. Wysocki wrote: > > On Thursday, September 05, 2013 05:08:03 PM Alex Williamson wrote: > > > On Fri, 2013-09-06 at 00:40 +0200, Rafael J. Wysocki wrote: > > &g

Re: Excess dmesg output from ACPIPHP on boot (was: Re: [PATCH 25/30] ACPI / hotplug / PCI: Check for new devices on enabled slots)

2013-09-06 Thread Alex Williamson
On Fri, 2013-09-06 at 06:19 -0600, Bjorn Helgaas wrote: > On Thu, Sep 5, 2013 at 5:36 PM, Rafael J. Wysocki wrote: > > On Thursday, September 05, 2013 05:08:03 PM Alex Williamson wrote: > >> On Fri, 2013-09-06 at 00:40 +0200, Rafael J. Wysocki wrote: > >> > On Thur

[GIT PULL] VFIO for v3.12

2013-09-08 Thread Alex Williamson
y the merge was required. Sorry for that. Thanks, Alex ---- Alex Williamson (5): vfio: Add O_CLOEXEC flag to vfio device fd vfio-pci: Use fdget() rather than eventfd_fget() vfio-pci: Test for extended config space

Re: [PATCH] ACPI / hotplug / PCI: Avoid parent bus rescans on spurious device checks

2013-09-09 Thread Alex Williamson
erefore, according to the spec, we are free to do nothing if > nothing changes. > > References: https://bugzilla.kernel.org/show_bug.cgi?id=60865 > Reported-by: Alex Williamson > Signed-off-by: Rafael J. Wysocki > --- Works for me. Thanks! Tested-by: Alex Williamson > On top o

[RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-12 Thread Alex Williamson
vice. Perhaps they care about No-Snoop handling as well or the code can be #ifdef'd. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/devices/vfio.txt | 22 +++ arch/x86/include/asm/kvm_host.h|1 arch/x86/kvm/Makefile

[RFC PATCH 1/3] kvm: Destroy & free KVM devices on release

2013-09-12 Thread Alex Williamson
Finally, add a missing kfree for the device creation error path. Signed-off-by: Alex Williamson --- arch/powerpc/kvm/book3s_xics.c |1 - virt/kvm/kvm_main.c|5 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kv

[RFC PATCH 0/3] kvm/vfio: Manage KVM IOMMU coherency with virtual VFIO device

2013-09-12 Thread Alex Williamson
ow to make this more palatable for sharing with POWER. I'll also send a QEMU RFC which makes use of this. Thanks, Alex --- Alex Williamson (3): kvm: Destroy & free KVM devices on release vfio: Add check extension interface to external user support kvm: Add VFIO de

[RFC PATCH 2/3] vfio: Add check extension interface to external user support

2013-09-12 Thread Alex Williamson
: Alex Williamson --- drivers/vfio/vfio.c |8 drivers/vfio/vfio_iommu_type1.c |4 include/linux/vfio.h|2 ++ include/uapi/linux/vfio.h |1 + 4 files changed, 15 insertions(+) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-13 Thread Alex Williamson
On Fri, 2013-09-13 at 15:39 +0300, Michael S. Tsirkin wrote: > On Thu, Sep 12, 2013 at 03:23:15PM -0600, Alex Williamson wrote: > > So far we've succeeded at making KVM and VFIO mostly unaware of each > > other, but there's any important point where that breaks down. In

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-13 Thread Alex Williamson
On Fri, 2013-09-13 at 17:52 +0300, Michael S. Tsirkin wrote: > On Fri, Sep 13, 2013 at 08:13:40AM -0600, Alex Williamson wrote: > > On Fri, 2013-09-13 at 15:39 +0300, Michael S. Tsirkin wrote: > > > On Thu, Sep 12, 2013 at 03:23:15PM -0600, Alex Williamson wrote: > > >

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-13 Thread Alex Williamson
On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: > On 09/13/2013 07:23 AM, Alex Williamson wrote: > > So far we've succeeded at making KVM and VFIO mostly unaware of each > > other, but there's any important point where that breaks down. Intel > &g

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-10-07 Thread Alex Williamson
On Mon, 2013-10-07 at 05:46 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Friday, October 04, 2013 11:42 PM > > To: Bhushan Bharat-R65777 > > Cc: j...@8bytes.

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-10-10 Thread Alex Williamson
On Thu, 2013-10-10 at 20:09 +, Sethi Varun-B16395 wrote: > > > -Original Message- > > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > > boun...@lists.linux-foundation.org] On Behalf Of Alex Williamson > > Sent: Tuesday, October 08, 2013 8:4

Re: [PATCH v10 20/20] iommu/exynos: add devices attached to the System MMU to an IOMMU group

2013-10-10 Thread Alex Williamson
On Mon, 2013-10-07 at 10:58 +0900, Cho KyongHo wrote: > Patch written by Antonios Motakis : > > IOMMU groups are expected by certain users of the IOMMU API, > e.g. VFIO. Since each device is behind its own System MMU, we > can allocate a new IOMMU group for each device. > > Reviewd-by: Cho KyongH

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-29 Thread Alex Williamson
On Sun, 2013-09-29 at 16:16 +0300, Gleb Natapov wrote: > On Thu, Sep 12, 2013 at 03:23:15PM -0600, Alex Williamson wrote: > > So far we've succeeded at making KVM and VFIO mostly unaware of each > > other, but there's any important point where that breaks down. Intel >

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-29 Thread Alex Williamson
On Sun, 2013-09-29 at 17:44 +0300, Gleb Natapov wrote: > On Sun, Sep 29, 2013 at 07:52:28AM -0600, Alex Williamson wrote: > > On Sun, 2013-09-29 at 16:16 +0300, Gleb Natapov wrote: > > > On Thu, Sep 12, 2013 at 03:23:15PM -0600, Alex Williamson wrote: > > > > So far

Re: [PATCH 5/7] iommu: supress loff_t compilation error on powerpc

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > Signed-off-by: Bharat Bhushan > --- > drivers/vfio/pci/vfio_pci_rdwr.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c > b/drivers/vfio/pci/vfio_pci_rdwr.c > index 210db24

Re: [PATCH 2/7] iommu: add api to get iommu_domain of a device

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > This api return the iommu domain to which the device is attached. > The iommu_domain is required for making API calls related to iommu. > Follow up patches which use this API to know iommu maping. > > Signed-off-by: Bharat Bhushan > --- >

Re: [PATCH 6/7] vfio: moving some functions in common file

2013-09-25 Thread Alex Williamson
0644 > index 000..8bdc0ea > --- /dev/null > +++ b/drivers/vfio/vfio_iommu_common.c > @@ -0,0 +1,235 @@ > +/* > + * VFIO: Common code for vfio IOMMU support > + * > + * Copyright (C) 2012 Red Hat, Inc. All rights reserved. > + * Author: Alex Williamson > + *

Re: [PATCH 7/7] vfio pci: Add vfio iommu implementation for FSL_PAMU

2013-09-25 Thread Alex Williamson
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > This patch adds vfio iommu support for Freescale IOMMU > (PAMU - Peripheral Access Management Unit). > > The Freescale PAMU is an aperture-based IOMMU with the following > characteristics. Each device has an entry in a table in memory > d

Re: [RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-25 Thread Alex Williamson
On Sun, 2013-09-15 at 22:40 +1000, Alexey Kardashevskiy wrote: > On 09/14/2013 02:25 AM, Alex Williamson wrote: > > On Fri, 2013-09-13 at 18:49 +1000, Alexey Kardashevskiy wrote: > >> On 09/13/2013 07:23 AM, Alex Williamson wrote: > >>> So far we've succeeded at

[RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-08 Thread Alex Williamson
seems to do the right thing on my system, but that's not saying a lot since it doesn't do anything interesting with aliases. I'd appreciate if Joerg and Florian could test this on their systems. Thanks, Alex --- Alex Williamson (5): amd_iommu: Properly account for virtual a

[RFC PATCH 1/5] amd_iommu: Split IOMMU group initialization

2012-10-08 Thread Alex Williamson
This needs to be broken apart, start with pulling all the IOMMU group init code into a new function. Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c | 61 - 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/drivers/iommu

[RFC PATCH 2/5] amd_iommu: Split IOMMU Group topology walk

2012-10-08 Thread Alex Williamson
Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c | 58 ++--- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b65b377..6edbd0e 100644 --- a/drivers/iommu/amd_iommu.c

[RFC PATCH 3/5] amd_iommu: Split upstream bus device lookup

2012-10-08 Thread Alex Williamson
Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6edbd0e..3a00b5ce 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu

[RFC PATCH 4/5] amd_iommu: Split IOMMU group allocation and attach

2012-10-08 Thread Alex Williamson
Add a WARN_ON to make it clear why we don't add dma_pdev->dev to the group we're allocating. Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/amd_iomm

[RFC PATCH 5/5] amd_iommu: Properly account for virtual aliases in IOMMU groups

2012-10-08 Thread Alex Williamson
may be the root of the IOMMU group. To support this, allow a group to be hosted on the alias dev_data for use by anything that might have the same alias. Signed-off-by: Alex williamson --- drivers/iommu/amd_iommu.c | 61 --- drivers/iommu/amd_iommu_type

Re: [PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 21:12 +0900, Linus Torvalds wrote: > On Tue, Oct 9, 2012 at 7:02 PM, Eric Dumazet wrote: > > > > It seems drivers/vfio/pci/vfio_pci.c uses VM_RESERVED > > Yeah, I just pushed out what I think is the right (trivial) fix. Thank you, looks correct to me as well. Alex -- To u

Re: [RFC PATCH 1/5] amd_iommu: Split IOMMU group initialization

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 08:33 -0600, Shuah Khan wrote: > Alex, > > couple of comments in-lined: > > On Mon, Oct 8, 2012 at 10:49 PM, Alex Williamson > wrote: > > This needs to be broken apart, start with pulling all the IOMMU > > group init code into a new functio

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 20:27 +0200, Florian Dazinger wrote: > Am Mon, 08 Oct 2012 22:49:28 -0600 > schrieb Alex Williamson : > > > This series is meant to refactor IOMMU group support in amd_iommu > > to properly support virtual aliases. If multiple devices alias to >

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 20:57 +0200, Florian Dazinger wrote: > Am Tue, 09 Oct 2012 12:35:39 -0600 > schrieb Alex Williamson : > > > On Tue, 2012-10-09 at 20:27 +0200, Florian Dazinger wrote: > > > Am Mon, 08 Oct 2012 22:49:28 -0600 > > > schrieb Alex Williamson : &g

Re: [PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 08:21 -0600, Alex Williamson wrote: > On Tue, 2012-10-09 at 21:12 +0900, Linus Torvalds wrote: > > On Tue, Oct 9, 2012 at 7:02 PM, Eric Dumazet wrote: > > > > > > It seems drivers/vfio/pci/vfio_pci.c uses VM_RESERVED > > > > Yeah, I ju

Re: [PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter

2012-10-09 Thread Alex Williamson
On Tue, 2012-10-09 at 17:00 -0600, Alex Williamson wrote: > On Tue, 2012-10-09 at 08:21 -0600, Alex Williamson wrote: > > On Tue, 2012-10-09 at 21:12 +0900, Linus Torvalds wrote: > > > On Tue, Oct 9, 2012 at 7:02 PM, Eric Dumazet > > > wrote: > > > > >

[GIT PULL] VFIO fixes for 3.7-rc1

2012-10-10 Thread Alex Williamson
mm changes, fixing an interrupt race, and fixing a consistency bug in interrupt state when switching interrupt modes. ---- Alex Williamson (3): vfio: Fix PCI mmap after b3b9c293 vfio: Move PCI INTx eventfd setting earlier vfi

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

2012-11-30 Thread Alex Williamson
On Fri, 2012-11-30 at 17:14 +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: enabled on powernv platform

2012-12-03 Thread Alex Williamson
On Mon, 2012-12-03 at 13:52 +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

2012-12-03 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] PCI AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()

2012-12-03 Thread Alex Williamson
On Mon, 2012-12-03 at 10:40 -0700, Shuah Khan wrote: > On Mon, Dec 3, 2012 at 9:37 AM, Betty Dall wrote: > > The function aer_recover_queue() makes a call to > > pci_get_domain_bus_and_slot(). > > That function is documented to require that the caller decrement the > > reference count by calling

Re: [PATCH] PCI AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()

2012-12-03 Thread Alex Williamson
On Mon, 2012-12-03 at 12:48 -0700, Alex Williamson wrote: > On Mon, 2012-12-03 at 10:40 -0700, Shuah Khan wrote: > > On Mon, Dec 3, 2012 at 9:37 AM, Betty Dall wrote: > > > The function aer_recover_queue() makes a call to > > > pci_get_domain_bus_and_slot(). > >

[RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-03 Thread Alex Williamson
y split MSI-X BAR)). For this RFC, I don't change the max, just make it grow up to 32 user slots. Untested on anything but x86 so far. Thanks, Alex --- Alex Williamson (6): kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS kvm: Make KVM_PRIVATE_MEM_SLOTS optional kvm

[RFC PATCH 1/6] kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS

2012-12-03 Thread Alex Williamson
It's easy to confuse KVM_MEMORY_SLOTS and KVM_MEM_SLOTS_NUM. One is the user accessible slots and the other is user + private. Make this more obvious. Signed-off-by: Alex Williamson --- arch/ia64/include/asm/kvm_host.h|2 +- arch/ia64/kvm/kvm-ia64.c|2 +- arch/po

[RFC PATCH 2/6] kvm: Make KVM_PRIVATE_MEM_SLOTS optional

2012-12-03 Thread Alex Williamson
Seems like everyone copied x86 and defined 4 private memory slots that never actually get used. Even x86 only uses 3 of the 4. These aren't exposed so there's no need to add padding. Signed-off-by: Alex Williamson --- arch/ia64/include/asm/kvm_host.h|2 -- arch/powerpc/i

[RFC PATCH 3/6] kvm: Merge id_to_index into memslots

2012-12-03 Thread Alex Williamson
This allows us to resize this structure and therefore the number of memslots as part of the RCU update. Signed-off-by: Alex Williamson --- include/linux/kvm_host.h |5 ++--- virt/kvm/kvm_main.c |4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/linux

[RFC PATCH 4/6] kvm: Move private memory slots to start of memslots array

2012-12-03 Thread Alex Williamson
In order to make the memslots array grow on demand, move the private slots to the lower indexes of the array. The private slots are assumed likely to be in use, so if we didn't do this we'd end up allocating the full memslots array all the time. Signed-off-by: Alex Williamson --- arc

[RFC PATCH 5/6] kvm: Re-introduce memslots->nmemslots

2012-12-03 Thread Alex Williamson
o penalize everyone by using a statically allocated array. This allows us to start introducing a grow-able array. Signed-off-by: Alex Williamson --- arch/ia64/kvm/kvm-ia64.c |2 +- arch/powerpc/kvm/book3s_hv.c |2 +- arch/x86/kvm/vmx.c |1 + arch/x86/kvm/x86.c

[RFC PATCH 6/6] kvm: Allow memory slots to grow

2012-12-03 Thread Alex Williamson
s the bulk of the memory used. Signed-off-by: Alex Williamson --- include/linux/kvm_host.h |2 + virt/kvm/kvm_main.c | 62 +++--- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h

Re: [RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-04 Thread Alex Williamson
On Tue, 2012-12-04 at 13:48 +0200, Gleb Natapov wrote: > On Mon, Dec 03, 2012 at 04:39:05PM -0700, Alex Williamson wrote: > > Memory slots are currently a fixed resource with a relatively small > > limit. When using PCI device assignment in a qemu guest it's fairly > >

Re: [RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-04 Thread Alex Williamson
On Tue, 2012-12-04 at 23:48 +0900, Takuya Yoshikawa wrote: > On Mon, 03 Dec 2012 16:39:05 -0700 > Alex Williamson wrote: > > > A couple notes/questions; in the previous version we had a > > kvm_arch_flush_shadow() call when we increased the number of slots. > > I&

Re: [RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-04 Thread Alex Williamson
On Tue, 2012-12-04 at 17:30 +0200, Gleb Natapov wrote: > On Tue, Dec 04, 2012 at 08:21:55AM -0700, Alex Williamson wrote: > > On Tue, 2012-12-04 at 13:48 +0200, Gleb Natapov wrote: > > > On Mon, Dec 03, 2012 at 04:39:05PM -0700, Alex Williamson wrote: > > > > Memo

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

2012-12-04 Thread Alex Williamson
On Tue, 2012-12-04 at 19:12 +1100, Alexey Kardashevskiy wrote: > On 04/12/12 04:35, Alex Williamson wrote: > > On Mon, 2012-12-03 at 13:52 +1100, Alexey Kardashevskiy wrote: > >> This patch initializes IOMMU groups based on the IOMMU > >> configuration discovered dur

Re: [RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-04 Thread Alex Williamson
On Tue, 2012-12-04 at 18:42 +0200, Gleb Natapov wrote: > On Tue, Dec 04, 2012 at 08:39:47AM -0700, Alex Williamson wrote: > > On Tue, 2012-12-04 at 17:30 +0200, Gleb Natapov wrote: > > > On Tue, Dec 04, 2012 at 08:21:55AM -0700, Alex Williamson wrote: > > > > On

Re: [RFC PATCH 0/6] kvm: Growable memory slot array

2012-12-05 Thread Alex Williamson
On Wed, 2012-12-05 at 19:32 -0200, Marcelo Tosatti wrote: > On Mon, Dec 03, 2012 at 04:39:05PM -0700, Alex Williamson wrote: > > Memory slots are currently a fixed resource with a relatively small > > limit. When using PCI device assignment in a qemu guest it's fairly >

Re: [RFC PATCH 3/6] kvm: Merge id_to_index into memslots

2012-12-05 Thread Alex Williamson
On Wed, 2012-12-05 at 19:22 -0200, Marcelo Tosatti wrote: > On Mon, Dec 03, 2012 at 04:39:24PM -0700, Alex Williamson wrote: > > This allows us to resize this structure and therefore the number of > > memslots as part of the RCU update. > > Why is this necessary? "s

Re: [RFC PATCH 4/6] kvm: Move private memory slots to start of memslots array

2012-12-05 Thread Alex Williamson
On Wed, 2012-12-05 at 19:24 -0200, Marcelo Tosatti wrote: > On Mon, Dec 03, 2012 at 04:39:30PM -0700, Alex Williamson wrote: > > In order to make the memslots array grow on demand, move the private > > slots to the lower indexes of the array. The private slots are > > assume

Re: [RFC PATCH 5/6] kvm: Re-introduce memslots->nmemslots

2012-12-05 Thread Alex Williamson
On Wed, 2012-12-05 at 19:26 -0200, Marcelo Tosatti wrote: > On Mon, Dec 03, 2012 at 04:39:36PM -0700, Alex Williamson wrote: > > struct kvm_memory_slot is currently 52 bytes (LP64), not counting the > > arch data. On x86 this means the memslot array to support a tiny 32+3 &g

Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases

2012-10-18 Thread Alex Williamson
Joerg, I think this series is good-to-go, modulo any testing you may be able to do on it. I'm going to be offline for a couple weeks so feel free to incorporate this RFC directly or I can re-spin something when I'm back. Thanks, Alex On Mon, 2012-10-08 at 22:49 -0600, Alex Willia

Re: [RFC PATCH 5/6] kvm: Re-introduce memslots->nmemslots

2012-12-05 Thread Alex Williamson
On Wed, 2012-12-05 at 23:45 -0200, Marcelo Tosatti wrote: > On Wed, Dec 05, 2012 at 04:02:53PM -0700, Alex Williamson wrote: > > On Wed, 2012-12-05 at 19:26 -0200, Marcelo Tosatti wrote: > > > On Mon, Dec 03, 2012 at 04:39:36PM -0700, Alex Williamson wrote: > > >

[PATCH] kvm: Fix irqfd resampler list walk

2012-12-06 Thread Alex Williamson
Typo for the next pointer means we're walking random data here. Signed-off-by: Alex Williamson Cc: sta...@vger.kernel.org [3.7] --- Not sure if this will make 3.7, so preemptively adding the stable flag virt/kvm/eventfd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 01/10] kvm: Restrict non-existing slot state transitions

2012-12-06 Thread Alex Williamson
never for adding a zero size slot. Signed-off-by: Alex Williamson --- virt/kvm/kvm_main.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 6e8fa7e..e426704 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c

[PATCH 03/10] kvm: Fix iommu map/unmap to handle memory slot moves

2012-12-06 Thread Alex Williamson
eave iommu mappings if we get ENOMEM. Signed-off-by: Alex Williamson --- virt/kvm/kvm_main.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 93213e1..d27c135 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/

[PATCH 04/10] kvm: Minor memory slot optimization

2012-12-06 Thread Alex Williamson
occurs and avoid the extra kfree/kmalloc. Signed-off-by: Alex Williamson --- virt/kvm/kvm_main.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d27c135..24a67f0 100644 --- a/virt/kvm/kvm_main.c +++ b

[PATCH 05/10] kvm: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS

2012-12-06 Thread Alex Williamson
It's easy to confuse KVM_MEMORY_SLOTS and KVM_MEM_SLOTS_NUM. One is the user accessible slots and the other is user + private. Make this more obvious. Signed-off-by: Alex Williamson --- arch/ia64/include/asm/kvm_host.h|2 +- arch/ia64/kvm/kvm-ia64.c|2 +- arch/po

<    1   2   3   4   5   6   7   8   9   10   >