Re: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Alex Williamson
On Fri, 8 Mar 2019 16:07:54 -0600 Parav Pandit wrote: > Inherit dma mask of parent device in child mdev devices, so that > protocol stack can use right dma mask while doing dma mappings. > > Signed-off-by: Parav Pandit > --- > drivers/vfio/mdev/mdev_core.c | 4 > 1 file changed, 4

Re: [PATCH v7 9/9] vfio/type1: Handle different mdev isolation type

2019-03-07 Thread Alex Williamson
On Thu, 7 Mar 2019 00:44:54 -0800 Neo Jia wrote: > On Fri, Feb 22, 2019 at 10:19:27AM +0800, Lu Baolu wrote: > > This adds the support to determine the isolation type > > of a mediated device group by checking whether it has > > an iommu device. If an iommu device exists, an iommu > > domain

Re: [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci driver

2019-03-07 Thread Alex Williamson
On Sun, 3 Mar 2019 20:57:59 +0800 "Liu, Yi L" wrote: > This patchset aims to add a vfio-pci-like meta driver on existing > PCI devices, as a demo user of the vfio changes introduced in > "vfio/mdev: IOMMU aware mediated device" patchset from Baolu Lu. > > To build such a meta driver. We have

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

2019-02-22 Thread Alex Williamson
for v5.1-rc1 - Switch mdev to generic UUID API (Andy Shevchenko) - Fixup platform reset include paths (Masahiro Yamada) - Fix usage of MINORMASK (Chengguang Xu) - Remove noise from duplicate spapr table unsets (Alexey Kardashevskiy) - Restore device state after PM reset (Alex Williamson

VFIO updates for v5.1-rc1

2019-02-22 Thread Alex Williamson
) - Fixup platform reset include paths (Masahiro Yamada) - Fix usage of MINORMASK (Chengguang Xu) - Remove noise from duplicate spapr table unsets (Alexey Kardashevskiy) - Restore device state after PM reset (Alex Williamson) - Ensure memory translation enabled for PCI ROM access (Eric

Re: [PATCH v7 7/9] vfio/mdev: Add iommu related member in mdev_device

2019-02-22 Thread Alex Williamson
iommu device which represents this mdev > > in IOMMU's device scope. Drivers don't need to set the > > iommu device if it uses vendor defined isolation. > > > > Cc: Ashok Raj > > Cc: Jacob Pan > > Cc: Kevin Tian > > Cc: Liu Yi L > > Sugge

Re: [PATCH v3] vfio_pci: Enable memory accesses before calling pci_map_rom

2019-02-19 Thread Alex Williamson
s were disabled, re-enable them before the > call and disable them back again just after. > > Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver") > > Signed-off-by: Eric Auger > Suggested-by: Alex Williamson Applied to vfio next branch for v5.1. Thanks, Alex &

[PATCH v2] PCI: Fix "try" semantics of bus and slot reset

2019-02-18 Thread Alex Williamson
ct pci_error_handlers->reset_notify() usage with device_lock()") Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 54 ++--- 1 file changed, 26 insertions(+), 28 deletions(-) v2: White space only fix suggested by Myron Stowe,

[PATCH] PCI: Fix "try" semantics of bus and slot reset

2019-02-15 Thread Alex Williamson
ct pci_error_handlers->reset_notify() usage with device_lock()") Signed-off-by: Alex Williamson --- drivers/pci/pci.c | 53 ++--- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c25a

Re: [PATCH v2] vfio_pci: Enable memory accesses before calling pci_map_rom

2019-02-14 Thread Alex Williamson
On Thu, 14 Feb 2019 19:27:15 +0100 Auger Eric wrote: > Hi Alex, > > On 2/13/19 6:52 PM, Alex Williamson wrote: > > On Wed, 13 Feb 2019 12:06:10 +0100 > > Eric Auger wrote: > > > >> pci_map_rom/pci_get_rom_size() performs memory access in the ROM. > &g

Re: [PATCH v6 0/9] vfio/mdev: IOMMU aware mediated device

2019-02-14 Thread Alex Williamson
On Wed, 13 Feb 2019 12:02:52 +0800 Lu Baolu wrote: > Hi, > > The Mediate Device is a framework for fine-grained physical device > sharing across the isolated domains. Currently the mdev framework > is designed to be independent of the platform IOMMU support. As the > result, the DMA isolation

Re: [PATCH 1/5] vfio/type1: use pinned_vm instead of locked_vm to account pinned pages

2019-02-13 Thread Alex Williamson
On Tue, 12 Feb 2019 19:26:50 -0500 Daniel Jordan wrote: > On Tue, Feb 12, 2019 at 11:41:10AM -0700, Alex Williamson wrote: > > Daniel Jordan wrote: > > > On Mon, Feb 11, 2019 at 03:56:20PM -0700, Jason Gunthorpe wrote: > > > > I haven't looked at this super cl

Re: [PATCH v2] vfio_pci: Enable memory accesses before calling pci_map_rom

2019-02-13 Thread Alex Williamson
On Wed, 13 Feb 2019 12:06:10 +0100 Eric Auger wrote: > pci_map_rom/pci_get_rom_size() performs memory access in the ROM. > In case the Memory Space accesses were disabled, readw() is likely to > crash the host with a synchronous external abort (aarch64). As implied in response to Konrad, the

Re: [PATCH] vfio_pci: Enable memory accesses before calling pci_map_rom

2019-02-13 Thread Alex Williamson
On Wed, 13 Feb 2019 11:28:21 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Feb 13, 2019 at 11:14:06AM +0100, Eric Auger wrote: > > pci_map_rom/pci_get_rom_size() performs memory access in the ROM. > > In case the Memory Space accesses were disabled, readw() is likely to > > crash the host with a

Re: [PATCH 2/5] vfio/spapr_tce: use pinned_vm instead of locked_vm to account pinned pages

2019-02-12 Thread Alex Williamson
On Tue, 12 Feb 2019 17:56:18 +1100 Alexey Kardashevskiy wrote: > On 12/02/2019 09:44, Daniel Jordan wrote: > > Beginning with bc3e53f682d9 ("mm: distinguish between mlocked and pinned > > pages"), locked and pinned pages are accounted separately. The SPAPR > > TCE VFIO IOMMU driver accounts

Re: [PATCH 1/5] vfio/type1: use pinned_vm instead of locked_vm to account pinned pages

2019-02-12 Thread Alex Williamson
On Mon, 11 Feb 2019 18:11:53 -0500 Daniel Jordan wrote: > On Mon, Feb 11, 2019 at 03:56:20PM -0700, Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 05:44:33PM -0500, Daniel Jordan wrote: > > > @@ -266,24 +267,15 @@ static int vfio_lock_acct(struct vfio_dma *dma, > > > long npage, bool

[PATCH] vfio/pci: Restore device state on PM transition

2019-02-11 Thread Alex Williamson
pci to tag devices reporting PM reset support, save their state on transitions into D3 and restore on transitions back to D0. Reported-by: Alexander Duyck Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 71 +++ drivers/vfio/pci/vfio_pci_confi

Re: [PATCH V3 2/3] HYPERV/IOMMU: Add Hyper-V stub IOMMU driver

2019-02-07 Thread Alex Williamson
On Thu, 7 Feb 2019 23:33:48 +0800 lantianyu1...@gmail.com wrote: > From: Lan Tianyu > > On the bare metal, enabling X2APIC mode requires interrupt remapping > function which helps to deliver irq to cpu with 32-bit APIC ID. > Hyper-V doesn't provide interrupt remapping function so far and

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

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

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

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

Re: [RFC v3 02/21] iommu: Introduce cache_invalidate API

2019-01-29 Thread Alex Williamson
On Fri, 25 Jan 2019 17:49:20 +0100 Auger Eric wrote: > Hi Alex, > > On 1/11/19 10:30 PM, Alex Williamson wrote: > > On Tue, 8 Jan 2019 11:26:14 +0100 > > Eric Auger wrote: > > > >> From: "Liu, Yi L" > >> > >> In any virtuali

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

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

Re: [patch 9/9] vfio/pci: Cleanup license mess

2019-01-23 Thread Alex Williamson
0-or-later. > > Fix the SPDX identifier and remove the boiler plate as it is redundant. > > Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] > subdriver") > Signed-off-by: Thomas Gleixner > Cc: Alexey Kardashevskiy > Cc: Alex Williamson &

Re: [PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-22 Thread Alex Williamson
Hi Geert, The below patch comes about from the build regressions and improvements list you've sent out, but something doesn't add up that we'd be testing with an old compiler where initialization with { 0 } generates a "missing braces around initialization" warning. Is this really the case or

Re: [PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-22 Thread Alex Williamson
On Mon, 21 Jan 2019 12:51:14 +0100 Pierre Morel wrote: > On 18/01/2019 14:51, Jean-Philippe Brucker wrote: > > Hi Pierre, > > > > On 18/01/2019 13:29, Pierre Morel wrote: > >> On 17/01/2019 14:02, Robin Murphy wrote: > >>> On 15/01/2019 17:37, Pierre Morel wrote: > The s390 iommu can

Re: [RFC v3 18/21] vfio-pci: Add a new VFIO_REGION_TYPE_NESTED region type

2019-01-14 Thread Alex Williamson
On Mon, 14 Jan 2019 21:48:06 +0100 Auger Eric wrote: > Hi Alex, > > On 1/12/19 12:58 AM, Alex Williamson wrote: > > On Tue, 8 Jan 2019 11:26:30 +0100 > > Eric Auger wrote: > > > >> This patch adds a new 64kB region aiming to report nested mode > >

Re: [RFC v3 18/21] vfio-pci: Add a new VFIO_REGION_TYPE_NESTED region type

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:30 +0100 Eric Auger wrote: > This patch adds a new 64kB region aiming to report nested mode > translation faults. > > The region contains a header with the size of the queue, > the producer and consumer indices and then the actual > fault queue data. The producer is

Re: [RFC v3 06/21] vfio: VFIO_IOMMU_BIND_MSI

2019-01-11 Thread Alex Williamson
On Fri, 11 Jan 2019 16:02:44 -0700 Alex Williamson wrote: > On Tue, 8 Jan 2019 11:26:18 +0100 > Eric Auger wrote: > > > This patch adds the VFIO_IOMMU_BIND_MSI ioctl which aims at > > passing the guest MSI binding to the host. > > > > Signed-off-by: Eric Auge

Re: [RFC v3 06/21] vfio: VFIO_IOMMU_BIND_MSI

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:18 +0100 Eric Auger wrote: > This patch adds the VFIO_IOMMU_BIND_MSI ioctl which aims at > passing the guest MSI binding to the host. > > Signed-off-by: Eric Auger > > --- > > v2 -> v3: > - adapt to new proto of bind_guest_msi > - directly use

Re: [RFC v3 04/21] vfio: VFIO_IOMMU_SET_PASID_TABLE

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:16 +0100 Eric Auger wrote: > From: "Liu, Yi L" > > This patch adds VFIO_IOMMU_SET_PASID_TABLE ioctl which aims at > passing the virtual iommu guest configuration to the VFIO driver > downto to the iommu subsystem. > > Signed-off-by: Jacob Pan > Signed-off-by: Liu,

Re: [RFC v3 03/21] iommu: Introduce bind_guest_msi

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:15 +0100 Eric Auger wrote: > On ARM, MSI are translated by the SMMU. An IOVA is allocated > for each MSI doorbell. If both the host and the guest are exposed > with SMMUs, we end up with 2 different IOVAs allocated by each. > guest allocates an IOVA (gIOVA) to map onto

Re: [RFC v3 02/21] iommu: Introduce cache_invalidate API

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:14 +0100 Eric Auger wrote: > From: "Liu, Yi L" > > In any virtualization use case, when the first translation stage > is "owned" by the guest OS, the host IOMMU driver has no knowledge > of caching structure updates unless the guest invalidation activities > are

Re: [RFC v3 01/21] iommu: Introduce set_pasid_table API

2019-01-11 Thread Alex Williamson
On Tue, 8 Jan 2019 11:26:13 +0100 Eric Auger wrote: > From: Jacob Pan > > In virtualization use case, when a guest is assigned > a PCI host device, protected by a virtual IOMMU on a guest, > the physical IOMMU must be programmed to be consistent with > the guest mappings. If the physical

Re: [PATCH] vfio_pci: set TRACE_INCLUDE_PATH to fix the build error

2019-01-10 Thread Alex Williamson
On Fri, 11 Jan 2019 12:13:35 +1100 Alexey Kardashevskiy wrote: > On 11/01/2019 01:47, Steven Rostedt wrote: > > On Tue, Jan 08, 2019 at 12:08:03PM +0900, Masahiro Yamada wrote: > >> --- > >> > >> drivers/vfio/pci/trace.h | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >>

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

2019-01-10 Thread Alex Williamson
Williamson) Alex Williamson (1): vfio/type1: Fix unmap overflow off-by-one Masahiro Yamada (1): vfio/pci: set TRACE_INCLUDE_PATH to fix the build error drivers/vfio/pci/trace.h| 2 +- drivers/vfio/vfio_iommu_type1.c

Re: [PATCH v1 1/2] vfio:iommu: Use capabilities do report IOMMU informations

2019-01-09 Thread Alex Williamson
On Wed, 9 Jan 2019 18:07:19 +0100 Pierre Morel wrote: > On 09/01/2019 16:37, Alex Williamson wrote: > > On Wed, 9 Jan 2019 13:41:53 +0100 > > Pierre Morel wrote: > > > >> We add a new flag, VFIO_IOMMU_INFO_CAPABILITIES, inside the > >> vfio_

Re: [PATCH v1 1/2] vfio:iommu: Use capabilities do report IOMMU informations

2019-01-09 Thread Alex Williamson
On Wed, 9 Jan 2019 13:41:53 +0100 Pierre Morel wrote: > We add a new flag, VFIO_IOMMU_INFO_CAPABILITIES, inside the > vfio_iommu_type1_info to specify the support for capabilities. > > We add a new capability, with id VFIO_IOMMU_INFO_CAP_DMA > in the capability list of the VFIO_IOMMU_GET_INFO

Re: [PATCH] vfio_pci: set TRACE_INCLUDE_PATH to fix the build error

2019-01-08 Thread Alex Williamson
On Tue, 8 Jan 2019 12:08:03 +0900 Masahiro Yamada wrote: > drivers/vfio/pci/vfio_pci_nvlink2.c cannot be compiled for in-tree > building. > > CC drivers/vfio/pci/vfio_pci_nvlink2.o > In file included from drivers/vfio/pci/trace.h:102, >from

[PATCH] vfio/type1: Fix unmap overflow off-by-one

2019-01-08 Thread Alex Williamson
lence integer overflow warning") Link: https://bugzilla.redhat.com/show_bug.cgi?id=1662291 Cc: Dan Carpenter Reported-by: Pei Zhang Debugged-by: Peter Xu Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] vfio_pci: Add local source directory as include

2019-01-07 Thread Alex Williamson
On Tue, 8 Jan 2019 10:52:43 +1100 Alexey Kardashevskiy wrote: > On 08/01/2019 07:13, Alex Williamson wrote: > > On Mon, 7 Jan 2019 20:39:19 +0900 > > Masahiro Yamada wrote: > > > >> On Mon, Jan 7, 2019 at 8:09 PM Cornelia Huck wrote: > >>&g

Re: [PATCH] vfio_pci: Add local source directory as include

2019-01-07 Thread Alex Williamson
On Mon, 7 Jan 2019 20:39:19 +0900 Masahiro Yamada wrote: > On Mon, Jan 7, 2019 at 8:09 PM Cornelia Huck wrote: > > > > On Mon, 7 Jan 2019 19:12:10 +0900 > > Masahiro Yamada wrote: > > > > > On Mon, Jan 7, 2019 at 6:18 PM Michael Ellerman > > > wrote: > > > > > > > > Laura Abbott writes:

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

2018-12-21 Thread Alex Williamson
with per bus lock to allow concurrent open and release (Alex Williamson) - Declare mdev function as static (Paolo Cretaro) - Convert char to u8 in mdev/mtty sample driver (Nathan Chancellor) Alex Williamson (1): vfio/pci

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Fri, 21 Dec 2018 12:50:00 +1100 Alexey Kardashevskiy wrote: > On 21/12/2018 12:37, Alex Williamson wrote: > > On Fri, 21 Dec 2018 12:23:16 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 21/12/2018 03:46, Alex Williamson wrote: > >>> On Th

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Fri, 21 Dec 2018 12:23:16 +1100 Alexey Kardashevskiy wrote: > On 21/12/2018 03:46, Alex Williamson wrote: > > On Thu, 20 Dec 2018 19:23:50 +1100 > > Alexey Kardashevskiy wrote: > > > >> POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are n

Re: [PATCH kernel v7 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-20 Thread Alex Williamson
On Thu, 20 Dec 2018 19:23:50 +1100 Alexey Kardashevskiy wrote: > POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not > pluggable PCIe devices but still have PCIe links which are used > for config space and MMIO. In addition to that the GPUs have 6 NVLinks > which are connected

Re: [PATCH kernel v6 20/20] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver

2018-12-19 Thread Alex Williamson
_ID_IBM && > + IS_ENABLED(CONFIG_VFIO_PCI_NVLINK2)) { > + ret = vfio_pci_ibm_npu2_init(vdev); > + if (ret && ret != -ENODEV) { > + dev_warn(>pdev->dev, > + "Failed t

Re: [PATCH kernel v6 18/20] vfio_pci: Allow mapping extra regions

2018-12-19 Thread Alex Williamson
ing > them to the userspace. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson > Acked-by: Alex Williamson > --- > Changes: > v2: > * reverted one of mistakenly removed error checks > --- > drivers/vfio/pci/vfio_pci_private.h | 3 +++ > drive

Re: [PATCH kernel v6 19/20] vfio_pci: Allow regions to add own capabilities

2018-12-19 Thread Alex Williamson
> This adds an add_capability() hook to vfio_pci_regops. > > Signed-off-by: Alexey Kardashevskiy > Acked-by: Alex Williamson > --- > Changes: > v3: > * removed confusing rationale for the patch, the next patch makes > use of it anyway > --- > drivers/vfio/pci/v

Re: [PATCH] vfio-mdev/samples: Use u8 instead of char for handle functions

2018-12-17 Thread Alex Williamson
On Fri, 19 Oct 2018 11:04:27 -0700 Nathan Chancellor wrote: > Clang warns: > > samples/vfio-mdev/mtty.c:592:39: warning: implicit conversion from 'int' > to 'char' changes value from 162 to -94 [-Wconstant-conversion] > *buf = UART_MSR_DSR | UART_MSR_DDSR | UART_MSR_DCD; >

Re: [PATCH] vfio/mdev: add static modifier to add_mdev_supported_type

2018-12-12 Thread Alex Williamson
On Tue, 13 Nov 2018 09:45:43 +0100 Paolo Cretaro wrote: > Set add_mdev_supported_type as static since it is only used within > mdev_sysfs.c. > This fixes -Wmissing-prototypes gcc warning. > > Signed-off-by: Paolo Cretaro > --- > drivers/vfio/mdev/mdev_sysfs.c | 4 ++-- > 1 file changed, 2

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-30 Thread Alex Williamson
On Fri, 30 Nov 2018 06:24:16 + Bharat Bhushan wrote: > Hi Alex, > > > -Original Message- > > From: Alex Williamson > > Sent: Friday, November 30, 2018 11:26 AM > > To: Bharat Bhushan > > Cc: Bjorn Helgaas ; Bjorn Helgaas > > ; linux-...@

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-30 Thread Alex Williamson
On Fri, 30 Nov 2018 06:24:16 + Bharat Bhushan wrote: > Hi Alex, > > > -Original Message- > > From: Alex Williamson > > Sent: Friday, November 30, 2018 11:26 AM > > To: Bharat Bhushan > > Cc: Bjorn Helgaas ; Bjorn Helgaas > > ; linux-...@

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-29 Thread Alex Williamson
gt; > > > On Tue, Nov 27, 2018 at 10:32 PM Bharat Bhushan > > wrote: > > > > > > -Original Message- > > > > From: Alex Williamson > > > > Sent: Tuesday, November 27, 2018 9:39 PM > > > > To: Bjorn Helgaas > > &g

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-29 Thread Alex Williamson
gt; > > > On Tue, Nov 27, 2018 at 10:32 PM Bharat Bhushan > > wrote: > > > > > > -Original Message- > > > > From: Alex Williamson > > > > Sent: Tuesday, November 27, 2018 9:39 PM > > > > To: Bjorn Helgaas > > &g

Re: [PATCH v2 2/3] vfio: ap: ioctl definitions for AP Queue Interrupt Control

2018-11-27 Thread Alex Williamson
On Thu, 22 Nov 2018 18:11:14 +0100 Pierre Morel wrote: > We define two VFIO ioctl command to setup and clear > the AP Queues interrupt. > > Arguments passed by the guest are: > - the apqn, AP queue number > - the Notification by address > - the identifier of the previously associated adapter

Re: [PATCH v2 2/3] vfio: ap: ioctl definitions for AP Queue Interrupt Control

2018-11-27 Thread Alex Williamson
On Thu, 22 Nov 2018 18:11:14 +0100 Pierre Morel wrote: > We define two VFIO ioctl command to setup and clear > the AP Queues interrupt. > > Arguments passed by the guest are: > - the apqn, AP queue number > - the Notification by address > - the identifier of the previously associated adapter

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-27 Thread Alex Williamson
On Tue, 27 Nov 2018 09:33:56 -0600 Bjorn Helgaas wrote: > [+cc David, Jan, Alex, Maik, Chris] > > On Tue, Nov 27, 2018 at 08:46:33AM +, Bharat Bhushan wrote: > > NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after > > bus reset with e1000e. Link state of device does not

Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus

2018-11-27 Thread Alex Williamson
On Tue, 27 Nov 2018 09:33:56 -0600 Bjorn Helgaas wrote: > [+cc David, Jan, Alex, Maik, Chris] > > On Tue, Nov 27, 2018 at 08:46:33AM +, Bharat Bhushan wrote: > > NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after > > bus reset with e1000e. Link state of device does not

[PATCH v2] vfio/pci: Parallelize device open and release

2018-11-16 Thread Alex Williamson
slot reset as we're only attempting a single reset for this group of devices anyway. This allows much greater scaling as we're bounded in the number of devices protected by a single reflck object. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Reviewed-by: Eric Auger Signed-of

[PATCH v2] vfio/pci: Parallelize device open and release

2018-11-16 Thread Alex Williamson
slot reset as we're only attempting a single reset for this group of devices anyway. This allows much greater scaling as we're bounded in the number of devices protected by a single reflck object. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Reviewed-by: Eric Auger Signed-of

Re: [PATCH] vfio/pci: Parallelize device open and release

2018-11-13 Thread Alex Williamson
On Tue, 13 Nov 2018 15:42:49 +0100 Auger Eric wrote: > Hi Alex, > > On 11/9/18 11:09 PM, Alex Williamson wrote: > > In commit 61d792562b53 ("vfio-pci: Use mutex around open, release, and > > remove") a mutex was added to freeze the refcnt for a device s

Re: [PATCH] vfio/pci: Parallelize device open and release

2018-11-13 Thread Alex Williamson
On Tue, 13 Nov 2018 15:42:49 +0100 Auger Eric wrote: > Hi Alex, > > On 11/9/18 11:09 PM, Alex Williamson wrote: > > In commit 61d792562b53 ("vfio-pci: Use mutex around open, release, and > > remove") a mutex was added to freeze the refcnt for a device s

[PATCH] vfio/pci: Parallelize device open and release

2018-11-09 Thread Alex Williamson
e released in parallel while serializing per bus/slot. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 157 ++- drivers/vfio/pci/vfio_pci_private.h |6 + 2 files ch

[PATCH] vfio/pci: Parallelize device open and release

2018-11-09 Thread Alex Williamson
e released in parallel while serializing per bus/slot. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c | 157 ++- drivers/vfio/pci/vfio_pci_private.h |6 + 2 files ch

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 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

[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

[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 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

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

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 > >

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 > >

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 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 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 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 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

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

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

2018-10-08 Thread Alex Williamson
On Mon, 8 Oct 2018 13:06:20 -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

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

2018-10-08 Thread Alex Williamson
On Mon, 8 Oct 2018 13:06:20 -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

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

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

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-28 Thread Alex Williamson
On Fri, 28 Sep 2018 14:10:26 +0530 Kirti Wankhede wrote: > On 9/28/2018 11:10 AM, Gerd Hoffmann wrote: > >>> + case MBOCHS_EDID_REGION_INDEX: > >>> + ext->base.argsz = sizeof(*ext); > >>> + ext->base.offset = MBOCHS_EDID_OFFSET; > >>> + ext->base.size = MBOCHS_EDID_SIZE;

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-28 Thread Alex Williamson
On Fri, 28 Sep 2018 14:10:26 +0530 Kirti Wankhede wrote: > On 9/28/2018 11:10 AM, Gerd Hoffmann wrote: > >>> + case MBOCHS_EDID_REGION_INDEX: > >>> + ext->base.argsz = sizeof(*ext); > >>> + ext->base.offset = MBOCHS_EDID_OFFSET; > >>> + ext->base.size = MBOCHS_EDID_SIZE;

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-27 Thread Alex Williamson
On Fri, 28 Sep 2018 01:27:16 +0530 Kirti Wankhede wrote: > On 9/21/2018 2:00 PM, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > @@ -964,6 +1050,20 @@ static int mbochs_get_region_info(struct mdev_device > > *mdev, > > region_info->flags = (VFIO_REGION_INFO_FLAG_READ |

Re: [PATCH v3 2/2] vfio: add edid support to mbochs sample driver

2018-09-27 Thread Alex Williamson
On Fri, 28 Sep 2018 01:27:16 +0530 Kirti Wankhede wrote: > On 9/21/2018 2:00 PM, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > @@ -964,6 +1050,20 @@ static int mbochs_get_region_info(struct mdev_device > > *mdev, > > region_info->flags = (VFIO_REGION_INFO_FLAG_READ |

Re: [PATCH v11 26/26] s390: doc: detailed specifications for AP virtualization

2018-09-26 Thread Alex Williamson
On Tue, 25 Sep 2018 19:16:41 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > This patch provides documentation describing the AP architecture and > design concepts behind the virtualization of AP devices. It also > includes an example of how to configure AP devices for exclusive > use of

Re: [PATCH v11 26/26] s390: doc: detailed specifications for AP virtualization

2018-09-26 Thread Alex Williamson
On Tue, 25 Sep 2018 19:16:41 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > This patch provides documentation describing the AP architecture and > design concepts behind the virtualization of AP devices. It also > includes an example of how to configure AP devices for exclusive > use of

Re: [PATCH v2] vfio/pci: Mask buggy SR-IOV VF INTx support

2018-09-21 Thread Alex Williamson
On Thu, 20 Sep 2018 22:53:04 -0700 Christoph Hellwig wrote: > > +/* > > + * Nag about hardware bugs, hopefully to have vendors fix them, but at > > least > > + * to collect a list of dependencies for the VF INTx pin quirk below. > > + */ > > +static const struct pci_device_id

Re: [PATCH v2] vfio/pci: Mask buggy SR-IOV VF INTx support

2018-09-21 Thread Alex Williamson
On Thu, 20 Sep 2018 22:53:04 -0700 Christoph Hellwig wrote: > > +/* > > + * Nag about hardware bugs, hopefully to have vendors fix them, but at > > least > > + * to collect a list of dependencies for the VF INTx pin quirk below. > > + */ > > +static const struct pci_device_id

[PATCH v2] vfio/pci: Mask buggy SR-IOV VF INTx support

2018-09-20 Thread Alex Williamson
if the hardware vendor doesn't plan to fix it. Known devices with this issue: 8086:270c Signed-off-by: Alex Williamson --- v2: Moved the warning to vfio_config_init(), so it triggers on device open and no longer depends on the user looking at the number of INTx IRQs available. Also changed from

[PATCH v2] vfio/pci: Mask buggy SR-IOV VF INTx support

2018-09-20 Thread Alex Williamson
if the hardware vendor doesn't plan to fix it. Known devices with this issue: 8086:270c Signed-off-by: Alex Williamson --- v2: Moved the warning to vfio_config_init(), so it triggers on device open and no longer depends on the user looking at the number of INTx IRQs available. Also changed from

Re: [PATCH v2 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-19 Thread Alex Williamson
On Tue, 18 Sep 2018 15:38:12 +0200 Gerd Hoffmann wrote: No empty commit logs please. There must be something to say about the goal or motivation beyond the subject. > Signed-off-by: Gerd Hoffmann > --- > include/uapi/linux/vfio.h | 39 +++ > 1 file

Re: [PATCH v2 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-19 Thread Alex Williamson
On Tue, 18 Sep 2018 15:38:12 +0200 Gerd Hoffmann wrote: No empty commit logs please. There must be something to say about the goal or motivation beyond the subject. > Signed-off-by: Gerd Hoffmann > --- > include/uapi/linux/vfio.h | 39 +++ > 1 file

Re: [PATCH 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-14 Thread Alex Williamson
On Fri, 14 Sep 2018 14:25:52 +0200 Gerd Hoffmann wrote: > Hi, > > > Another possible implementation would be via a vfio region, we already > > support device specific regions via capabilities with vfio_region_info, > > so we could have an edid region which could handle both input and > >

Re: [PATCH 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-14 Thread Alex Williamson
On Fri, 14 Sep 2018 14:25:52 +0200 Gerd Hoffmann wrote: > Hi, > > > Another possible implementation would be via a vfio region, we already > > support device specific regions via capabilities with vfio_region_info, > > so we could have an edid region which could handle both input and > >

Re: [PATCH 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-13 Thread Alex Williamson
On Thu, 13 Sep 2018 07:47:44 +0200 Gerd Hoffmann wrote: Some sort of commit log indicating the motivation for the change is always appreciated. > Signed-off-by: Gerd Hoffmann > --- > include/uapi/linux/vfio.h | 38 ++ > 1 file changed, 38 insertions(+) > >

Re: [PATCH 1/2] vfio: add edid api for display (vgpu) devices.

2018-09-13 Thread Alex Williamson
On Thu, 13 Sep 2018 07:47:44 +0200 Gerd Hoffmann wrote: Some sort of commit log indicating the motivation for the change is always appreciated. > Signed-off-by: Gerd Hoffmann > --- > include/uapi/linux/vfio.h | 38 ++ > 1 file changed, 38 insertions(+) > >

Re: [PATCH] vfio: fix potential memory leak in vfio_msi_cap_len

2018-09-04 Thread Alex Williamson
On Mon, 27 Aug 2018 05:47:21 -0700 Li Qiang wrote: > Free the vdev->msi_perm in error path. > > Signed-off-by: Li Qiang > --- > drivers/vfio/pci/vfio_pci_config.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/vfio_pci_config.c >

Re: [PATCH] vfio: fix potential memory leak in vfio_msi_cap_len

2018-09-04 Thread Alex Williamson
On Mon, 27 Aug 2018 05:47:21 -0700 Li Qiang wrote: > Free the vdev->msi_perm in error path. > > Signed-off-by: Li Qiang > --- > drivers/vfio/pci/vfio_pci_config.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/vfio_pci_config.c >

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