On 19 April 2017 at 09:47, Michael Ellerman wrote:
> Bjorn Helgaas writes:
>
>> On Mon, Apr 17, 2017 at 4:36 PM, Bjorn Helgaas wrote:
>>> From: Yongji Xie
>>> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c
>>> b/arch/powerpc/platforms/po
Hi Yinghai,
On 18 April 2017 at 05:45, Yinghai Lu wrote:
> On Mon, Apr 17, 2017 at 2:36 PM, Bjorn Helgaas wrote:
>> From: Yongji Xie
>>
>> In case that one device's alignment is greater than its size,
>> we may get an incorrect size and alignment for its bus
2017-04-15 6:54 GMT+08:00 Bjorn Helgaas :
> On Mon, Apr 10, 2017 at 07:58:14PM +0800, Yongji Xie wrote:
> > Currently we reassign the alignment by extending resources' size in
> > pci_reassigndev_resource_alignment(). This could potentially break
> > some drivers when t
risk in this case. So this patch tries to use
START_ALIGNMENT to identify the resource's alignment without extending
the size when the alignment reassigning is caused by the default alignment.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 34 --
1 file
This overrides pcibios_default_alignment() to set default alignment
to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page
BARs would not share a page and could be mapped into guest when VFIO
passthrough them.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/machdep.h
alignment for all PCI devices.
An arch can override it to force the PCI core to place memory BARs on
their own pages.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7904d02
In case that one device's alignment is greater than its size,
we may get an incorrect size and alignment for its bus's memory
window in pbus_size_mem(). This patch fixes this case.
Signed-off-by: Yongji Xie
---
drivers/pci/setup-bus.c |4 ++--
1 file changed, 2 insertions(+), 2
Code style improvements
Changelog v3:
- Ignore enforced alignment to fixed BARs
- Fix issue that disabling memory decoding when reassigning the alignment
- Only enable default alignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignme
On Thu, Mar 23, 2017 at 04:55:58PM -0500, Bjorn Helgaas wrote:
>
> On Wed, Feb 15, 2017 at 02:45:06PM +0800, Yongji Xie wrote:
>> Currently we reassign the alignment by extending resources' size in
>> pci_reassigndev_resource_alignment(). This could potentially break
&
On Thu, Mar 23, 2017 at 03:53:42PM -0500, Bjorn Helgaas wrote:
> Hi Yongji,
>
> On Wed, Feb 15, 2017 at 02:45:05PM +0800, Yongji Xie wrote:
>> When vfio passthroughs a PCI device of which MMIO BARs are
>> smaller than PAGE_SIZE, guest will not handle the mmio
>> accesses
atch tries to use START_ALIGNMENT to identify the resource's
alignment without extending the size when the alignment reassigning is
caused by the default alignment.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 34 --
1 files changed, 24 insertions(+), 10 dele
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
In case that one device's alignment is greater than its size,
we may get an incorrect size and alignment for its bus's memory
window in pbus_size_mem(). This patch fixes this case.
Signed-off-by: Yongji Xie
---
drivers/pci/setup-bus.c |4 ++--
1 files changed, 2 insertions(+), 2
ignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (3):
PCI: A fix for caculating bridge window's size and alignment
PCI: Add a macro to set default alignment for all PCI devices
PCI: Don't extend de
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |3 +++
2 files changed, 7 insertions(+)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
--- a/arch/po
nd if we need the allocated
size, resource_size()(or we can introuce a new helper function) can be used
to get it.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |1 +
include/linux/pci.h |6 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/
ff-by: Yongji Xie
Reviewed-by: Gavin Shan
---
drivers/pci/pci.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index a881c0d..220c31e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5084,7 +5084,7 @@
ecoding when reassigning the alignment
- Only enable default alignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (3):
PCI: Ignore requested alignment for IOV BARs
PCI: Make sure the driver could get correct BAR size f
Hi Bjorn,
Kindly ping. What do you think of the way to fix the bug that
resources's size is changed
when using resource_alignment. Thanks.
On 2016/10/26 14:53, Yongji Xie wrote:
This series introduces a way for PCI resource allocator to force
MMIO BARs not to share PAGE_SIZE. This
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |3 +++
2 files changed, 7 insertions(+)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
--- a/arch/po
es in pci_reassigndev_resource_alignment()
and restores to original sizes after PCI resource sizing/assigning are
done.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |1 +
drivers/pci/setup-bus.c | 19 +++
include/linux/pci.h |1 +
3 files changed, 21 inser
We would call pci_reassigndev_resource_alignment() before
pci_init_capabilities(). So the requested alignment would
never work for IOV BARs. And it's also meaningless to do
so.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
ngelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (3):
PCI: Ignore requested alignment for IOV BARs
PCI: Restore resource's size if we expand it by using resource_alignment
PCI: Add a macro to set default alignment for all PCI devices
arch
On 2016/9/29 22:00, Bjorn Helgaas wrote:
On Tue, Sep 13, 2016 at 05:00:34PM +0800, Yongji Xie wrote:
When vfio passthroughs 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/9/29 19:54, Bjorn Helgaas wrote:
On Thu, Sep 29, 2016 at 10:38:01AM +0800, Yongji Xie wrote:
On 2016/9/29 6:42, Bjorn Helgaas wrote:
On Tue, Sep 13, 2016 at 05:00:33PM +0800, Yongji Xie wrote:
When using resource_alignment kernel parameter, the current
implement reassigns the
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |3 +++
2 files changed, 7 insertions(+)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
--- a/arch/po
o use IORESOURCE_STARTALIGN to specify the
alignment instead of IORESOURCE_SIZEALIGN. Thus, we can
reassign the alignment without changing resources's size.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/p
ngless
and will release the allocated resources which leads to a bug.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 2d85a96..b8357d7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/p
d not re-allocated.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index aab9d51..2d85a96 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4959,6 +4959,13 @@ static resource_s
rced alignment to fixed BARs
- Fix issue that disabling memory decoding when reassigning the alignment
- Only enable default alignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (4):
PCI: Ignore enforced alignment wh
On 2016/9/29 6:42, Bjorn Helgaas wrote:
On Tue, Sep 13, 2016 at 05:00:33PM +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
Hi Bjorn,
Kindly Ping... Any comment on V5?
Thanks,
Yongji
On 2016/9/13 17:00, Yongji Xie wrote:
This series introduces a way for PCI resource allocator to force
MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO
driver. Because current VFIO implementation disallows to mmap
sub
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |4
2 files changed, 8 insertions(+)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
--- a/arch/po
ption "noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |9 ++---
drivers/pci/pci.c | 37 +--
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/Docum
ngless
and will release the allocated resources which leads to a bug.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 2d85a96..b8357d7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/p
d not re-allocated.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index aab9d51..2d85a96 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4959,6 +4959,13 @@ static resource_s
decoding when reassigning the alignment
- Only enable default alignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (4):
PCI: Ignore enforced alignment when kernel uses existing firmware setup
PCI: Ignore enforced al
On 2016/9/7 0:56, Bjorn Helgaas wrote:
On Fri, Aug 12, 2016 at 01:42:24PM +0800, Yongji Xie wrote:
We should not disable memory decoding when we reassign alignment
in pci_reassigndev_resource_alignment(). It's meaningless and
have some side effects. For example, we found it would break
On 2016/9/7 0:59, Bjorn Helgaas wrote:
On Fri, Aug 12, 2016 at 01:42:26PM +0800, Yongji Xie wrote:
When vfio passthroughs 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
Ping?
On 2016/8/12 13:42, Yongji Xie wrote:
This series introduces a way for PCI resource allocator to force
MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO
driver. Because current VFIO implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs which may share
ption "noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |9 ++---
drivers/pci/pci.c | 37 +--
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/Docum
macro as PAGE_SIZE.
Signed-off-by: Yongji Xie
---
arch/powerpc/include/asm/pci.h |4
drivers/pci/pci.c |4
2 files changed, 8 insertions(+)
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index e9bd6cf..5e31bc2 100644
--- a/arch/po
ed by the firmware or
not. Disabling memory decoding would cause the one initialized by
firmware may not be set as the default VGA device when more than one
graphics adapter is present.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
ngless
and will release the allocated resources which leads to a bug.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 2d85a96..b8357d7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/p
to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (5):
PCI: Ignore enforced alignment when kernel uses existing firmware setup
PCI: Ignore enforced alignment to VF BARs
PCI: Do not disable memory decoding in pci_reassigndev_resource_alignment()
PCI: Add a new option for resource
d not re-allocated.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index aab9d51..2d85a96 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4959,6 +4959,13 @@ static resource_s
Hi Bjorn,
Any comment on V3?
Thanks,
Yongji
On 2016/6/30 18:53, Yongji Xie wrote:
This series aims to add an option for PCI resource allocator to
force BARs not to share PAGE_SIZE. This would make sense to VFIO
driver. Because current VFIO implementation disallows to mmap
sub-page(size
Hi Gavin,
On 2016/7/1 10:34, Gavin Shan wrote:
On Thu, Jun 30, 2016 at 06:53:11PM +0800, Yongji Xie wrote:
Now we use the IORESOURCE_STARTALIGN to identify bridge resources
in __assign_resources_sorted(). That's quite fragile. We may also
set flag IORESOURCE_STARTALIGN for SR-IOV resourc
Hi Gavin,
On 2016/7/1 10:25, Gavin Shan wrote:
On Thu, Jun 30, 2016 at 06:53:10PM +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
Hi Gavin,
On 2016/7/1 14:05, Gavin Shan wrote:
On Fri, Jul 01, 2016 at 01:27:17PM +0800, Yongji Xie wrote:
On Thu, Jun 30, 2016 at 06:53:08PM +0800, Yongji Xie wrote:
VF BARs are read-only zeroes according to SRIOV spec,
the normal way(writing BARs) of allocating resources wouldn'
Hi Gavin,
On 2016/7/1 8:50, Gavin Shan wrote:
On Thu, Jun 30, 2016 at 06:53:09PM +0800, Yongji Xie wrote:
We should not disable memory decoding when we reassign alignment
in pci_reassigndev_resource_alignment(). It's meaningless and
have some side effect. For example, some fixup func
Hi Gavin,
On 2016/7/1 8:39, Gavin Shan wrote:
On Thu, Jun 30, 2016 at 06:53:08PM +0800, Yongji Xie wrote:
VF BARs are read-only zeroes according to SRIOV spec,
the normal way(writing BARs) of allocating resources wouldn't
be applied to VFs. The VFs' resources would be allocated
when
Hi Gavin,
On 2016/7/1 8:28, Gavin Shan wrote:
On Thu, Jun 30, 2016 at 06:53:07PM +0800, Yongji Xie wrote:
PCI resources allocator will use firmware setup and not try to
reassign resource when PCI_PROBE_ONLY or IORESOURCE_PCI_FIXED
is set.
The enforced alignment in
fault on
some platforms such as PowerNV platform which would easily see those
sub-page BARs because of its 64K page. To achieve that, we add a
macro PCIBIOS_DEFAULT_ALIGNMENT to set default alignment for all
PCI devices and define it on PowerNV platform.
Signed-off-by: Yongji Xie
---
arch/powerpc/incl
ngless
and will release the allocated resources which leads to a bug.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index be8f72c..6ae02de 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -
lignment of all MMIO BARs to be at least PAGE_SIZE so that
one BAR's mmio page would not be shared with other BARs.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |2 ++
drivers/pci/pci.c | 60 ---
2 files changed,
quot;.
In this patch, we try to use a more robust way to identify
bridge resources.
Signed-off-by: Yongji Xie
---
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 10064
obing.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c |8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6ae02de..6241cfc 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4820,7 +4820,6 @@
ption "noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/Docum
d not re-allocated.
Signed-off-by: Yongji Xie
---
drivers/pci/pci.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index c8b4dbd..be8f72c 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4760,6 +4760,13 @@ static resource_s
g memory decoding when reassigning the alignment
- Only enable default alignment on PowerNV platform
Changelog v2:
- Ignore enforced alignment to VF BARs on pci_reassigndev_resource_alignment()
Yongji Xie (7):
PCI: Ignore enforced alignment when kernel uses existing firmware setup
PCI: Ignore
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 the
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: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
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' resourc
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
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, this will
-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
2016 14:09:57 +0800
Yongji Xie 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 issue when there
are some critical device
.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie
---
drivers/pci/msi.c | 15 +++
drivers/pci/probe.c |3 +++
include/linux/msi.h |5 -
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/pci
directly.
Signed-off-by: Yongji Xie
---
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
index 188b1ff..6bae388 100644
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
---
include/lin
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
Reviewed-by: Alexey Kardashevskiy
---
arch/powerpc/platforms/powernv/pci-ioda.c |8
1 file changed, 8 insertions
.
Signed-off-by: Yongji Xie
---
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
#include
#include
+#include
://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
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
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index
ld not be applied to VFs whose BARs are always
page aligned and should be never reassigned according to SRIOV
spec.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |2 ++
arch/powerpc/include/asm/pci.h |2 ++
drivers/pci/pci.c
ption "noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/Docum
ridge resources.
Signed-off-by: Yongji Xie
---
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-bus.c
@@ -390,6 +
PCI BARs; 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_alig
directly.
Signed-off-by: Yongji Xie
---
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
index 188b1ff..6bae388 100644
.
Signed-off-by: Yongji Xie
---
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
#include
#include
+#include
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
Reviewed-by: Alexey Kardashevskiy
---
arch/powerpc/platforms/powernv/pci-ioda.c |8
1 file changed, 8 insertions
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
.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1138820.html
Signed-off-by: Yongji Xie
---
drivers/pci/msi.c | 15 +++
drivers/pci/probe.c |3 +++
include/linux/msi.h |5 -
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/pci
://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
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
---
include/lin
ld not be applied to VFs whose BARs are always
page aligned and should be never reassigned according to SRIOV
spec.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |2 ++
arch/powerpc/include/asm/pci.h |2 ++
drivers/pci/pci.c
ption "noresize" for the parameter to
solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 35 +--
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/Docum
ridge resources.
Signed-off-by: Yongji Xie
---
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-bus.c
@@ -390,6 +
PCI BARs; 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_alig
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
---
drivers/pci/pci.c |6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index
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
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 for
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 is
On 2016/5/5 20:15, Tian, Kevin wrote:
From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com]
Sent: Thursday, May 05, 2016 7:43 PM
Hi David and Kevin,
On 2016/5/5 17:54, David Laight wrote:
From: Tian, Kevin
Sent: 05 May 2016 10:37
...
Acutually, we are not aimed at accessing MSI-X table
On 2016/5/5 17:36, Tian, Kevin wrote:
From: Yongji Xie
Sent: Tuesday, May 03, 2016 3:34 PM
On 2016/5/3 14:22, Tian, Kevin wrote:
From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com]
Sent: Tuesday, May 03, 2016 2:08 PM
On 2016/5/3 13:34, Tian, Kevin wrote:
From: Yongji Xie
Sent: Wednesday
Hi David and Kevin,
On 2016/5/5 17:54, David Laight wrote:
From: Tian, Kevin
Sent: 05 May 2016 10:37
...
Acutually, we are not aimed at accessing MSI-X table from
guest. So I think it's safe to passthrough MSI-X table if we
can make sure guest kernel would not touch MSI-X table in
normal cod
1 - 100 of 191 matches
Mail list logo