Re: Can VFIO pin only a specific region of guest mem when use pass through devices?

2018-10-29 Thread Alex Williamson
On Mon, 29 Oct 2018 17:14:46 +0800 Jason Wang wrote: > On 2018/10/29 上午10:42, Simon Guo wrote: > > Hi, > > > > I am using network device pass through mode with qemu x86(-device > > vfio-pci,host=:xx:yy.z) > > and “intel_iommu=on” in host kernel command line, and it shows the whole > > guest

Re: [PATCH v4] drivers/vfio: Fix a redundant copy bug

2018-10-29 Thread Alex Williamson
On Mon, 29 Oct 2018 13:56:54 -0500 Wenwen Wang wrote: > Hello, > > Could you please apply this patch? Thanks! I'd like to see testing and/or review from David or Alexey since I also don't have an environment for spapr/eeh. We're already late into the v4.20 merge window so this is probably v4.2

[GIT PULL] VFIO updates for v4.20-rc1

2018-10-30 Thread Alex Williamson
IOMMU model support on ARM/ARM64 (Geert Uytterhoeven) - Quirk for VFs reporting INTx pin (Alex Williamson) - Fix error path memory leak in MSI support (Li Qiang) Alex Williamson (1): vfio/pci: Mask buggy SR-IOV VF INTx

Re: [PATCH v3] drivers/vfio: Fix a redundant copy bug

2018-10-17 Thread Alex Williamson
On Wed, 17 Oct 2018 09:32:04 -0500 Wenwen Wang wrote: > In vfio_spapr_iommu_eeh_ioctl(), if the ioctl command is VFIO_EEH_PE_OP, > the user-space buffer 'arg' is copied to the kernel object 'op' and the > 'argsz' and 'flags' fields of 'op' are checked. If the check fails, an > error code EINVAL i

Re: [PATCH v3] drivers/vfio: Fix a redundant copy bug

2018-10-17 Thread Alex Williamson
On Wed, 17 Oct 2018 12:58:26 -0500 Wenwen Wang wrote: > On Wed, Oct 17, 2018 at 10:45 AM Alex Williamson > wrote: > > > > On Wed, 17 Oct 2018 09:32:04 -0500 > > Wenwen Wang wrote: > > > > > In vfio_spapr_iommu_eeh_ioctl(), if the ioctl command is VFIO

Re: [PATCH] drivers/vfio: Fix an 8-byte alignment issue

2018-10-17 Thread Alex Williamson
On Wed, 17 Oct 2018 17:15:33 -0400 Konrad Rzeszutek Wilk wrote: > On Wed, Oct 17, 2018 at 01:18:19PM -0500, Wenwen Wang wrote: > > This patch adds a 4-byte reserved field in the structure > > vfio_eeh_pe_op to make sure that the u64 fields in the structure > > vfio_eeh_pe_err are 8-byte aligned.

Re: [PATCH] drivers/vfio: Fix a redundant copy bug

2018-10-08 Thread Alex Williamson
Hi, On Sun, 7 Oct 2018 09:44:25 -0500 Wenwen Wang wrote: > In vfio_spapr_iommu_eeh_ioctl(), if the ioctl command is VFIO_EEH_PE_OP, > the user-space buffer 'arg' is copied to the kernel object 'op' and the > 'argsz' and 'flags' fields of 'op' are checked. If the check fails, an > error code EIN

Re: [RFC PATCH v4 06/13] vfio: parallelize vfio_pin_map_dma

2018-11-05 Thread Alex Williamson
> #include > +#include > > #define DRIVER_VERSION "0.2" > #define DRIVER_AUTHOR "Alex Williamson " > @@ -395,7 +396,7 @@ static int vaddr_get_pfn(struct mm_struct *mm, unsigned > long vaddr, > */ > static long vfio_pin_pag

Re: [RFC PATCH] vfio/pci: map prefetchble bars as writecombine

2018-07-17 Thread Alex Williamson
On Fri, 13 Jul 2018 10:26:17 +0530 Srinath Mannam wrote: > By default all BARs map with VMA access permissions > as pgprot_noncached. > > In ARM64 pgprot_noncached is MT_DEVICE_nGnRnE which > is strongly ordered and allows aligned access. > This type of mapping works for NON-PREFETCHABLE bars >

Re: [PATCH] vfio: fix virtio-pci dependency

2024-01-10 Thread Alex Williamson
On Tue, 9 Jan 2024 08:57:19 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > The new vfio-virtio driver already has a dependency on > VIRTIO_PCI_ADMIN_LEGACY, > but that is a bool symbol and allows vfio-virtio to be built-in even if > virtio-pci itself is a loadable module. This leads to

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-07 Thread Alex Williamson
On Thu, 8 Feb 2024 00:32:10 +0200 Zhi Wang wrote: > On Tue, 6 Feb 2024 04:31:23 +0530 > wrote: > > > From: Ankit Agrawal > > > > NVIDIA's upcoming Grace Hopper Superchip provides a PCI-like device > > for the on-chip GPU that is the logical OS representation of the > > internal proprietary ch

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-07 Thread Alex Williamson
On Tue, 6 Feb 2024 04:31:23 +0530 wrote: > From: Ankit Agrawal > > NVIDIA's upcoming Grace Hopper Superchip provides a PCI-like device > for the on-chip GPU that is the logical OS representation of the > internal proprietary chip-to-chip cache coherent interconnect. > > The device is peculiar

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-08 Thread Alex Williamson
On Thu, 8 Feb 2024 07:21:40 + "Tian, Kevin" wrote: > > From: Ankit Agrawal > > Sent: Thursday, February 8, 2024 3:13 PM > > >> > +    * Determine how many bytes to be actually read from the > > >> > device memory. > > >> > +    * Read request beyond the actual device memory size is > > >>

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Alex Williamson
On Fri, 9 Feb 2024 09:20:22 + Ankit Agrawal wrote: > Thanks Kevin for the review. Comments inline. > > >> > >> Note that the usemem memory is added by the VM Nvidia device driver [5] > >> to the VM kernel as memblocks. Hence make the usable memory size > >> memblock > >> aligned. > > > > I

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Alex Williamson
On Fri, 9 Feb 2024 13:19:03 -0400 Jason Gunthorpe wrote: > On Fri, Feb 09, 2024 at 08:55:31AM -0700, Alex Williamson wrote: > > I think Kevin's point is also relative to this latter scenario, in the > > L1 instance of the nvgrace-gpu driver the mmap of the usemem BAR is >

Re: [PATCH v19 0/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-22 Thread Alex Williamson
On Tue, 20 Feb 2024 17:20:52 +0530 wrote: > From: Ankit Agrawal > > NVIDIA's upcoming Grace Hopper Superchip provides a PCI-like device > for the on-chip GPU that is the logical OS representation of the > internal proprietary chip-to-chip cache coherent interconnect. > > The device is peculiar

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread Alex Williamson
On Tue, 20 Apr 2021 09:59:57 -0300 Jason Gunthorpe wrote: > On Tue, Apr 20, 2021 at 08:50:12PM +0800, liulongfang wrote: > > On 2021/4/19 20:33, Jason Gunthorpe wrote: > > > On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: > > > > > >>> I'm also confused how this works securely a

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

2021-02-16 Thread Alex Williamson
wed-by: Jason Gunthorpe Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson --- v2: Update to current follow_pte() API, add Reviews drivers/vfio/vfio_iommu_type1.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/

Re: [PATCH v3 7/8] KVM: kvm-vfio: generic forwarding control

2014-12-09 Thread Alex Williamson
On Tue, 2014-12-09 at 17:19 +0100, Eric Auger wrote: > On 11/24/2014 09:56 PM, Alex Williamson wrote: > > On Sun, 2014-11-23 at 19:35 +0100, Eric Auger wrote: > >> This patch introduces a new KVM_DEV_VFIO_DEVICE group. > >> > >> This is a new control channel

Re: [Xen-devel] [PATCH v5 9/9] xen/pciback: Implement PCI reset slot or bus with 'do_flr' SysFS attribute

2014-12-04 Thread Alex Williamson
On Thu, 2014-12-04 at 15:50 +0100, Sander Eikelenboom wrote: > Thursday, December 4, 2014, 3:31:11 PM, you wrote: > > > On 04/12/14 14:09, Sander Eikelenboom wrote: > >> > >> Thursday, December 4, 2014, 2:43:06 PM, you wrote: > >> > >>> On 04/12/14 13:10, Sander Eikelenboom wrote: > >

Re: [Xen-devel] [PATCH v5 9/9] xen/pciback: Implement PCI reset slot or bus with 'do_flr' SysFS attribute

2014-12-04 Thread Alex Williamson
On Thu, 2014-12-04 at 17:25 +0100, Sander Eikelenboom wrote: > Thursday, December 4, 2014, 4:39:06 PM, you wrote: > > > On Thu, 2014-12-04 at 15:50 +0100, Sander Eikelenboom wrote: > >> Thursday, December 4, 2014, 3:31:11 PM, you wrote: > >> > >> > On 04/12/14 14:09, Sander Eikelenboom wrote: > >

Re: [v2 18/25] KVM: kvm-vfio: implement the VFIO skeleton for VT-d Posted-Interrupts

2014-12-07 Thread Alex Williamson
On Mon, 2014-12-08 at 04:58 +, Wu, Feng wrote: > > > -Original Message- > > From: Eric Auger [mailto:eric.au...@linaro.org] > > Sent: Thursday, December 04, 2014 11:36 PM > > To: Wu, Feng; t...@linutronix.de; mi...@redhat.com; h...@zytor.com; > > x...@kernel.org; g...@kernel.org; pbonz

Re: [v2 17/25] KVM: kvm-vfio: User API for VT-d Posted-Interrupts

2014-12-07 Thread Alex Williamson
On Mon, 2014-12-08 at 04:58 +, Wu, Feng wrote: > > > -Original Message- > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > > Behalf Of Eric Auger > > Sent: Thursday, December 04, 2014 10:05 PM > > To: Wu, Feng; t...@linutronix.de; mi...@redhat.com; h...@zytor.c

Re: [PATCH v3 7/8] KVM: kvm-vfio: generic forwarding control

2014-12-08 Thread Alex Williamson
On Mon, 2014-12-08 at 13:22 +0100, Eric Auger wrote: > On 11/25/2014 08:00 PM, Alex Williamson wrote: > > On Tue, 2014-11-25 at 19:20 +0100, Eric Auger wrote: > >> On 11/24/2014 09:56 PM, Alex Williamson wrote: > >>> On Sun, 2014-11-23 at 19:35 +0100, Eric Auger wrote

Re: [PATCH] PCI: export pci device assignment info as read only via sysfs

2014-12-30 Thread Alex Williamson
- Original Message - > This patch exports assignment flag of PCI device via sysfs, so user > space application could know if PCI device was assigned to guest OS > or not via interface as following from viewpoint of host device > management: > > PCI device was assigned to guest OS > $ca

[PATCH] PCI: Add Wellsburg (X99) to Intel PCH root port ACS quirk

2015-01-22 Thread Alex Williamson
Intel has confirmed that the Wellsburg chipset, while not reporting ACS, does provide the proper isolation through the RCBA/BSPR registers, so the same quirk works for this set of device IDs. Signed-off-by: Alex Williamson Cc: Don Dugger --- drivers/pci/quirks.c |3 +++ 1 file changed, 3

Re: [PATCH] PCI: quirks: DMA alias quirk for Adaptec 3405

2015-01-23 Thread Alex Williamson
On Fri, 2015-01-23 at 15:50 -0600, Bjorn Helgaas wrote: > On Tue, Jan 13, 2015 at 11:26:50AM -0700, Alex Williamson wrote: > > As noted in the added comment, this device is actually an Intel 80333 > > I/O processor where the exposed device at 0e.0 is actually the address > >

[PATCH] PCI: quirks: DMA alias quirk for Adaptec 3405

2015-01-13 Thread Alex Williamson
to create a fixed alias between the exposed and hidden devfn. Scenarios like this are potentially likely for any device incorporating this I/O processor, so this little bit of abstraction with the fixed alias table should make future additions trivial. Signed-off-by: Alex Williamson Cc: Adaptec

Re: [PATCH v8 34/50] vhost/net: virtio 1.0 byte swap

2015-01-06 Thread Alex Williamson
On Mon, 2014-12-01 at 18:05 +0200, Michael S. Tsirkin wrote: > I had to add an explicit tag to suppress compiler warning: > gcc isn't smart enough to notice that > len is always initialized since function is called with size > 0. I'm getting a panic inside a guest when this change is applied on th

Re: [PATCH] vhost/net: length miscalculation

2015-01-07 Thread Alex Williamson
len); > > This adds datalen with the wrong sign, causing guest panics. > > Fixes: 8b38694a2dc8b18374310df50174f1e4376d6824 > Reported-by: Alex Williamson > Suggested-by: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- > > Alex, could you please confirm this fi

Re: [PATCH V2] vfio-pci: Fix the check on pci device type in vfio_pci_probe()

2015-01-07 Thread Alex Williamson
On Tue, 2014-12-23 at 10:58 +0800, Wei Yang wrote: > Current vfio-pci just supports normal pci device, so vfio_pci_probe() will > return if the pci device is not a normal device. While current code makes a > mistake. PCI_HEADER_TYPE is the offset in configuration space of the device > type, but we

Re: [PATCH v2] PCI/sysfs: off by two when checking the limit on driver_override length

2015-01-07 Thread Alex Williamson
I: Introduce new device binding path using > pci_dev.driver_override") > Cc: Alex Williamson > Cc: Bjorn Helgaas > Cc: Konrad Rzeszutek Wilk > Cc: Alexander Graf > Cc: Greg Kroah-Hartman > Signed-off-by: Sasha Levin > --- > drivers/pci/pci-sysfs.c |3 ++- >

Re: [PATCH 4/4] PCI: quirk Atheros AR93xx to avoid bus reset

2015-01-08 Thread Alex Williamson
On Thu, 2015-01-08 at 09:07 -0700, Bjorn Helgaas wrote: > On Fri, Nov 21, 2014 at 11:24:27AM -0700, Alex Williamson wrote: > > Reports against the TL-WDN4800 card indicate that PCI bus reset of > > this Atheros device cause system lock-ups and resets. I've also > >

[GIT PULL] VFIO fixes for 3.19-rc4

2015-01-10 Thread Alex Williamson
Hi Linus, The following changes since commit b1940cd21c0f4abdce101253e860feff547291b0: Linux 3.19-rc3 (2015-01-05 17:05:20 -0800) are available in the git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v3.19-rc4 for you to fetch changes up to 7c2e211f3c95b91912a92a8c6736

Re: [PATCH 0/3] PCI/x86: Interface for testing multivector MSI support

2015-01-12 Thread Alex Williamson
On Thu, 2015-01-08 at 09:15 -0700, Bjorn Helgaas wrote: > On Fri, Nov 21, 2014 at 03:08:27PM -0700, Alex Williamson wrote: > > I'd like to make vfio-pci capable of manipulating the device exposed > > to the user such that if the host can only support a single MSI > > ve

Re: [PATCH 4/4] PCI: quirk Atheros AR93xx to avoid bus reset

2015-01-12 Thread Alex Williamson
On Mon, 2015-01-12 at 16:20 +0100, Andreas Hartmann wrote: > Alex Williamson wrote: > > On Thu, 2015-01-08 at 09:07 -0700, Bjorn Helgaas wrote: > >> On Fri, Nov 21, 2014 at 11:24:27AM -0700, Alex Williamson wrote: > >>> Reports against the TL-WDN4800 card indicate th

Re: [v3 00/26] Add VT-d Posted-Interrupts support

2015-01-27 Thread Alex Williamson
On Wed, 2015-01-28 at 03:01 +, Wu, Feng wrote: > > > -Original Message- > > From: Wu, Feng > > Sent: Wednesday, January 21, 2015 10:26 AM > > To: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > > g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; > > j.

Re: [PATCH] vfio: Split virqfd into a separate module for vfio bus drivers

2015-03-19 Thread Alex Williamson
On Thu, 2015-03-19 at 20:32 +0100, Paul Bolle wrote: > On Wed, 2015-03-18 at 11:27 -0600, Alex Williamson wrote: > > --- a/drivers/vfio/virqfd.c > > +++ b/drivers/vfio/virqfd.c > > > +#define DRIVER_VERSION "0.1" > > +#define DRIVER_AUTHOR "Alex Wil

Re: Hardware support for vt-posted interrupts described in vt-directed-io-spec for assigned devices

2015-03-20 Thread Alex Williamson
On Fri, 2015-03-20 at 15:24 +0530, bk rakesh wrote: > Adding few more information regarding the setup which i had created to > test the vt-d posted interrupts for assigned devices, > > Hardware used for evaluating vt-posted interrupts > cpu "E5-2620 v2 @ 2.10GHz" and "S2600CP server board" >

Re: Hardware support for vt-posted interrupts described in vt-directed-io-spec for assigned devices

2015-03-20 Thread Alex Williamson
On Fri, 2015-03-20 at 15:10 +0100, Eric Auger wrote: > On 03/20/2015 03:04 PM, Alex Williamson wrote: > > On Fri, 2015-03-20 at 15:24 +0530, bk rakesh wrote: > >> Adding few more information regarding the setup which i had created to > >> test the vt-d posted inte

[PATCH] PCI: Add ACS quirks for Intel 1G NICs

2015-03-20 Thread Alex Williamson
/isolation in the onboard switch, rendering quirks for the downstream endpoints useless. Signed-off-by: Alex Williamson Cc: John Ronciak --- drivers/pci/quirks.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 13:30 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 08:48 AM, Alex Williamson wrote: > > On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > >> This makes use of the it_page_size from the iommu_table struct > >> as page size

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 13:33 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 08:48 AM, Alex Williamson wrote: > > On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > >> Modern IBM POWERPC systems support multiple (currently two) TCE tables > >> per IOMMU g

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Thu, 2015-04-02 at 14:40 +1100, Alexey Kardashevskiy wrote: > On 04/02/2015 01:50 PM, Alex Williamson wrote: > > On Thu, 2015-04-02 at 13:30 +1100, Alexey Kardashevskiy wrote: > >> On 04/02/2015 08:48 AM, Alex Williamson wrote: > >>> On Sat, 2015-03-28 at 01:54 +11

Re: [PATCH 00/86] pci: export pci_ids.h and related cleanups

2015-04-02 Thread Alex Williamson
On Thu, 2015-04-02 at 14:09 +0200, Michael S. Tsirkin wrote: > On Thu, Apr 02, 2015 at 01:23:06AM -0700, Christoph Hellwig wrote: > > The class ids are a hardware defintion, not a kernel API. > > It's part of the API, it's used to decode values in this sysfs file: > /sys/bus/pci/devices//class > V

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-02 Thread Alex Williamson
Should have sent this with the other comments, but found it hiding on my desktop... On Sat, 2015-03-28 at 01:55 +1100, Alexey Kardashevskiy wrote: > In order to support memory pre-registration, we need a way to track > the use of every registered memory region and only allow unregistration > if a

[PATCH 0/2] vfio: Add signal flush and log more verbosely

2015-04-14 Thread Alex Williamson
evice to release. Provide more clues what's happening. Thanks, Alex --- Alex Williamson (2): vfio: Flush signals on device request interruption vfio-pci: Log device requests more verbosely drivers/vfio/pci/vfio_pci.c |8 +++- drivers/vfio/vfio.c | 13 ++

[PATCH 2/2] vfio-pci: Log device requests more verbosely

2015-04-14 Thread Alex Williamson
Log some clues indicating whether the user is receiving device request interfaces or not listening. This can help indicate why a driver unbind is blocked or explain why QEMU automatically unplugged a device from the VM. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c |8

[PATCH 1/2] vfio: Flush signals on device request interruption

2015-04-14 Thread Alex Williamson
Signals don't just interrupt our wait, they remain pending such that subsequent wait_events timeout immediately. This can cause a CPU to spin with a single signal. Flush signals if we receive an interruption and also log information about the reason the task is blocked. Signed-off-by:

[GIT PULL] VFIO updates for v4.1-rc1

2015-04-14 Thread Alex Williamson
separate module (Alex Williamson) - vfio-pci VGA arbiter client (Alex Williamson) - New vfio-pci.ids= module option (Alex Williamson) - vfio-pci D3 power state support for idle devices (Alex Williamson) Alex Williamson (8

Re: [RFC v5 06/13] VFIO: platform: add vfio_external_{mask|is_active|set_automasked}

2015-03-31 Thread Alex Williamson
On Thu, 2015-03-19 at 15:55 +0100, Eric Auger wrote: > Introduces 3 new external functions aimed at doining some actions > on VFIO platform devices: > - mask a VFIO IRQ > - get the active status of a VFIO IRQ (active at interrupt > controller level or masked by the level-sensitive automasking). >

Re: [RFC v5 12/13] KVM: kvm-vfio: generic forwarding control

2015-03-31 Thread Alex Williamson
On Thu, 2015-03-19 at 15:55 +0100, Eric Auger wrote: > This patch introduces a new KVM_DEV_VFIO_DEVICE group. > > This is a new control channel which enables KVM to cooperate with > viable VFIO devices. > > The patch introduces 2 attributes for this group: > KVM_DEV_VFIO_DEVICE_FORWARD_IRQ, KVM_D

Re: [RFC v5 08/13] KVM: kvm-vfio: wrappers for vfio_external_{mask|is_active|set_automasked}

2015-03-31 Thread Alex Williamson
On Thu, 2015-03-19 at 15:55 +0100, Eric Auger wrote: > Those 3 new wrapper functions call the respective VFIO external > functions. > > Signed-off-by: Eric Auger > > --- > > v4: creation > --- > include/linux/vfio.h | 8 +++- > virt/kvm/vfio.c | 44 +++

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-03-31 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey Kardashe

Re: [PATCH kernel v7 28/31] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:55 +1100, Alexey Kardashevskiy wrote: > We are adding support for DMA memory pre-registration to be used in > conjunction with VFIO. The idea is that the userspace which is going to > run a guest may want to pre-register a user space memory region so > it all gets pinned on

Re: [PATCH kernel v7 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey Kardashe

Re: [PATCH kernel v7 04/31] vfio: powerpc/spapr: Use it_page_size

2015-04-01 Thread Alex Williamson
On Sat, 2015-03-28 at 01:54 +1100, Alexey Kardashevskiy wrote: > This makes use of the it_page_size from the iommu_table struct > as page size can differ. > > This replaces missing IOMMU_PAGE_SHIFT macro in commented debug code > as recently introduced IOMMU_PAGE_XXX macros do not include > IOMMU_

Re: [PATCH kernel v9 16/32] powerpc/powernv/ioda: Move TCE kill register address to PE

2015-04-27 Thread Alex Williamson
On Sat, 2015-04-25 at 22:14 +1000, Alexey Kardashevskiy wrote: > At the moment the DMA setup code looks for the "ibm,opal-tce-kill" property > which contains the TCE kill register address. Writes to this register > invalidates TCE cache on IODA/IODA2 hub. > > This moves the register address from i

Re: [PATCH kernel v9 02/32] Revert "powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically"

2015-04-27 Thread Alex Williamson
On Sat, 2015-04-25 at 22:14 +1000, Alexey Kardashevskiy wrote: > This reverts commit 9e8d4a19ab66ec9e132d405357b9108a4f26efd3 as > tce32_table has exactly the same life time as the whole PE. scripts/checkpatch.pl would like your commit reference to appear as: commit 9e8d4a19ab66 ("powerpc/powernv

Re: [PATCH kernel v9 30/32] vfio: powerpc/spapr: Use 32bit DMA window properties from table_group

2015-04-27 Thread Alex Williamson
; v9: > * new in the series - to make the next patch simpler > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 19 +++ > 1 file changed, 11 insertions(+), 8 deletions(-) Acked-by: Alex Williamson > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c > b/driver

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-08 Thread Alex Williamson
On Wed, 2015-04-08 at 13:22 +1000, Alexey Kardashevskiy wrote: > On 04/03/2015 07:50 AM, Alex Williamson wrote: > > > > Should have sent this with the other comments, but found it hiding on my > > desktop... > > > > On Sat, 2015-03-28 at 01:55 +1100, Alexey Kard

Re: [PATCH kernel v8 15/31] powerpc/iommu: Fix IOMMU ownership control functions

2015-04-10 Thread Alex Williamson
On Fri, 2015-04-10 at 16:30 +1000, Alexey Kardashevskiy wrote: > This adds missing locks in iommu_take_ownership()/ > iommu_release_ownership(). > > This marks all pages busy in iommu_table::it_map in order to catch > errors if there is an attempt to use this table while ownership over it > is tak

Re: [PATCH kernel v8 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-10 Thread Alex Williamson
On Fri, 2015-04-10 at 16:31 +1000, Alexey Kardashevskiy wrote: > In order to support memory pre-registration, we need a way to track > the use of every registered memory region and only allow unregistration > if a region is not in use anymore. So we need a way to tell from what > region the just cl

Re: [PATCH kernel v8 00/31] powerpc/iommu/vfio: Enable Dynamic DMA windows

2015-04-10 Thread Alex Williamson
| 12 +- > arch/powerpc/platforms/pseries/iommu.c | 55 +- > arch/powerpc/sysdev/dart_iommu.c | 12 +- > drivers/vfio/vfio_iommu_spapr_tce.c | 1021 > --- > include/uapi/linux/vfio.h | 88 ++- > 20 f

Re: [PATCH] PCI: Export pci_probe_reset_function()

2015-04-09 Thread Alex Williamson
On Thu, 2015-04-09 at 15:00 -0500, Bjorn Helgaas wrote: > On Thu, Apr 09, 2015 at 02:58:46PM -0500, Bjorn Helgaas wrote: > > On Thu, Apr 09, 2015 at 09:51:43AM -0600, Alex Williamson wrote: > > > The equivalent bus and slot versions of this are already exported and > >

[PATCH] vfio-pci: Attempt bus/slot reset on open

2015-04-09 Thread Alex Williamson
mechanism of choice when enabling the device. Signed-off-by: Alex Williamson --- Depends on export of pci_probe_reset_function() http://article.gmane.org/gmane.linux.kernel.pci/40662 drivers/vfio/pci/vfio_pci.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions

Re: [RFC 1/3] VFIO: platform: add reset support

2015-04-17 Thread Alex Williamson
On Fri, 2015-04-17 at 15:37 +0200, Eric Auger wrote: > This patch adds support for vfio platform reset. The modality only is > exposed when a specialized VFIO driver populates the reset callback. > For the generic vfio platform/amba driver, the modality is not supported > since the driver is by ess

Re: [RFC 3/3] VFIO: platform: add vfio-platform-calxedaxgmac driver

2015-04-17 Thread Alex Williamson
On Fri, 2015-04-17 at 15:37 +0200, Eric Auger wrote: > This patch introduces a specialized vfio platform driver for the > calxeda xgmac. On top of the generic vfio platform driver functionalities, > it implements the reset modality. This latter basically disables interrupts > and stops DMA transfe

Re: [RFC 2/3] VFIO: platform: export platform callbacks, probe and remove

2015-04-17 Thread Alex Williamson
On Fri, 2015-04-17 at 15:37 +0200, Eric Auger wrote: > We intend to derive the platform driver into specialized ones, featuring > reset modality. In order to avoid duplication, let's export the functions > that can be reused in all vfio_platform drivers: > - get_platform_resource > - get_platform_i

Re: [PATCH kernel v7 26/31] powerpc/iommu: Add userspace view of TCE table

2015-04-08 Thread Alex Williamson
On Thu, 2015-04-09 at 13:21 +1000, Alexey Kardashevskiy wrote: > On 04/09/2015 01:43 AM, Alex Williamson wrote: > > On Wed, 2015-04-08 at 13:22 +1000, Alexey Kardashevskiy wrote: > >> On 04/03/2015 07:50 AM, Alex Williamson wrote: > >>> > >>> Should h

[PATCH] PCI: Export pci_probe_reset_function()

2015-04-09 Thread Alex Williamson
The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user. Signed-off-by: Alex

[PATCH v4 0/3] kvm: level irqfd and new eoifd

2012-07-13 Thread Alex Williamson
d, non-de-asserting eoifd will look like. Thanks, Alex --- Alex Williamson (3): kvm: Add a GSI specification for KVM_EOIFD kvm: KVM_EOIFD, an eventfd for EOIs kvm: Extend irqfd to support level interrupts Documentation/virtual/kvm/api.txt | 27 +++ arch/x86/kvm/x86.c

[PATCH v4 1/3] kvm: Extend irqfd to support level interrupts

2012-07-13 Thread Alex Williamson
excessive infrastructure around an object for storing this irq_source_id. However, notice that we only provide a way to assert the interrupt here. A follow-on interface will make use of the same irq_source_id to allow de-assert. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt

[PATCH v4 2/3] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-13 Thread Alex Williamson
is serviced. Here we make use of the reference counting of the _irq_source object allowing us to share it with an irqfd and cleanup regardless of the release order. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 21 +++ arch/x86/kvm/x86.c|2

[PATCH v4 3/3] kvm: Add a GSI specification for KVM_EOIFD

2012-07-13 Thread Alex Williamson
NOT FOR COMMIT - Here's what it would look like to add a GSI flavor for KVM_EOIFD later. I expect we're going to need this to support generic EOI notifiers in qemu when irqchip is enabled. No API doc included here yet. Signed-off-by: Alex Williamson --- include/linux/kv

Re: [PATCH v3 0/2] kvm: level irqfd and new eoifd

2012-07-16 Thread Alex Williamson
On Sun, 2012-07-15 at 11:33 +0300, Avi Kivity wrote: > On 07/12/2012 07:19 PM, Alex Williamson wrote: > > On Thu, 2012-07-12 at 12:35 +0300, Avi Kivity wrote: > >> On 07/11/2012 10:57 PM, Alex Williamson wrote: > >> >> > >> >> > We still have

Re: [PATCH v3 0/2] kvm: level irqfd and new eoifd

2012-07-16 Thread Alex Williamson
On Sun, 2012-07-15 at 13:09 +0300, Avi Kivity wrote: > On 07/12/2012 08:38 PM, Alex Williamson wrote: > > On Thu, 2012-07-12 at 10:19 -0600, Alex Williamson wrote: > >> On Thu, 2012-07-12 at 12:35 +0300, Avi Kivity wrote: > >> > On 07/11/2012 1

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

2012-07-16 Thread Alex Williamson
On Sun, 2012-07-15 at 19:32 +0300, Michael S. Tsirkin wrote: > On Fri, Jul 13, 2012 at 01:41:05PM -0600, Alex Williamson wrote: > > +static int kvm_assign_eoifd(struct kvm *kvm, struct kvm_eoifd *args) > > +{ > > + struct eventfd_ctx *level_irqfd = NULL, *eventfd = NULL;

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

2012-07-16 Thread Alex Williamson
allowing the caller to know if anything was done. I added this onto the end as it's essentially an optimization on the previous design. It's hard to tell if there's an actual performance benefit to this. - dropped eoifd gsi support patch as it was only an FYI. Thanks,

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

2012-07-16 Thread Alex Williamson
is serviced. Here we make use of the reference counting of the _irq_source object allowing us to share it with an irqfd and cleanup regardless of the release order. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 22 +++ arch/x86/kvm/x86.c|2

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

2012-07-16 Thread Alex Williamson
This is an alternative to kvm_set_irq(,,,0) which returns the previous assertion state of the interrupt and does nothing if it isn't changed. Signed-off-by: Alex Williamson --- include/linux/kvm_host.h |3 ++ virt/kvm/irq_comm.c | 78

[PATCH v5 4/4] kvm: Convert eoifd to use kvm_clear_irq

2012-07-16 Thread Alex Williamson
We can drop any kind of serialization on the injection side as we expect spurious injections to be both rare and safe. On the EOI side, this continues to filter out both the pic/ioapic work and the eventfd signaling if our source ID has not set the interrupt. Signed-off-by: Alex Williamson

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

2012-07-16 Thread Alex Williamson
excessive infrastructure around an object for storing this irq_source_id. However, notice that we only provide a way to assert the interrupt here. A follow-on interface will make use of the same irq_source_id to allow de-assert. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt

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

2012-07-16 Thread Alex Williamson
On Tue, 2012-07-17 at 03:51 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:34:03PM -0600, Alex Williamson wrote: > > This is an alternative to kvm_set_irq(,,,0) which returns the previous > > assertion state of the interrupt and does nothing if it isn't changed.

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 13:14 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:34:03PM -0600, Alex Williamson wrote: > > This is an alternative to kvm_set_irq(,,,0) which returns the previous > > assertion state of the interrupt and does nothing if it isn't changed.

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 13:21 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:33:55PM -0600, Alex Williamson wrote: > > + if (args->flags & KVM_EOIFD_FLAG_LEVEL_IRQFD) { > > + struct _irqfd *irqfd = _irqfd_fdget_lock(kvm, args->irqfd); > &g

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 17:08 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 07:56:09AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 13:14 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 16, 2012 at 02:34:03PM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 17:10 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 07:59:16AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 13:21 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 16, 2012 at 02:33:55PM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 17:42 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 08:29:43AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 17:10 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 07:59:16AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 17:53 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 08:21:51AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 17:08 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 07:56:09AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 18:13 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 08:57:04AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 17:42 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 08:29:43AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 18:36 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 09:20:11AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 17:53 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 08:21:51AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 18:53 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 09:41:09AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 18:13 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 08:57:04AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 18:57 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 09:51:41AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 18:36 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 09:20:11AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 19:14 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 10:08:21AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 18:57 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 09:51:41AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 19:21 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 10:17:03AM -0600, Alex Williamson wrote: > > > > > > > > > And current code looks buggy if yes we need to fix it > > > > > > > > > somehow. > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 19:19 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 10:06:01AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 18:53 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 09:41:09AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 21:55 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 10:45:52AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 19:21 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 10:17:03AM -0600, Alex Williamson wrote: > >

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

2012-07-17 Thread Alex Williamson
On Tue, 2012-07-17 at 21:58 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 10:52:16AM -0600, Alex Williamson wrote: > > On Tue, 2012-07-17 at 19:19 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 10:06:01AM -0600, Alex Williamson wrote: > > >

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

2012-07-17 Thread Alex Williamson
On Wed, 2012-07-18 at 00:26 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:33:47PM -0600, Alex Williamson wrote: > > @@ -96,6 +183,9 @@ irqfd_shutdown(struct work_struct *work) > > * It is now safe to release the object's resources > > */ >

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