patch replaces IORESOURCE_STARTALIGN with
IORESOURCE_WINDOW.
Signed-off-by: Yongji Xie
---
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..4ff10ca 100644
--- a/dr
FIO_DEVICE_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: Add a new option for resource_alignment to reassign alignment
PCI: Use IORESOURCE_WINDOW to identify bridge resources
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
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
---
arch/powerpc/platforms/powernv/pci-ioda.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c
b
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
---
Documentation/kernel-parameters.txt |2 ++
drivers/pci/probe.c |3 ++-
2 files changed, 4 insertions
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: Yongji Xie
---
mmio page would not be
shared with other BARs.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |2 +
drivers/pci/pci.c | 90 ++-
include/linux/pci.h |4 ++
3 files changed, 85 insertions(+), 11 deleti
th other BARs.
Signed-off-by: Yongji Xie
---
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_pci.c
+++ b/drivers/vfio/p
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 d
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
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:35 +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
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 look
On 2016/3/17 20:48, Alex Williamson wrote:
On Thu, 17 Mar 2016 19:38:29 +0800
Yongji Xie wrote:
On 2016/3/17 0:32, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:38 +0800
Yongji Xie wrote:
This patch adds IOMMU_CAP_INTR_REMAP for IODA host bridge so that
we can mmap MSI-X table in
On 2016/3/17 0:31, Alex Williamson wrote:
[cc+ Eric, Will]
On Mon, 7 Mar 2016 15:48:37 +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 IOMMU
supports
On 2016/3/17 0:32, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:38 +0800
Yongji Xie 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
---
arch/powerpc/platforms/powernv/pci-ioda.c | 17
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:36 +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-p
On 2016/3/17 20:40, Alex Williamson wrote:
On Thu, 17 Mar 2016 19:28:34 +0800
Yongji Xie wrote:
On 2016/3/17 0:30, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:35 +0800
Yongji Xie wrote:
When vfio passthrough a PCI device of which MMIO BARs
are smaller than PAGE_SIZE, guest will not
On 2016/3/17 0:31, Alex Williamson wrote:
On Mon, 7 Mar 2016 15:48:34 +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 by
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
stead of doing it on PPC64 arch code.
- Remove flags: VFIO_DEVICE_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: D
will never 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
---
drivers/vfio/pci/vfio_pci.c | 58 +
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.
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.
Signe
t;noresize" for the
parameter to solve this problem.
Signed-off-by: Yongji Xie
---
Documentation/kernel-parameters.txt |5 -
drivers/pci/pci.c | 37 +--
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/Docum
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
---
drivers/vfio/pci/vfio_pci.c |9 +++--
drivers/vfio/pci/vfio_pci_private.h |1
is
capability, 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
---
arch/powerpc/p
ridge resources.
Signed-off-by: Yongji Xie
---
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-bus.c
@@ -391,6 +
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' resourc
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 by
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.
There
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/4/6 22:45, Alex Williamson wrote:
On Tue, 5 Apr 2016 21:46:44 +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
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 wrote:
This patch enables mmapping MSI-X tables if
hardware supports interrupt remapping which
can
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 wrote
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.
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.
Signe
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
parameter to enforce all MMIO BARs to be page aligned
on PCI core code instead of doing it on PPC64 arch code.
- Remove flags: VFIO_DEVICE_FLAGS_PCI_PAGE_ALIGNED
[1] http://www.spinics.net/lists/kvm/msg127812.html
[2] http://www.spinics.net/lists/kvm/msg130256.html
Yongji Xie (10):
PCI: Ignore
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 7796d0a..45fc484 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -391,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
will never 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
---
drivers/vfio/pci/vfio_pci.c | 58 +
.
Signed-off-by: Yongji Xie
---
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 +813,16 @@ struct iommu_group
sg130256.html
Signed-off-by: Yongji Xie
---
include/linux/pci.h |1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 27df4a6..d619228 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -193,6 +193,7 @@ typedef unsigned short _
: Yongji Xie
---
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 dc1779c..b08abe0 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b
.
[1] http://www.spinics.net/lists/kvm/msg130256.html
Signed-off-by: Yongji Xie
---
drivers/pci/msi.c | 12
drivers/pci/probe.c |3 +++
include/linux/msi.h |6 +-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index
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
---
arch/powerpc/platforms/powernv/pci-ioda.c |8
1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/platforms
On 2016/4/18 19:30, David Laight wrote:
From: Yongji Xie
Sent: 18 April 2016 11:59
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 flag will be used to know whether
Hi Alex,
Any comment?
Thanks,
Yongji
On 2016/4/18 18:53, 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
On 2016/4/26 13:41, Alexey Kardashevskiy wrote:
On 04/18/2016 08:56 PM, 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 will not
On 2016/4/27 0:40, Alex Williamson wrote:
On Mon, 25 Apr 2016 18:05:53 +0800
Yongji Xie 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 very much
in flux. You've
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
to enforce the
alignment 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.
S
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.
Yongji Xie (4):
PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set
PCI: Do not Use IORESOURCE_STARTALIGN to identify bridge resources
PCI: A
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
shadow resource to reserve the remaind of the page which hot-add
device's BAR might be assigned into.
Signed-off-by: Yongji Xie
---
drivers/vfio/pci/vfio_pci.c | 58 ++-
drivers/vfio/pci/vfio_pci_private.h |8 +
2 files changed, 59 insertions(+)
On 2016/5/3 10:59, Tian, Kevin wrote:
From: Yongji Xie
Sent: Wednesday, April 27, 2016 8:22 PM
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. This will cause some
performance issues
On 2016/5/3 14:11, Tian, Kevin wrote:
From: Yongji Xie [mailto:xyj...@linux.vnet.ibm.com]
Sent: Tuesday, May 03, 2016 1:52 PM
+
+ if (!(res->start & ~PAGE_MASK)) {
+ /*
+* Add shadow resource for sub-page bar who
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
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
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
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
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
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/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: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: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 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 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
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
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
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,
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 @@
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
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
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
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
@@ -
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
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 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 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 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 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 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
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
shoul
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
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 in
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/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
92 matches
Mail list logo