orm
support all PCI BARs are page aligned.
- Add support for a VFIO-PCI ioctl to indicate that platform
support mmapping MSI-X table.
Yongji Xie (3):
powerpc/pci: Enforce all MMIO BARs to be page aligned
vfio-pci: Allow to mmap sub-page MMIO BARs if all MMIO BARs are p
-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
arch/powerpc/kernel/pci-common.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 0f7a60f..6989e0f 100644
--- a/arch/powerpc/kernel/pci-common.c
On 2015/12/17 4:04, Alex Williamson wrote:
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page
may be shared with other BARs.
But we should allow to mmap these sub-page M
On 2015/12/17 4:14, Alex Williamson wrote:
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap MSI-X table in
case that user get to touch this directly.
However, EEH mechanism could ensure that a given pci device
can only shoot the MSIs
On 2015/12/18 5:46, Alex Williamson wrote:
On Thu, 2015-12-17 at 18:26 +0800, yongji xie wrote:
On 2015/12/17 4:04, Alex Williamson wrote:
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs beca
userspace that it's safe to mmap MSI-X table.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |5 -
drivers/vfio/pci/vfio_pci_private.h |5 +
include/uapi/linux/vfio.h |2 ++
3 files changed, 11 insertions(+), 1 de
her BARs.
This patch adds support for this case and we also add a
VFIO_DEVICE_FLAGS_PCI_PAGE_ALIGNED flag to notify userspace that
platform supports all MMIO BARs to be page aligned.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c
ts PAGE_SIZE is 64KB.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |4
arch/powerpc/include/asm/pci.h | 11 +++
drivers/pci/pci.c | 17 +
drivers/pci/pci.h |7 ++
IZE.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 7e9f497..09b3805 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++
for mmapping MSI-X table.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/Kconfig|4
drivers/vfio/pci/vfio_pci.c |6 --
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index 0
ags: VFIO_DEVICE_FLAGS_PCI_PAGE_ALIGNED
VFIO_DEVICE_FLAGS_PCI_MSIX_MMAP
- Add a Kconfig option to support for mmapping MSI-X table.
[1] https://lkml.org/lkml/2015/11/23/748
Yongji Xie (3):
PCI: Add support for enforcing all MMIO BARs to be page aligned
vfio-pci: Allow to mmap sub-page MMIO BARs if all MMIO B
On 2016/1/5 4:47, Alex Williamson wrote:
On Thu, 2015-12-31 at 16:50 +0800, Yongji Xie wrote:
When vfio passthrough a PCI device of which MMIO BARs
are smaller than PAGE_SIZE, guest will not handle the
mmio accesses to the BARs which leads to mmio emulations
in host.
This is because vfio
2016 14:09:57 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
Current vfio-pci implementation disallows to mmap the page
containing MSI-X table in case that users can write directly
to MSI-X table and generate an incorrect MSIs.
However, this will cause some performance issu
-ci/linux/commits/Yongji-Xie/PCI-Add-a-new-PCI_BUS_FLAGS_MSI_REMAP-flag/20160530-215348
base: https://github.com/awilliam/linux-vfio.git next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget
https
-ci/linux/commits/Yongji-Xie/PCI-Add-a-new-PCI_BUS_FLAGS_MSI_REMAP-flag/20160530-215348
base: https://github.com/awilliam/linux-vfio.git next
config: arm-sa1100 (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget
https://git.kernel.org
Hi, Eric
On 2016/6/8 15:41, Auger Eric wrote:
Hi Yongji,
Le 02/06/2016 à 08:09, Yongji Xie a écrit :
Current vfio-pci implementation disallows to mmap the page
containing MSI-X table in case that users can write directly
to MSI-X table and generate an incorrect MSIs.
However
On 2016/5/25 4:55, Bjorn Helgaas wrote:
On Wed, Apr 27, 2016 at 08:43:26PM +0800, Yongji Xie wrote:
We introduce a new pci_bus_flags, PCI_BUS_FLAGS_MSI_REMAP
which indicates all devices on the bus are protected by the
hardware which supports IRQ remapping(intel naming).
This changelog
On 2016/5/25 5:04, Bjorn Helgaas wrote:
On Wed, Apr 27, 2016 at 08:43:28PM +0800, Yongji Xie wrote:
On ARM HW the capability of IRQ remapping is abstracted on
MSI controller side. MSI_FLAG_IRQ_REMAPPING is used to advertise
this [1].
To have a universal flag to test this capability
On 2016/5/25 5:11, Bjorn Helgaas wrote:
On Wed, Apr 27, 2016 at 08:43:27PM +0800, Yongji Xie wrote:
The capability of IRQ remapping is abstracted on IOMMU side on
some archs. There is a existing flag IOMMU_CAP_INTR_REMAP for this.
To have a universal flag to test this capability for different
be applied to VFs whose BARs are always
page aligned and should be never reassigned according to SRIOV
spec.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |2 ++
arch/powerpc/include/asm/pci.h |2 ++
drivers/pci/pci.c
to use firmware
setup and not to reassign any resources.
To solve this problem, this patch ignores resource_alignment
if PCI_PROBE_ONLY was set.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/p
ARs; patch 4
modified resource_alignment to support syntax which can be used to
enforce the alignment of all MMIO BARs to be at least PAGE_SIZE.
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (4):
PCI: Ignore resource_alignm
.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/msi.c | 15 +++
drivers/pci/probe.c |3 +++
include/linux/msi.h |5 -
3 files changed, 22 insertions(+), 1 de
directly.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c | 17 ++---
drivers/vfio/pci/vfio_pci_rdwr.c |3 ++-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/setup-bus.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 55641a3..216ddbc 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup
chs.
With this flag enabled, we can easily know whether it's safe
to expose MSI-X tables of PCI BARs to userspace. Some usespace
drivers such as VFIO may benefit from this.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie &
://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Yongji Xie (6):
PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag
PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ remapping
PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping
iommu: Set
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/probe.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2b9e3ba..15a33e2 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -16,6 +16,7 @@
#include
#i
Any IODA host bridge have the capability of IRQ remapping.
So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge
is detected.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru>
---
arch/powerpc/platforms/powernv/pci-i
"noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletion
Some iommu drivers would be initialized after PCI device
enumeration. So PCI_BUS_FLAGS_MSI_REMAP would not be set
when probing PCI devices although IOMMU enables capability
of IRQ remapping. This patch tests this capability and
set the flag when iommu driver is initialized.
Signed-off-by: Yongji
://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Yongji Xie (6):
PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag
PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ remapping
PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping
iommu: Set
directly.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c | 17 ++---
drivers/vfio/pci/vfio_pci_rdwr.c |3 ++-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/msi.c | 15 +++
drivers/pci/probe.c |3 +++
include/linux/msi.h |5 -
3 files changed, 22 insertions(+), 1 de
Any IODA host bridge have the capability of IRQ remapping.
So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge
is detected.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru>
---
arch/powerpc/platforms/powernv/pci-i
be applied to VFs whose BARs are always
page aligned and should be never reassigned according to SRIOV
spec.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |2 ++
arch/powerpc/include/asm/pci.h |2 ++
drivers/pci/pci.c
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/probe.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2b9e3ba..15a33e2 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -16,6 +16,7 @@
#include
#i
to use firmware
setup and not to reassign any resources.
To solve this problem, this patch ignores resource_alignment
if PCI_PROBE_ONLY was set.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/p
Some iommu drivers would be initialized after PCI device
enumeration. So PCI_BUS_FLAGS_MSI_REMAP would not be set
when probing PCI devices although IOMMU enables capability
of IRQ remapping. This patch tests this capability and
set the flag when iommu driver is initialized.
Signed-off-by: Yongji
chs.
With this flag enabled, we can easily know whether it's safe
to expose MSI-X tables of PCI BARs to userspace. Some usespace
drivers such as VFIO may benefit from this.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie &
ARs; patch 4
modified resource_alignment to support syntax which can be used to
enforce the alignment of all MMIO BARs to be at least PAGE_SIZE.
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (4):
PCI: Ignore resource_alignm
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/setup-bus.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 55641a3..216ddbc 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup
"noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletion
On 2016/6/21 10:16, Yongji Xie wrote:
On 2016/6/21 9:43, Bjorn Helgaas wrote:
On Thu, Jun 02, 2016 at 01:46:48PM +0800, Yongji Xie wrote:
The resource_alignment will releases memory resources allocated
by firmware so that kernel can reassign new resources later on.
But this will cause
On 2016/6/21 10:26, Bjorn Helgaas wrote:
On Thu, Jun 02, 2016 at 01:46:51PM +0800, Yongji Xie wrote:
When vfio passthrough a PCI device of which MMIO BARs are
smaller than PAGE_SIZE, guest will not handle the mmio
accesses to the BARs which leads to mmio emulations in host.
This is because
On 2016/6/21 9:43, Bjorn Helgaas wrote:
On Thu, Jun 02, 2016 at 01:46:48PM +0800, Yongji Xie wrote:
The resource_alignment will releases memory resources allocated
by firmware so that kernel can reassign new resources later on.
But this will cause the problem that no resources can be
allocated
On 2016/6/21 9:57, Bjorn Helgaas wrote:
On Thu, Jun 02, 2016 at 01:46:50PM +0800, Yongji Xie wrote:
When using resource_alignment kernel parameter, the current
implement reassigns the alignment by changing resources' size
which can potentially break some drivers. For example, the driver
uses
On 2016/6/21 9:50, Bjorn Helgaas wrote:
On Thu, Jun 02, 2016 at 01:46:49PM +0800, Yongji Xie wrote:
Now we use the IORESOURCE_STARTALIGN to identify bridge resources
in __assign_resources_sorted(). That's quite fragile. We can't
make sure that the PCI devices' resources will not use
I-X table.
[1] https://lkml.org/lkml/2015/11/23/748
Yongji Xie (5):
PCI: Add support for enforcing all MMIO BARs to be page aligned
vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive
PCI: Add host bridge attribute to indicate filtering of MSIs is supported
powerpc/powe
ecause
its PAGE_SIZE is 64KB.
Note that the kernel parameter won't works if kernel doesn't do
resources reallocation.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |5 +
arch/powerpc/include/asm/pci.h | 11
this case, this patch adds a pci_host_bridge
attribute to indicate if this PCI host bridge supports
filtering of MSIs.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/host-bridge.c |6 ++
include/linux/pci.h |3 +++
2 files changed, 9 insertions(+)
diff
ARs.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 7e9f497..11fd0f0 100644
--- a/drivers/vfio/pci/vfio_pc
Current vfio-pci implementation disallows to mmap MSI-X
table in case that user get to touch this directly.
But we should allow to mmap these MSI-X tables if the PCI
host bridge supports filtering of MSIs.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio
This patch enables msi_filtered bit for any IODA host bridge.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/pci-ioda.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c
b/arch/powerpc/pla
On 2016/1/29 6:46, Alex Williamson wrote:
On Fri, 2016-01-15 at 15:06 +0800, Yongji Xie wrote:
MSI-X tables are not allowed to be mmapped in vfio-pci
driver in case that user get to touch this directly.
This will cause some performance issues when when PCI
adapters have critical registers
On 2016/1/29 6:46, Alex Williamson wrote:
On Fri, 2016-01-15 at 15:06 +0800, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap MSI-X
table in case that user get to touch this directly.
But we should allow to mmap these MSI-X tables if the PCI
host bridge supports filtering
On 2016/1/29 6:46, Alex Williamson wrote:
On Fri, 2016-01-15 at 15:06 +0800, Yongji Xie wrote:
When vfio passthrough a PCI device of which MMIO BARs
are smaller than PAGE_SIZE, guest will not handle the
mmio accesses to the BARs which leads to mmio emulations
in host.
This is because vfio
Ping...
Alex, any comment?
Regards,
Yongji Xie
On 2016/1/15 15:06, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs and MSI-X table. This is because
sub-page BARs' mmio page may be shared with other BARs and MSI-X table
sho
On 2016/1/30 3:01, Alex Williamson wrote:
On Fri, 2016-01-29 at 18:37 +0800, Yongji Xie wrote:
On 2016/1/29 6:46, Alex Williamson wrote:
On Fri, 2016-01-15 at 15:06 +0800, Yongji Xie wrote:
When vfio passthrough a PCI device of which MMIO BARs
are smaller than PAGE_SIZE, guest will not handle
On 2016/1/30 3:05, Alex Williamson wrote:
- Original Message -
On 2016/1/29 6:46, Alex Williamson wrote:
On Fri, 2016-01-15 at 15:06 +0800, Yongji Xie wrote:
MSI-X tables are not allowed to be mmapped in vfio-pci
driver in case that user get to touch this directly.
This will cause
On 2016/1/16 1:24, David Laight wrote:
From: Yongji Xie
Sent: 15 January 2016 07:06
MSI-X tables are not allowed to be mmapped in vfio-pci
driver in case that user get to touch this directly.
This will cause some performance issues when when PCI
adapters have critical registers in the same
On 2016/3/10 10:19, Alexey Kardashevskiy wrote:
On 03/07/2016 06:48 PM, Yongji Xie wrote:
When using resource_alignment kernel parameter, the current
implement reassigns the alignment by changing resources' size
which can potentially break some drivers.
How can this possibly break any driver
On 2016/3/17 0:32, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:38 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
This patch adds IOMMU_CAP_INTR_REMAP for IODA host bridge so that
we can mmap MSI-X table in vfio driver.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
On 2016/3/17 20:40, Alex Williamson wrote:
On Thu, 17 Mar 2016 19:28:34 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:35 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
When vfio passthrough
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:35 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
When vfio passthrough a PCI device of which MMIO BARs
are smaller than PAGE_SIZE, guest will not handle the
mmio accesses to the BARs which leads to mmio emul
Ping.
On 2016/3/7 15:48, Yongji Xie wrote:
Current vfio-pci implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs and MSI-X table. This is because
sub-page BARs' mmio page may be shared with other BARs and MSI-X table
should not be accessed directly from the guest for secur
r be assigned into the
hole. So we add shadow resources and put them
into the hole in this patch. With these two
guarantees, I think it should be safe to mmap
sub-page BAR.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_p
_FLAGS_PCI_PAGE_ALIGNED
VFIO_DEVICE_FLAGS_PCI_MSIX_MMAP
- Add a Kconfig option to support for mmapping MSI-X table.
[1] http://www.spinics.net/lists/kvm/msg127812.html
Yongji Xie (7):
PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set
PCI: Do not Use IORESOURCE_STARTALIGN to identify bridge resources
This patch enables mmapping MSI-X tables if
hardware supports interrupt remapping which
can ensure that a given pci device can only
shoot the MSIs assigned for it.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |9 +++--
drivers/vf
ity, like this patch does.
Compared with IOMMU_CAP_INTR_REMAP, this
flag is more common. Any arch can set/use this
easily. And it can provide a better granularity
(pci_bus_type -> pci_bus).
[1] http://www.spinics.net/lists/kvm/msg130262.html
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com&g
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/setup-bus.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 7796d0a..bffcf1e 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup
esize" for the
parameter to solve this problem.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 37 +--
2 files changed, 31 insertions(+), 11 deletion
ent of all MMIO BARs to be at
least PAGE_SIZE so that one BAR's mmio page would
not be shared with other BARs.
And we also define a macro PCIBIOS_MIN_ALIGNMENT
to enable this automatically on PPC64 platform
which can easily hit this issue because its
PAGE_SIZE is 64KB.
Signed-off-by: Yongj
to use firmware setup and not to
reassign any resources.
To solve this problem, this patch ignores
resource_alignment if PCI_PROBE_ONLY was set.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/p
On 2016/4/6 22:45, Alex Williamson wrote:
On Tue, 5 Apr 2016 21:46:44 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
This patch enables mmapping MSI-X tables if
hardware supports interrupt remapping which
can ensure that a given pci device can only
shoot the MSIs assigned for it.
Hi Eric,
On 2016/4/8 17:10, Eric Auger wrote:
Hi Yongji,
On 04/08/2016 10:14 AM, Yongji Xie wrote:
Hi Eric,
On 2016/4/7 22:23, Eric Auger wrote:
Hi Yongji,
On 04/07/2016 01:38 PM, Yongji Xie wrote:
On 2016/4/6 22:45, Alex Williamson wrote:
On Tue, 5 Apr 2016 21:46:44 +0800
Yongji Xie <
Hi Eric,
On 2016/4/7 22:23, Eric Auger wrote:
Hi Yongji,
On 04/07/2016 01:38 PM, Yongji Xie wrote:
On 2016/4/6 22:45, Alex Williamson wrote:
On Tue, 5 Apr 2016 21:46:44 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
This patch enables mmapping MSI-X tables if
hardware su
On 2016/4/6 8:48, Gavin Shan wrote:
On Tue, Apr 05, 2016 at 09:43:29PM +0800, Yongji Xie wrote:
The resource_alignment will releases memory
resources allocated by firmware so that kernel
can reassign new resources later on. But this
will cause the problem that no resources can be
allocated
On 2016/4/6 8:55, Gavin Shan wrote:
On Tue, Apr 05, 2016 at 09:43:30PM +0800, Yongji Xie wrote:
Now we use the IORESOURCE_STARTALIGN to identify
bridge resources in __assign_resources_sorted().
That's quite fragile. We can't make sure that
the PCI devices' resources will not use
On 2016/4/6 9:43, Gavin Shan wrote:
On Tue, Apr 05, 2016 at 09:43:31PM +0800, Yongji Xie wrote:
When using resource_alignment kernel parameter,
the current implement reassigns the alignment by
changing resources' size which can potentially
break some drivers. For example, the driver uses
On 2016/4/6 8:11, Gavin Shan wrote:
On Tue, Apr 05, 2016 at 09:46:43PM +0800, Yongji Xie wrote:
I'm trying to find a proper way to indicate
the capability of interrupt remapping on PPC64
because we need this to determine whether it is
safe to mmap MSI-X table in VFIO driver
On 2016/4/6 8:00, Gavin Shan wrote:
On Tue, Apr 05, 2016 at 09:46:44PM +0800, Yongji Xie wrote:
This patch enables mmapping MSI-X tables if
hardware supports interrupt remapping which
can ensure that a given pci device can only
shoot the MSIs assigned for it.
Signed-off-by: Yongji Xie <
On 2016/3/17 0:31, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:34 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
The resource_alignment will releases memory resources
allocated by firmware so that kernel can reassign new
resources later on. But this will cause the p
On 2016/3/17 0:31, Alex Williamson wrote:
[cc+ Eric, Will]
On Mon, 7 Mar 2016 15:48:37 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
Current vfio-pci implementation disallows to mmap MSI-X
table in case that user get to touch this directly.
But we should allow to mmap these
On 2016/3/17 20:48, Alex Williamson wrote:
On Thu, 17 Mar 2016 19:38:29 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
On 2016/3/17 0:32, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:38 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
This patch adds IOMMU_CA
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:36 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
Current vfio-pci implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio
page may be shared with other BARs.
But we sho
On 2016/3/16 22:10, Bjorn Helgaas wrote:
On Wed, Mar 16, 2016 at 06:51:56PM +0800, Yongji Xie wrote:
Ping.
This is mainly VFIO stuff, and Alex had some security concerns, so I'm
not going to spend much time looking at this until he's satisfied.
When I do, I'll be looking hard
When using resource_alignment kernel parameter, the current
implement reassigns the alignment by changing resources' size
which can potentially break some drivers.
So this patch adds a new option "noresize" for the parameter
to solve this problem.
Signed-off-by: Yongj
page would not be
shared with other BARs.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |2 +
drivers/pci/pci.c | 90 ++-
include/linux/pci.h |4 ++
3 files changed, 85 i
This patch adds IOMMU_CAP_INTR_REMAP for IODA host bridge so that
we can mmap MSI-X table in vfio driver.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/arch/p
NED
VFIO_DEVICE_FLAGS_PCI_MSIX_MMAP
- Add a Kconfig option to support for mmapping MSI-X table.
[1] http://www.spinics.net/lists/kvm/msg127812.html
Yongji Xie (7):
PCI: Add a new option for resource_alignment to reassign alignment
PCI: Use IORESOURCE_WINDOW to identify bridge resources
PCI: Ignore resource_alignm
h replaces IORESOURCE_STARTALIGN with
IORESOURCE_WINDOW.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/setup-bus.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 7796d0a
ARs.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 1ce1d36..49d7a69 100644
--- a/drivers/vfio/pci/vfio_pc
Current vfio-pci implementation disallows to mmap MSI-X
table in case that user get to touch this directly.
But we should allow to mmap these MSI-X tables if IOMMU
supports interrupt remapping which can ensure that a
given pci device can only shoot the MSIs assigned for it.
Signed-off-by: Yongji
to use firmware
setup and not to reassign any resources.
To solve this problem, this patch ignores
resource_alignment if PCI_PROBE_ONLY was set.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |2 ++
drivers/pci/probe.c |3
On 2016/4/27 0:40, Alex Williamson wrote:
On Mon, 25 Apr 2016 18:05:53 +0800
Yongji Xie <xyj...@linux.vnet.ibm.com> wrote:
Hi Alex,
Any comment?
TBH, I shuffled this to the bottom of the review pile because you're
depending on a patch series for ARM MSI mapping that's still ver
to use firmware
setup and not to reassign any resources.
To solve this problem, this patch ignores resource_alignment
if PCI_PROBE_ONLY was set.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/p
"noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletion
.
Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/iommu/iommu.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 0e3b009..5d2b6f6 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -813,6 +
-by: Yongji Xie <xyj...@linux.vnet.ibm.com>
---
drivers/vfio/pci/vfio_pci.c |7 +--
drivers/vfio/pci/vfio_pci_rdwr.c |3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 98059df..7eba77d
1 - 100 of 190 matches
Mail list logo