Re: [PATCH v2 3/8] pci: Add pci_hp_reset_slot

2013-05-10 Thread Alex Williamson
On Tue, 2013-05-07 at 20:57 -0600, Alex Williamson wrote: > Provide an interface to get to hotplug controller reset_slot callback > > Signed-off-by: Alex Williamson > --- > drivers/pci/hotplug/pci_hotplug_core.c | 24 > include/linux/pci_hotplug.h

[GIT PULL] vfio fix for 3.9-rc7

2013-04-09 Thread Alex Williamson
- vfio overflow fix for v3.9-rc7 ---- Alex Williamson (1): vfio-pci: Fix possible integer overflow drivers/vfio/pci/vfio_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: sen

Re: [GIT PULL] vfio fix for 3.9-rc7

2013-04-09 Thread Alex Williamson
On Tue, 2013-04-09 at 21:40 +0200, richard -rw- weinberger wrote: > On Tue, Apr 9, 2013 at 9:05 PM, Alex Williamson > wrote: > > Hi Linus, > > > > Here's one small fix for vfio that I'd like to get in for 3.9; > > tightening the range checking ar

Re: RFC: IOMMU/AMD: Error Handling

2013-04-30 Thread Alex Williamson
On Tue, 2013-04-30 at 11:06 -0400, Don Dutile wrote: > On 04/30/2013 10:49 AM, Suravee Suthikulanit wrote: > > On 4/29/2013 3:10 PM, Don Dutile wrote: > >> On 04/29/2013 03:45 PM, Suravee Suthikulanit wrote: > >>> Joerg, > >>> > >>> We are in the process of implementing AMD IOMMU error handling, an

[PATCH] vfio: Set container device mode

2013-04-30 Thread Alex Williamson
f the container to allow access. Signed-off-by: Alex Williamson --- drivers/vfio/vfio.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index ac7423b..acb7121 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -27,6 +27,7 @@ #in

[RFC PATCH 0/8] pci: extended reset capabilities

2013-05-01 Thread Alex Williamson
so many users are having problems. I think these interfaces should significantly improve our repeatability for such devices. Thanks, Alex --- Alex Williamson (8): pci: Create pci_reset_bridge_secondary_bus() pci: Add hotplug_slot_ops.reset_slot() pci: Add pci_hp_reset_slot

[RFC PATCH 1/8] pci: Create pci_reset_bridge_secondary_bus()

2013-05-01 Thread Alex Williamson
Move the secondary bus reset code from pci_parent_bus_reset() into its own function. Export it as we'll later be calling it from hotplug controllers. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 32 +++- include/linux/pci.h |1 + 2 files ch

[RFC PATCH 3/8] pci: Add pci_hp_reset_slot

2013-05-01 Thread Alex Williamson
Provide an interface to get to hotplug controller reset_slot callback Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pci_hotplug_core.c | 24 include/linux/pci_hotplug.h|8 2 files changed, 32 insertions(+) diff --git a/drivers/pci

[RFC PATCH 4/8] pci: Implement reset_slot for pciehp

2013-05-01 Thread Alex Williamson
Disable notification around secondary bus reset. Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pciehp.h |1 + drivers/pci/hotplug/pciehp_core.c | 12 drivers/pci/hotplug/pciehp_hpc.c | 31 +++ 3 files changed, 44 insertions

[RFC PATCH 5/8] pci: Add reset_slot option to pci_dev_reset

2013-05-01 Thread Alex Williamson
If the hotplug controller provides a way to reset a slot, use that before a direct parent bus reset. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7250ca7..eb50d90

[RFC PATCH 7/8] pci: Add slot and bus reset interfaces

2013-05-01 Thread Alex Williamson
eset and therefore should be under control of the caller. PCI state of all the affected devices is saved and restored around these resets, but internal state of all of the affected devices is reset (which should be the intention). Signed-off-by: Alex Williamson --- drivers/

[RFC PATCH 8/8] pci: Add reset probe functions

2013-05-01 Thread Alex Williamson
Sometimes it's not enough to call pci_reset_function() and hope for the best. We may actually want to know which resets the device supports in order to determine if pci_reset_function is sufficient or we should call pci_reset_slot/bus. Expose some helpers for this. Signed-off-by:

[RFC PATCH 6/8] pci: Split out pci_dev lock/unlock and save/restore

2013-05-01 Thread Alex Williamson
Only cosmetic changes to existing paths. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 52 +++- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index eb50d90..a330ebb 100644 --- a

[RFC PATCH 2/8] pci: Add hotplug_slot_ops.reset_slot()

2013-05-01 Thread Alex Williamson
This optional callback allows htoplug controllers to perform slot specific resets. These may be necessary in cases where a normal secondary bus reset can interact with controller logic and expose spurious hotplugs. Signed-off-by: Alex Williamson --- include/linux/pci_hotplug.h |4 1

[GIT PULL] VFIO for v3.10

2013-05-02 Thread Alex Williamson
extension to support PCI AER notification to userspace, byte granularity of PCI config space and access to unarchitected PCI config space, better protection around IOMMU driver accesses, default file mode fix, and a few misc cleanups. Alex

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > From: Alexey Kardashevskiy > > The IOMMU API implements groups creating/deletion, device binding > and IOMMU map/unmap operations. > > The PowerPC implementation uses most of the API except map/unmap > operations, which are implemented o

Re: [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-05-06 Thread Alex Williamson
On Tue, 2013-05-07 at 10:49 +1000, Alexey Kardashevskiy wrote: > On 05/07/2013 07:07 AM, Alex Williamson wrote: > > On Mon, 2013-05-06 at 17:21 +1000, a...@ozlabs.ru wrote: > >> From: Alexey Kardashevskiy > >> > >> The IOMMU API implements groups creating/del

Re: [PATCH] Reset PCIe devices to stop ongoing DMA

2013-05-07 Thread Alex Williamson
On Wed, 2013-04-24 at 13:58 +0900, Takao Indoh wrote: > This patch resets PCIe devices on boot to stop ongoing DMA. When > "pci=pcie_reset_devices" is specified, a hot reset is triggered on each > PCIe root port and downstream port to reset its downstream endpoint. > > Problem: > This patch solves

Re: [PATCH] Reset PCIe devices to stop ongoing DMA

2013-05-07 Thread Alex Williamson
On Tue, 2013-05-07 at 16:10 -0400, Don Dutile wrote: > On 05/07/2013 12:39 PM, Alex Williamson wrote: > > On Wed, 2013-04-24 at 13:58 +0900, Takao Indoh wrote: > >> This patch resets PCIe devices on boot to stop ongoing DMA. When > >> "pci=pcie_reset_devices" i

[PATCH 0/8] pci: bus and slot reset interface

2013-05-07 Thread Alex Williamson
t it doesn't actually do anything. They're also often not alone on the bus as they support a separate function for the audio controller. With this series we can expose a bus reset interface and get repeatability. Comments welcome. Thanks, Alex --- Alex Williamson (8): pci: Create

[PATCH 1/8] pci: Create pci_reset_bridge_secondary_bus()

2013-05-07 Thread Alex Williamson
Move the secondary bus reset code from pci_parent_bus_reset() into its own function. Export it as we'll later be calling it from hotplug controllers. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 32 +++- include/linux/pci.h |1 + 2 files ch

[PATCH 2/8] pci: Add hotplug_slot_ops.reset_slot()

2013-05-07 Thread Alex Williamson
This optional callback allows htoplug controllers to perform slot specific resets. These may be necessary in cases where a normal secondary bus reset can interact with controller logic and expose spurious hotplugs. Signed-off-by: Alex Williamson --- include/linux/pci_hotplug.h |4 1

[PATCH 3/8] pci: Add pci_hp_reset_slot

2013-05-07 Thread Alex Williamson
Provide an interface to get to hotplug controller reset_slot callback Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pci_hotplug_core.c | 24 include/linux/pci_hotplug.h|8 2 files changed, 32 insertions(+) diff --git a/drivers/pci

[PATCH 4/8] pci: Implement reset_slot for pciehp

2013-05-07 Thread Alex Williamson
Disable notification around secondary bus reset. Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pciehp.h |1 + drivers/pci/hotplug/pciehp_core.c | 12 drivers/pci/hotplug/pciehp_hpc.c | 31 +++ 3 files changed, 44 insertions

[PATCH 5/8] pci: Add reset_slot option to pci_dev_reset

2013-05-07 Thread Alex Williamson
If the hotplug controller provides a way to reset a slot, use that before a direct parent bus reset. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index d0f313f..f5035f5

[PATCH 6/8] pci: Split out pci_dev lock/unlock and save/restore

2013-05-07 Thread Alex Williamson
Only cosmetic changes to existing paths. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 52 +++- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f5035f5..ee3cb18 100644 --- a

[PATCH 7/8] pci: Add slot and bus reset interfaces

2013-05-07 Thread Alex Williamson
eset and therefore should be under control of the caller. PCI state of all the affected devices is saved and restored around these resets, but internal state of all of the affected devices is reset (which should be the intention). Signed-off-by: Alex Williamson --- drivers/

[PATCH 8/8] pci: Wake-up devices before save for reset

2013-05-07 Thread Alex Williamson
to D3, then the actual state of the device and dev->current_state are contradictory. Put everything in D0 going into the reset, then we don't need to do anything special on the way out. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |7 +++ 1 file changed, 7 insertions(+)

[PATCH v2 0/8] pci: bus and slot reset interface

2013-05-07 Thread Alex Williamson
shady area where they claim to support a PM function reset, but it doesn't actually do anything. They're also often not alone on the bus as they support a separate function for the audio controller. With this series we can expose a bus reset interface and get repeatability. Comments

[PATCH v2 1/8] pci: Create pci_reset_bridge_secondary_bus()

2013-05-07 Thread Alex Williamson
Move the secondary bus reset code from pci_parent_bus_reset() into its own function. Export it as we'll later be calling it from hotplug controllers. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 32 +++- include/linux/pci.h |1 + 2 files ch

[PATCH v2 2/8] pci: Add hotplug_slot_ops.reset_slot()

2013-05-07 Thread Alex Williamson
This optional callback allows htoplug controllers to perform slot specific resets. These may be necessary in cases where a normal secondary bus reset can interact with controller logic and expose spurious hotplugs. Signed-off-by: Alex Williamson --- include/linux/pci_hotplug.h |4 1

[PATCH v2 3/8] pci: Add pci_hp_reset_slot

2013-05-07 Thread Alex Williamson
Provide an interface to get to hotplug controller reset_slot callback Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pci_hotplug_core.c | 24 include/linux/pci_hotplug.h|8 2 files changed, 32 insertions(+) diff --git a/drivers/pci

[PATCH v2 4/8] pci: Implement reset_slot for pciehp

2013-05-07 Thread Alex Williamson
Disable notification around secondary bus reset. Signed-off-by: Alex Williamson --- drivers/pci/hotplug/pciehp.h |1 + drivers/pci/hotplug/pciehp_core.c | 12 drivers/pci/hotplug/pciehp_hpc.c | 31 +++ 3 files changed, 44 insertions

[PATCH v2 5/8] pci: Add reset_slot option to pci_dev_reset

2013-05-07 Thread Alex Williamson
If the hotplug controller provides a way to reset a slot, use that before a direct parent bus reset. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index d0f313f..f5035f5

[PATCH v2 6/8] pci: Split out pci_dev lock/unlock and save/restore

2013-05-07 Thread Alex Williamson
Only cosmetic changes to existing paths. Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 52 +++- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f5035f5..ee3cb18 100644 --- a

[PATCH v2 7/8] pci: Add slot and bus reset interfaces

2013-05-07 Thread Alex Williamson
eset and therefore should be under control of the caller. PCI state of all the affected devices is saved and restored around these resets, but internal state of all of the affected devices is reset (which should be the intention). Signed-off-by: Alex Williamson --- drivers/

[PATCH v2 8/8] pci: Wake-up devices before save for reset

2013-05-07 Thread Alex Williamson
to D3, then the actual state of the device and dev->current_state are contradictory. Put everything in D0 going into the reset, then we don't need to do anything special on the way out. Signed-off-by: Alex Williamson --- drivers/pci/pci.c |7 +++ 1 file changed, 7 insertions(+)

Re: [PATCH v2 1/8] pci: Create pci_reset_bridge_secondary_bus()

2013-05-08 Thread Alex Williamson
On Wed, 2013-05-08 at 15:14 -0400, Don Dutile wrote: > On 05/07/2013 10:57 PM, Alex Williamson wrote: > > Move the secondary bus reset code from pci_parent_bus_reset() into its own > > function. Export it as we'll later be calling it from hotplug controllers. > &g

Re: [PATCH] pci: Disable slot presence detection around bus reset

2013-04-24 Thread Alex Williamson
On Thu, 2013-02-14 at 20:53 -0700, Alex Williamson wrote: > On Thu, 2013-02-14 at 16:47 -0700, Bjorn Helgaas wrote: > > On Thu, Feb 14, 2013 at 11:37 AM, Alex Williamson > > wrote: > > > A bus reset can trigger a presence detection change and result in a > > > su

[PATCH 0/2] Protect against iommu driver disconnect

2013-04-25 Thread Alex Williamson
keeping the existing mutex critical sections as down_writes and add down_reads where these are used. Thanks, Alex --- Alex Williamson (2): vfio: Convert container->group_lock to rwsem vfio: Use down_reads to protect iommu disconnects drivers/vfio/vfio.c |

[PATCH 1/2] vfio: Convert container->group_lock to rwsem

2013-04-25 Thread Alex Williamson
All current users are writers, maintaining current mutual exclusion. This lets us add read users next. Signed-off-by: Alex Williamson --- drivers/vfio/vfio.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c

[PATCH 2/2] vfio: Use down_reads to protect iommu disconnects

2013-04-25 Thread Alex Williamson
If a group or device is released or a container is unset from a group it can race against file ops on the container. Protect these with down_reads to allow concurrent users. Signed-off-by: Alex Williamson Reported-by: Michael S. Tsirkin --- drivers/vfio/vfio.c | 62

Re: [PATCH] pci: Disable slot presence detection around bus reset

2013-04-29 Thread Alex Williamson
On Fri, 2013-04-26 at 13:49 -0600, Bjorn Helgaas wrote: > On Wed, Apr 24, 2013 at 3:33 PM, Alex Williamson > wrote: > > On Thu, 2013-02-14 at 20:53 -0700, Alex Williamson wrote: > >> On Thu, 2013-02-14 at 16:47 -0700, Bjorn Helgaas wrote: > >> > On Thu, Feb 14,

Re: linux-next: Tree for Apr 29 (kvm)

2013-04-29 Thread Alex Williamson
On Mon, 2013-04-29 at 19:31 +0300, Gleb Natapov wrote: > On Mon, Apr 29, 2013 at 08:52:56AM -0700, Randy Dunlap wrote: > > On 04/29/13 02:17, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20130426: > > > > > > > > > on x86_64: > > > > arch/x86/kvm/x86.c: In function 'kvm_dev_

[PATCH] kvm: KVM_CAP_IOMMU only available with device assignment

2013-04-29 Thread Alex Williamson
Fix build with CONFIG_PCI unset by linking KVM_CAP_IOMMU to device assignment config option. It has no purpose otherwise. Signed-off-by: Alex Williamson --- arch/ia64/kvm/kvm-ia64.c |2 ++ arch/x86/kvm/x86.c |2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/ia64/kvm/kvm

Re: linux-next: Tree for Apr 29 (kvm)

2013-04-29 Thread Alex Williamson
On Mon, 2013-04-29 at 18:46 +0200, Paolo Bonzini wrote: > Il 29/04/2013 18:31, Gleb Natapov ha scritto: > >> > arch/x86/kvm/x86.c: In function 'kvm_dev_ioctl_check_extension': > >> > arch/x86/kvm/x86.c:2547:22: error: 'pci_bus_type' undeclared (first use > >> > in this function) > >> > > >> > >

Re: [PATCH -v2] PCI/VFIO: use pcie_flags_reg instead of access PCI-E Capabilities Register

2013-04-15 Thread Alex Williamson
On Tue, 2013-04-02 at 09:52 +0800, Yijing Wang wrote: > Currently, we use pcie_flags_reg to cache PCI-E Capabilities Register, > because PCI-E Capabilities Register bits are almost read-only. This patch > use pcie_caps_reg() instead of another access PCI-E Capabilities Register. > > Signed-off-by:

Re: [PATCH 0/5 v2] VFIO PPC64: add VFIO support on POWERPC64

2013-05-23 Thread Alex Williamson
On Tue, 2013-05-21 at 13:33 +1000, Alexey Kardashevskiy wrote: > The series adds support for VFIO on POWERPC in user space (such as QEMU). > The in-kernel real mode IOMMU support is added by another series posted > separately. > > As the first and main aim of this series is the POWERNV platform su

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

2013-05-24 Thread Alex Williamson
u_spapr_tce.c > new file mode 100644 > index 000..bdae7a0 > --- /dev/null > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -0,0 +1,377 @@ > +/* > + * VFIO: IOMMU DMA mapping support for TCE on POWER > + * > + * Copyright (C) 2013 IBM Corp. All rights reserved. >

Re: [PATCH 3/3] powerpc/vfio: Enable on pSeries platform

2013-05-24 Thread Alex Williamson
On Tue, 2013-05-21 at 13:33 +1000, Alexey Kardashevskiy wrote: > The enables VFIO on the pSeries platform, enabling user space > programs to access PCI devices directly. > > Signed-off-by: Alexey Kardashevskiy > Cc: David Gibson > Signed-off-by: Paul Mackerras Acked-b

[PATCH] iommu: Split iommu_unmaps

2013-05-24 Thread Alex Williamson
. Signed-off-by: Alex Williamson --- drivers/iommu/iommu.c | 63 +++-- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index d8f98b1..4b0b56b 100644 --- a/drivers/iommu/iommu.c +++ b/drivers

[PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-24 Thread Alex Williamson
e is updated to reflect this. Previously this was unmodified on mapping, always returning the the requested unmap size. This is now updated to return the actual unmap size on success, allowing userspace to appropriately track mappings. Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu

[PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-24 Thread Alex Williamson
the type1 iommu, but is compatible with known users and works with existing QEMU userspace supporting vfio. Thanks, Alex --- Alex Williamson (2): vfio: Convert type1 iommu to use rbtree vfio: hugepage support for vfio_iommu_type1 drivers/vfio/vfio_iommu

[PATCH 1/2] vfio: Convert type1 iommu to use rbtree

2013-05-24 Thread Alex Williamson
more efficient and allows us to use common code instead of inventing our own. Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 190 --- 1 file changed, 96 insertions(+), 94 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers

Re: [PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-25 Thread Alex Williamson
On Sat, 2013-05-25 at 07:20 -0400, Konrad Rzeszutek Wilk wrote: > > + * Turns out AMD IOMMU has a page table bug where it won't map large pages > > + * to a region that previously mapped smaller pages. This should be fixed > > + * soon, so this is just a temporary workaround to break mappings down

Re: [PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-25 Thread Alex Williamson
On Sat, 2013-05-25 at 07:21 -0400, Konrad Rzeszutek Wilk wrote: > On Fri, May 24, 2013 at 11:24:26AM -0600, Alex Williamson wrote: > > This series let's the vfio type1 iommu backend take advantage of iommu > > large page support. See patch 2/2 for the details. This has bee

Re: [PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-27 Thread Alex Williamson
On Mon, 2013-05-27 at 08:41 +, 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: Friday, May 24, 2013 10

[PATCH 3/2] vfio: Provide module option to disable vfio_iommu_type1 hugepage support

2013-05-28 Thread Alex Williamson
cally through sysfs. If enabled dynamically, only new mappings are restricted. Signed-off-by: Alex Williamson --- As suggested by Konrad. This is cleaner to add as a follow-on drivers/vfio/vfio_iommu_type1.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/vfio/vfio_iommu_

Re: [PATCH 1/2] vfio-pci: Use byte granularity in config map

2013-03-26 Thread Alex Williamson
On Wed, 2013-03-27 at 10:35 +0800, Gavin Shan wrote: > On Tue, Mar 26, 2013 at 12:17:03PM -0600, Alex Williamson wrote: > >The config map previously used a byte per dword to map regions of > >config space to capabilities. Modulo a bug where we round the length > >of capabil

Re: [PATCH] PCI/VFIO: use pcie_flags_reg instead of access PCI-E Capabilities Register

2013-04-01 Thread Alex Williamson
On Wed, 2013-03-27 at 17:05 +0800, Yijing Wang wrote: > Currently, we use pcie_flags_reg to cache PCI-E Capabilities Register, > because PCI-E Capabilities Register bits are almost read-only. This patch > use pcie_flags_reg instead of another access PCI-E Capabilities Register. > > Signed-off-by:

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

2012-08-01 Thread Alex Williamson
On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: > 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: > > > >

Re: oops in pci_acs_path_enabled

2012-08-03 Thread Alex Williamson
On Fri, 2012-08-03 at 11:39 -0600, David Ahern wrote: > Hi Alex: > > Hitting an oops with 3.6-rc1. Backtrace from console attached. git blame > for the top function points to ad805758. Hey David, Hmm, what's special about your system? I've got an 82576 here and the same path works fine. Any w

Re: oops in pci_acs_path_enabled

2012-08-03 Thread Alex Williamson
On Fri, 2012-08-03 at 15:12 -0600, David Ahern wrote: > On 8/3/12 2:21 PM, Alex Williamson wrote: > > On Fri, 2012-08-03 at 11:39 -0600, David Ahern wrote: > >> Hi Alex: > >> > >> Hitting an oops with 3.6-rc1. Backtrace from console attached. git blame > >

Re: oops in pci_acs_path_enabled

2012-08-03 Thread Alex Williamson
On Fri, 2012-08-03 at 16:08 -0600, David Ahern wrote: > On 8/3/12 3:52 PM, Alex Williamson wrote: > > Is this the chunk that's causing the oops? > > Yes. And taking it out fixes passthrough as well. Hey David, One more test please. It looks like sriov creates buses with b

[PATCH 0/2] Fix ACS path checking

2012-08-04 Thread Alex Williamson
the root bus. This works on my system, but still needs to be tested by David. I'd like to get this in for 3.6-rc2. Joerg, I notice that ACS isn't getting enabled on my AMD system on 3.6-rc1. I'll investigate more, but mention it in case you get to it first. Thanks, Alex ---

[PATCH 2/2] amd-iommu: Fix ACS path checking

2012-08-04 Thread Alex Williamson
SR-IOV can create buses without a bridge. There may be other cases where this happens as well. In these cases skip to the parent bus and continue testing devices there. Signed-off-by: Alex Williamson --- drivers/iommu/amd_iommu.c | 25 ++--- 1 file changed, 22

[PATCH 1/2] intel-iommu: Fix ACS path checking

2012-08-04 Thread Alex Williamson
SR-IOV can create buses without a bridge. There may be other cases where this happens as well. In these cases skip to the parent bus and continue testing devices there. Signed-off-by: Alex Williamson --- drivers/iommu/intel-iommu.c | 25 ++--- 1 file changed, 22

[PATCH] pci: Account for virtual buses in pci_acs_path_enabled

2012-08-04 Thread Alex Williamson
It's possible to have buses without an associated bridge (bus->self == NULL). SR-IOV can generate such buses. When we find these, skip to the parent bus to look for the next ACS test. Signed-off-by: Alex Williamson --- David Ahern reported an oops from iommu drivers passing NULL i

Re: [PATCH] pci: Account for virtual buses in pci_acs_path_enabled

2012-08-05 Thread Alex Williamson
On Sun, 2012-08-05 at 23:30 -0600, Bjorn Helgaas wrote: > On Sat, Aug 4, 2012 at 12:19 PM, Alex Williamson > wrote: > > It's possible to have buses without an associated bridge > > (bus->self == NULL). SR-IOV can generate such buses. When > > we find these, sk

Re: [PATCH 0/2] Fix ACS path checking

2012-08-06 Thread Alex Williamson
On Mon, 2012-08-06 at 14:20 +0200, Joerg Roedel wrote: > On Mon, Aug 06, 2012 at 12:50:10PM +0200, Joerg Roedel wrote: > > On Sat, Aug 04, 2012 at 12:08:46PM -0600, Alex Williamson wrote: > > Hmm, tried it here, At least pci_request_acs() still gets called. How do > > you de

[PATCH v9 0/2] kvm: level irqfd support

2012-08-21 Thread Alex Williamson
ake them, but I think this compromise is race-free and still manages to make allocation of IRQ source IDs mostly a non-issue for device assignment limits. Thanks, Alex --- Alex Williamson (2): kvm: On Ack, De-assert & Notify KVM_IRQFD extension kvm: Use a reserved IRQ source ID fo

[PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
y for userspace to test for this fix. Signed-off-by: Alex Williamson --- arch/x86/kvm/x86.c |3 +++ include/linux/kvm.h |1 + include/linux/kvm_host.h |1 + virt/kvm/eventfd.c |6 +++--- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/x8

[PATCH v9 2/2] kvm: On Ack, De-assert & Notify KVM_IRQFD extension

2012-08-21 Thread Alex Williamson
de-asserts the gsi and notifies via another eventfd. It's then the responsibility of the user to re-assert the interrupt is service is still required. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 13 ++ arch/x86/kvm/x86.c|1 include/linux/kv

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > > which is also shared with userspace injection methods like > > KVM_IRQ_LI

Re: [PATCH v9 2/2] kvm: On Ack, De-assert & Notify KVM_IRQFD extension

2012-08-21 Thread Alex Williamson
On Tue, 2012-08-21 at 23:37 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 01:29:14PM -0600, Alex Williamson wrote: > > For VFIO based device assignment we'd like a mechanism to allow level > > triggered interrutps to be directly injected into KVM. KVM_IRQFD >

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Tue, 2012-08-21 at 23:41 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v9 0/2] kvm: level irqfd support

2012-08-21 Thread Alex Williamson
On Wed, 2012-08-22 at 03:31 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 01:28:57PM -0600, Alex Williamson wrote: > > Here's the much anticipated re-write of support for level irqfds. As > > Michael suggested, I've rolled the eoi/ack notification fd into &g

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Wed, 2012-08-22 at 03:41 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 03:14:54PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-21 at 23:41 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v9 2/2] kvm: On Ack, De-assert & Notify KVM_IRQFD extension

2012-08-21 Thread Alex Williamson
On Wed, 2012-08-22 at 03:14 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 03:11:41PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-21 at 23:37 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 01:29:14PM -0600, Ale

Re: [PATCH v9 2/2] kvm: On Ack, De-assert & Notify KVM_IRQFD extension

2012-09-17 Thread Alex Williamson
On Wed, 2012-09-05 at 17:57 +0300, Avi Kivity wrote: > On 08/21/2012 10:29 PM, Alex Williamson wrote: > > For VFIO based device assignment we'd like a mechanism to allow level > > triggered interrutps to be directly injected into KVM. KVM_IRQFD > > already allo

Re: [PATCH v9 0/2] kvm: level irqfd support

2012-09-17 Thread Alex Williamson
On Wed, 2012-08-22 at 11:25 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 07:28:15PM -0600, Alex Williamson wrote: > > On Wed, 2012-08-22 at 03:31 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 01:28:57PM -0600, Alex Williamson wrote: >

[PATCH v10 0/2] kvm: level irqfd support

2012-09-17 Thread Alex Williamson
Updated with suggestions from Michael and Avi, the OADN option is now a "resample" option. Re-working locking went surprisingly well, lockdep clean, and now allows us to use a single irq source ID for all resample irqfds. I hope we're close. Thanks, Alex --- Alex Williamson

[PATCH v10 1/2] kvm: Provide pre-locked setup to irq ack notifier

2012-09-17 Thread Alex Williamson
This enables better integration into irqfd setup where we can adjust our lock ordering to hold irq_lock, making these callable and avoiding irq source ID races. Signed-off-by: Alex Williamson --- include/linux/kvm_host.h |4 virt/kvm/irq_comm.c | 18 -- 2 files

[PATCH v10 2/2] kvm: Add resampling irqfds for level triggered interrupts

2012-09-17 Thread Alex Williamson
reserve a new one for this interface. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 13 +++ arch/x86/kvm/x86.c|4 + include/linux/kvm.h | 12 ++- include/linux/kvm_host.h |4 + virt/kvm/eventfd.c| 175

Re: [PATCH v10 2/2] kvm: Add resampling irqfds for level triggered interrupts

2012-09-19 Thread Alex Williamson
On Wed, 2012-09-19 at 12:10 +0300, Avi Kivity wrote: > On 09/19/2012 12:08 PM, Michael S. Tsirkin wrote: > > >> Whoa. Can't we put the resampler entry somewhere we don't need to > >> search for it? Like a kvm_kernel_irq_routing_entry, that's indexed by > >> gsi already (kvm_irq_routing_table::rt

Re: [PATCH v10 2/2] kvm: Add resampling irqfds for level triggered interrupts

2012-09-19 Thread Alex Williamson
On Wed, 2012-09-19 at 11:59 +0300, Avi Kivity wrote: > On 09/18/2012 06:16 AM, Alex Williamson wrote: > > @@ -92,6 +156,43 @@ irqfd_shutdown(struct work_struct *work) > > */ > > flush_work_sync(&irqfd->inject); > > > > + if (irqfd->resampler

Re: [PATCH v10 2/2] kvm: Add resampling irqfds for level triggered interrupts

2012-09-19 Thread Alex Williamson
On Wed, 2012-09-19 at 21:48 +0300, Michael S. Tsirkin wrote: > On Wed, Sep 19, 2012 at 12:23:13PM -0600, Alex Williamson wrote: > > On Wed, 2012-09-19 at 11:59 +0300, Avi Kivity wrote: > > > On 09/18/2012 06:16 AM, Alex Williamson wrote: > > > > @@ -92,6 +1

[GIT PULL] VFIO update for 3.6-rc1

2012-08-07 Thread Alex Williamson
for v3.6-rc1 Just a trivial patch to include vfio.h in the installed headers so we can complete userspace integration into QEMU. Thanks! ---- Alex Williamson (1): vfio: Include vfio.h in installed headers include/linux/Kbuild | 1

Re: [PATCH] pci: Account for virtual buses in pci_acs_path_enabled

2012-08-08 Thread Alex Williamson
On Tue, 2012-08-07 at 23:00 -0700, Bjorn Helgaas wrote: > On Tue, Aug 7, 2012 at 2:50 PM, Don Dutile wrote: > > On 08/06/2012 04:47 PM, Bjorn Helgaas wrote: > >> > >> On Sun, Aug 5, 2012 at 11:55 PM, Alex Williamson > >> wrote: > >>> > >>

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

2012-08-09 Thread Alex Williamson
On Mon, 2012-08-06 at 13:40 +0300, Avi Kivity wrote: > On 08/06/2012 01:38 PM, Avi Kivity wrote: > > > Regarding the implementation, instead of a linked list, would an array > > of counters parallel to the bitmap make it simpler? > > Or even, replace the bitmap with an array of counters. I'm not

[PATCH v8 0/6] kvm: level irqfd support

2012-08-10 Thread Alex Williamson
Thanks, Alex --- Alex Williamson (6): kvm: Add de-assert option to KVM_IRQ_ACKFD kvm: KVM_IRQ_ACKFD kvm: Add assert-only option to KVM_IRQFD kvm: Add IRQ source ID option to KVM_IRQFD kvm: Expose IRQ source IDs to userspace kvm: Allow filtering of acked irqs

[PATCH v8 1/6] kvm: Allow filtering of acked irqs

2012-08-10 Thread Alex Williamson
27;s irq source id, so it's notifier would never get called otherwise. KVM device assignment gets filtering as it de-asserts the GSI in it's notifier. Signed-off-by: Alex Williamson --- arch/x86/kvm/i8254.c |1 + arch/x86/kvm/i8259.c |8 +++- include/linux/kvm_host.h

[PATCH v8 2/6] kvm: Expose IRQ source IDs to userspace

2012-08-10 Thread Alex Williamson
Introduce KVM_IRQ_SOURCE_ID and KVM_CAP_NR_IRQ_SOURCE_ID to allow user allocation of IRQ source IDs and querying both the capability and the total count of IRQ source IDs. These will later be used by interfaces for setting up level IRQs. Signed-off-by: Alex Williamson --- Documentation

[PATCH v8 3/6] kvm: Add IRQ source ID option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying an IRQ source ID to be used when injecting an interrupt. When not specified KVM_USERSPACE_IRQ_SOURCE_ID is used. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |5 + arch/x86/kvm/x86.c|1 + include/linux/kvm.h

[PATCH v8 4/6] kvm: Add assert-only option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying that an irqfd is used only to assert the specified gsi, whereas standard behavior is to follow the assertion with a deassertion. This will later allow a level interrupt to be asserted via eventfd and later de-asserted by other means. Signed-off-by: Alex Williamson

[PATCH v8 5/6] kvm: KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
Enable a mechanism for IRQ ACKs to be exposed through an eventfd. The user can specify the GSI and optionally an IRQ source ID and have the provided eventfd trigger whenever the irqchip resamples it's inputs, for instance on EOI. Signed-off-by: Alex Williamson --- Documentation/virtua

[PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
It's likely (vfio) that one of the reasons to watch for an IRQ ACK is to de-assert and re-enable an interrupt. As the IRQ ACK notfier is already watching a GSI for an IRQ source ID we can easily couple these together. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |

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

2012-08-13 Thread Alex Williamson
On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: > On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: > > On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: > > > On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: > > > >

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

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 19:59 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: > > On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: > > >

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

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 22:50 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 12:17:25PM -0600, Alex Williamson wrote: > > On Mon, 2012-08-13 at 19:59 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: > > >

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