All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio: fix workaround of BAR0 mapping
@ 2018-07-12  2:44 Takeshi Yoshimura
  2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
  0 siblings, 1 reply; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-12  2:44 UTC (permalink / raw)
  To: dev; +Cc: Takeshi Yoshimura

The workaround of BAR0 mapping does not work if BAR0 area is smaller
than page size (64KB in ppc). In addition, we no longer need the
workaround in recent Linux because VFIO allows MSIX mapping (*).
This fix is just to skip the workaround if BAR0 is smarller than a page.

(*): "vfio-pci: Allow mapping MSIX BAR", https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci/vfio_pci.c?h=v4.18-rc3&id=a32295c612c57990d17fb0f41e7134394b2f35f6

Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")

Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..facda64bb 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -337,7 +337,7 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 		/* Skip this BAR */
 		return 0;
 
-	if (msix_table->bar_index == bar_index) {
+	if (msix_table->bar_index == bar_index && (uint64_t)PAGE_SIZE < bar->size) {
 		/*
 		 * VFIO will not let us map the MSI-X table,
 		 * but we can map around it.
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2] vfio: fix workaround of BAR0 mapping
  2018-07-12  2:44 [PATCH] vfio: fix workaround of BAR0 mapping Takeshi Yoshimura
@ 2018-07-12  3:08 ` Takeshi Yoshimura
  2018-07-12  9:10   ` Burakov, Anatoly
                     ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-12  3:08 UTC (permalink / raw)
  To: dev; +Cc: Takeshi Yoshimura

The workaround of BAR0 mapping does not work if BAR0 area is smaller
than page size (64KB in ppc). In addition, we no longer need the
workaround in recent Linux because VFIO allows MSIX mapping (*).
This fix is just to skip the workaround if BAR0 is smarller than a page.

(*): "vfio-pci: Allow mapping MSIX BAR",
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6

Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")

Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
---

Fixed checkpatch warnings

 drivers/bus/pci/linux/pci_vfio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..b8f4a11f4 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -337,7 +337,8 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 		/* Skip this BAR */
 		return 0;
 
-	if (msix_table->bar_index == bar_index) {
+	if (msix_table->bar_index == bar_index &&
+		bar->size > (uint64_t)PAGE_SIZE) {
 		/*
 		 * VFIO will not let us map the MSI-X table,
 		 * but we can map around it.
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] vfio: fix workaround of BAR0 mapping
  2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
@ 2018-07-12  9:10   ` Burakov, Anatoly
  2018-07-13 10:11   ` [PATCH v3] " Takeshi Yoshimura
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-12  9:10 UTC (permalink / raw)
  To: Takeshi Yoshimura, dev

On 12-Jul-18 4:08 AM, Takeshi Yoshimura wrote:
> The workaround of BAR0 mapping does not work if BAR0 area is smaller
> than page size (64KB in ppc). In addition, we no longer need the
> workaround in recent Linux because VFIO allows MSIX mapping (*).
> This fix is just to skip the workaround if BAR0 is smarller than a page.
> 
> (*): "vfio-pci: Allow mapping MSIX BAR",
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6
> 
> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> 
> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> ---

Minimum support kernel version in DPDK is 3.2, we cannot rely on 
functionality provided by the recent kernel versions.

It would be better if you modified the check at line 350 instead (or 
added a new check, specifically testing for whether BAR size is less 
than page size).

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3] vfio: fix workaround of BAR0 mapping
  2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
  2018-07-12  9:10   ` Burakov, Anatoly
@ 2018-07-13 10:11   ` Takeshi Yoshimura
  2018-07-13 11:00     ` Burakov, Anatoly
  2018-07-17  8:22   ` [PATCH v4] " Takeshi Yoshimura
  2018-07-20  8:13   ` [PATCH v5] vfio: fix workaround of BAR mapping Takeshi Yoshimura
  3 siblings, 1 reply; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-13 10:11 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, Takeshi Yoshimura

The workaround of BAR0 mapping gives up and immediately returns an
error if it cannot map around the MSI-X. However, recent version
of VFIO allows MSIX mapping (*).

I fixed not to return immediately but try mapping. In old Linux, mmap
just fails and returns the same error as the code before my fix . In
recent Linux, mmap succeeds and this patch enables running DPDK in
specific environments (e.g., ppc64le with HGST NVMe)

(*): "vfio-pci: Allow mapping MSIX BAR",
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6

Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")

Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
---

Thanks, Anatoly.

I updated the patch not to affect behaviors of older Linux and
other environments as well as possible. This patch adds another
chance to mmap BAR0.

I noticed that the check at line 350 already includes the check
of page size, so this patch does not fix the check.

Regards,
Takeshi

drivers/bus/pci/linux/pci_vfio.c | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..eb9b8031d 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -348,24 +348,25 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 		table_start &= PAGE_MASK;
 
 		if (table_start == 0 && table_end >= bar->size) {
-			/* Cannot map this BAR */
-			RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n", bar_index);
-			bar->size = 0;
-			bar->addr = 0;
-			return 0;
+			/* Cannot map around this BAR, but try */
+			RTE_LOG(DEBUG, EAL,
+				"Trying to map BAR%d that contains the MSI-X\n",
+				bar_index);
+			memreg[0].offset = bar->offset;
+			memreg[0].size = bar->size;
+		} else {
+			memreg[0].offset = bar->offset;
+			memreg[0].size = table_start;
+			memreg[1].offset = bar->offset + table_end;
+			memreg[1].size = bar->size - table_end;
+
+			RTE_LOG(DEBUG, EAL,
+				"Trying to map BAR%d that contains the MSI-X "
+				"table. Trying offsets: "
+				"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
+				memreg[0].offset, memreg[0].size,
+				memreg[1].offset, memreg[1].size);
 		}
-
-		memreg[0].offset = bar->offset;
-		memreg[0].size = table_start;
-		memreg[1].offset = bar->offset + table_end;
-		memreg[1].size = bar->size - table_end;
-
-		RTE_LOG(DEBUG, EAL,
-			"Trying to map BAR%d that contains the MSI-X "
-			"table. Trying offsets: "
-			"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
-			memreg[0].offset, memreg[0].size,
-			memreg[1].offset, memreg[1].size);
 	} else {
 		memreg[0].offset = bar->offset;
 		memreg[0].size = bar->size;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v3] vfio: fix workaround of BAR0 mapping
  2018-07-13 10:11   ` [PATCH v3] " Takeshi Yoshimura
@ 2018-07-13 11:00     ` Burakov, Anatoly
  2018-07-13 11:08       ` Burakov, Anatoly
  0 siblings, 1 reply; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-13 11:00 UTC (permalink / raw)
  To: Takeshi Yoshimura; +Cc: dev

On 13-Jul-18 11:11 AM, Takeshi Yoshimura wrote:
> The workaround of BAR0 mapping gives up and immediately returns an
> error if it cannot map around the MSI-X. However, recent version
> of VFIO allows MSIX mapping (*).
> 
> I fixed not to return immediately but try mapping. In old Linux, mmap
> just fails and returns the same error as the code before my fix . In
> recent Linux, mmap succeeds and this patch enables running DPDK in
> specific environments (e.g., ppc64le with HGST NVMe)
> 
> (*): "vfio-pci: Allow mapping MSIX BAR",
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6
> 
> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> 
> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> ---
> 
> Thanks, Anatoly.
> 
> I updated the patch not to affect behaviors of older Linux and
> other environments as well as possible. This patch adds another
> chance to mmap BAR0.
> 
> I noticed that the check at line 350 already includes the check
> of page size, so this patch does not fix the check.
> 
> Regards,
> Takeshi

Hi Takeshi,

Please correct me if i'm wrong, but i'm not sure the old behavior is kept.

Let's say we're running an old kernel, which doesn't allow mapping MSI-X 
BARs. If MSI-X starts at beginning of the BAR (floor-aligned to page 
size), and ends at or beyond end of BAR (ceiling-aligned to page size). 
In that situation, old code just skipped the BAR and returned 0.

We then exited the function, and there's a check for return value right 
after pci_vfio_mmap_bar() that stop continuing if we fail to map 
something. In the old code, we would continue as we went, and finish the 
rest of our mappings. With your new code, you're attempting to map the 
BAR, it fails, and you will return -1 on older kernels.

I believe what we really need here is the following:

1) If this is a BAR containing MSI-X vector, first try mapping the 
entire BAR. If it succeeds, great - that would be your new kernel behavior.
2) If we failed on step 1), check to see if we can map around the BAR. 
If we can, try to map around it like the current code does. If we cannot 
map around it (i.e. if MSI-X vector, page aligned, occupies entire BAR), 
then we simply return 0 and skip the BAR.

That, i would think, would keep the old behavior and enable the new one.

Does that make sense?

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3] vfio: fix workaround of BAR0 mapping
  2018-07-13 11:00     ` Burakov, Anatoly
@ 2018-07-13 11:08       ` Burakov, Anatoly
  2018-07-17  8:21         ` Takeshi Yoshimura
  0 siblings, 1 reply; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-13 11:08 UTC (permalink / raw)
  To: Takeshi Yoshimura; +Cc: dev

On 13-Jul-18 12:00 PM, Burakov, Anatoly wrote:
> On 13-Jul-18 11:11 AM, Takeshi Yoshimura wrote:
>> The workaround of BAR0 mapping gives up and immediately returns an
>> error if it cannot map around the MSI-X. However, recent version
>> of VFIO allows MSIX mapping (*).
>>
>> I fixed not to return immediately but try mapping. In old Linux, mmap
>> just fails and returns the same error as the code before my fix . In
>> recent Linux, mmap succeeds and this patch enables running DPDK in
>> specific environments (e.g., ppc64le with HGST NVMe)
>>
>> (*): "vfio-pci: Allow mapping MSIX BAR",
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
>> commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6
>>
>> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
>>
>> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>> ---
>>
>> Thanks, Anatoly.
>>
>> I updated the patch not to affect behaviors of older Linux and
>> other environments as well as possible. This patch adds another
>> chance to mmap BAR0.
>>
>> I noticed that the check at line 350 already includes the check
>> of page size, so this patch does not fix the check.
>>
>> Regards,
>> Takeshi
> 
> Hi Takeshi,
> 
> Please correct me if i'm wrong, but i'm not sure the old behavior is kept.
> 
> Let's say we're running an old kernel, which doesn't allow mapping MSI-X 
> BARs. If MSI-X starts at beginning of the BAR (floor-aligned to page 
> size), and ends at or beyond end of BAR (ceiling-aligned to page size). 
> In that situation, old code just skipped the BAR and returned 0.
> 
> We then exited the function, and there's a check for return value right 
> after pci_vfio_mmap_bar() that stop continuing if we fail to map 
> something. In the old code, we would continue as we went, and finish the 
> rest of our mappings. With your new code, you're attempting to map the 
> BAR, it fails, and you will return -1 on older kernels.
> 
> I believe what we really need here is the following:
> 
> 1) If this is a BAR containing MSI-X vector, first try mapping the 
> entire BAR. If it succeeds, great - that would be your new kernel behavior.
> 2) If we failed on step 1), check to see if we can map around the BAR. 
> If we can, try to map around it like the current code does. If we cannot 
> map around it (i.e. if MSI-X vector, page aligned, occupies entire BAR), 
> then we simply return 0 and skip the BAR.
> 
> That, i would think, would keep the old behavior and enable the new one.
> 
> Does that make sense?
> 

I envision this to look something like this:

bool again = false;
do {
	if (again) {
		// set up mmap-around
		if (cannot map around)
			return 0;
	}
	// try mapping
	if (map_failed && msix_table->bar_index == bar_index) {
		again = true;
		continue;
	}
	if (map_failed)
		return -1;
	break/return 0;
} while (again);

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3] vfio: fix workaround of BAR0 mapping
  2018-07-13 11:08       ` Burakov, Anatoly
@ 2018-07-17  8:21         ` Takeshi Yoshimura
  0 siblings, 0 replies; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-17  8:21 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev

2018-07-13 20:08 GMT+09:00 Burakov, Anatoly <anatoly.burakov@intel.com>:
> On 13-Jul-18 12:00 PM, Burakov, Anatoly wrote:
>>
>> On 13-Jul-18 11:11 AM, Takeshi Yoshimura wrote:
>>>
>>> The workaround of BAR0 mapping gives up and immediately returns an
>>> error if it cannot map around the MSI-X. However, recent version
>>> of VFIO allows MSIX mapping (*).
>>>
>>> I fixed not to return immediately but try mapping. In old Linux, mmap
>>> just fails and returns the same error as the code before my fix . In
>>> recent Linux, mmap succeeds and this patch enables running DPDK in
>>> specific environments (e.g., ppc64le with HGST NVMe)
>>>
>>> (*): "vfio-pci: Allow mapping MSIX BAR",
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
>>> commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6
>>>
>>> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
>>>
>>> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>>> ---
>>>
>>> Thanks, Anatoly.
>>>
>>> I updated the patch not to affect behaviors of older Linux and
>>> other environments as well as possible. This patch adds another
>>> chance to mmap BAR0.
>>>
>>> I noticed that the check at line 350 already includes the check
>>> of page size, so this patch does not fix the check.
>>>
>>> Regards,
>>> Takeshi
>>
>>
>> Hi Takeshi,
>>
>> Please correct me if i'm wrong, but i'm not sure the old behavior is kept.
>>
>> Let's say we're running an old kernel, which doesn't allow mapping MSI-X
>> BARs. If MSI-X starts at beginning of the BAR (floor-aligned to page size),
>> and ends at or beyond end of BAR (ceiling-aligned to page size). In that
>> situation, old code just skipped the BAR and returned 0.
>>
>> We then exited the function, and there's a check for return value right
>> after pci_vfio_mmap_bar() that stop continuing if we fail to map something.
>> In the old code, we would continue as we went, and finish the rest of our
>> mappings. With your new code, you're attempting to map the BAR, it fails,
>> and you will return -1 on older kernels.
>>
>> I believe what we really need here is the following:
>>
>> 1) If this is a BAR containing MSI-X vector, first try mapping the entire
>> BAR. If it succeeds, great - that would be your new kernel behavior.
>> 2) If we failed on step 1), check to see if we can map around the BAR. If
>> we can, try to map around it like the current code does. If we cannot map
>> around it (i.e. if MSI-X vector, page aligned, occupies entire BAR), then we
>> simply return 0 and skip the BAR.
>>
>> That, i would think, would keep the old behavior and enable the new one.
>>
>> Does that make sense?
>>
>
> I envision this to look something like this:
>
> bool again = false;
> do {
>         if (again) {
>                 // set up mmap-around
>                 if (cannot map around)
>                         return 0;
>         }
>         // try mapping
>         if (map_failed && msix_table->bar_index == bar_index) {
>                 again = true;
>                 continue;
>         }
>         if (map_failed)
>                 return -1;
>         break/return 0;
> } while (again);
>
> --
> Thanks,
> Anatoly

That makes sense. The return code was not same as old one in some paths.

I wrote a code based on your idea. It works at least in my ppc64 and
x86 machines, but I am concerned that the error messages for
pci_map_resource() confuse users in old Linux. I saw a message like
this (even if I could mmap):
EAL: pci_map_resource(): cannot mmap(15, 0x728ee3a30000, 0x4000, 0x0):
Invalid argument (0xffffffffffffffff)

But anyway, I send it in the next email, and please check if there is
any other problems in the code.

Thanks,
Takeshi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v4] vfio: fix workaround of BAR0 mapping
  2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
  2018-07-12  9:10   ` Burakov, Anatoly
  2018-07-13 10:11   ` [PATCH v3] " Takeshi Yoshimura
@ 2018-07-17  8:22   ` Takeshi Yoshimura
  2018-07-17 10:08     ` Burakov, Anatoly
  2018-07-20  8:13   ` [PATCH v5] vfio: fix workaround of BAR mapping Takeshi Yoshimura
  3 siblings, 1 reply; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-17  8:22 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, Takeshi Yoshimura

The workaround of BAR0 mapping gives up and immediately returns an
error if it cannot map around the MSI-X. However, recent version
of VFIO allows MSIX mapping (*).

I fixed not to return immediately but try mapping. In old Linux, mmap
just fails and returns the same error as the code before my fix . In
recent Linux, mmap succeeds and this patch enables running DPDK in
specific environments (e.g., ppc64le with HGST NVMe)

(*): "vfio-pci: Allow mapping MSIX BAR",
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6

Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")

Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 92 ++++++++++++++++++++++------------------
 1 file changed, 51 insertions(+), 41 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..afdf0f6d5 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -332,50 +332,58 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 	void *bar_addr;
 	struct pci_msix_table *msix_table = &vfio_res->msix_table;
 	struct pci_map *bar = &vfio_res->maps[bar_index];
+	bool again = false;
 
 	if (bar->size == 0)
 		/* Skip this BAR */
 		return 0;
 
-	if (msix_table->bar_index == bar_index) {
-		/*
-		 * VFIO will not let us map the MSI-X table,
-		 * but we can map around it.
-		 */
-		uint32_t table_start = msix_table->offset;
-		uint32_t table_end = table_start + msix_table->size;
-		table_end = (table_end + ~PAGE_MASK) & PAGE_MASK;
-		table_start &= PAGE_MASK;
-
-		if (table_start == 0 && table_end >= bar->size) {
-			/* Cannot map this BAR */
-			RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n", bar_index);
-			bar->size = 0;
-			bar->addr = 0;
-			return 0;
-		}
-
-		memreg[0].offset = bar->offset;
-		memreg[0].size = table_start;
-		memreg[1].offset = bar->offset + table_end;
-		memreg[1].size = bar->size - table_end;
-
-		RTE_LOG(DEBUG, EAL,
-			"Trying to map BAR%d that contains the MSI-X "
-			"table. Trying offsets: "
-			"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
-			memreg[0].offset, memreg[0].size,
-			memreg[1].offset, memreg[1].size);
-	} else {
-		memreg[0].offset = bar->offset;
-		memreg[0].size = bar->size;
-	}
-
 	/* reserve the address using an inaccessible mapping */
 	bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |
 			MAP_ANONYMOUS | additional_flags, -1, 0);
-	if (bar_addr != MAP_FAILED) {
+	if (bar_addr == MAP_FAILED) {
+		RTE_LOG(ERR, EAL,
+			"Failed to create inaccessible mapping for BAR%d\n",
+			bar_index);
+		return -1;
+	}
+
+	memreg[0].offset = bar->offset;
+	memreg[0].size = bar->size;
+	do {
 		void *map_addr = NULL;
+		if (again) {
+			/*
+			 * VFIO did not let us map the MSI-X table,
+			 * but we can map around it.
+			 */
+			uint32_t table_start = msix_table->offset;
+			uint32_t table_end = table_start + msix_table->size;
+			table_end = (table_end + ~PAGE_MASK) & PAGE_MASK;
+			table_start &= PAGE_MASK;
+
+			if (table_start == 0 && table_end >= bar->size) {
+				/* Cannot map this BAR */
+				RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n",
+						bar_index);
+				bar->size = 0;
+				bar->addr = 0;
+				return 0;
+			}
+
+			memreg[0].offset = bar->offset;
+			memreg[0].size = table_start;
+			memreg[1].offset = bar->offset + table_end;
+			memreg[1].size = bar->size - table_end;
+
+			RTE_LOG(DEBUG, EAL,
+				"Trying to map BAR%d that contains the MSI-X "
+				"table. Trying offsets: "
+				"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
+				memreg[0].offset, memreg[0].size,
+				memreg[1].offset, memreg[1].size);
+		}
+
 		if (memreg[0].size) {
 			/* actual map of first part */
 			map_addr = pci_map_resource(bar_addr, vfio_dev_fd,
@@ -384,6 +392,12 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 							MAP_FIXED);
 		}
 
+		if (map_addr == MAP_FAILED &&
+			msix_table->bar_index == bar_index && !again) {
+			again = true;
+			continue;
+		}
+
 		/* if there's a second part, try to map it */
 		if (map_addr != MAP_FAILED
 			&& memreg[1].offset && memreg[1].size) {
@@ -404,12 +418,8 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 					bar_index);
 			return -1;
 		}
-	} else {
-		RTE_LOG(ERR, EAL,
-				"Failed to create inaccessible mapping for BAR%d\n",
-				bar_index);
-		return -1;
-	}
+		break;
+	} while (again);
 
 	bar->addr = bar_addr;
 	return 0;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v4] vfio: fix workaround of BAR0 mapping
  2018-07-17  8:22   ` [PATCH v4] " Takeshi Yoshimura
@ 2018-07-17 10:08     ` Burakov, Anatoly
  0 siblings, 0 replies; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-17 10:08 UTC (permalink / raw)
  To: Takeshi Yoshimura; +Cc: dev

On 17-Jul-18 9:22 AM, Takeshi Yoshimura wrote:
> The workaround of BAR0 mapping gives up and immediately returns an
> error if it cannot map around the MSI-X. However, recent version
> of VFIO allows MSIX mapping (*).
> 
> I fixed not to return immediately but try mapping. In old Linux, mmap
> just fails and returns the same error as the code before my fix . In
> recent Linux, mmap succeeds and this patch enables running DPDK in
> specific environments (e.g., ppc64le with HGST NVMe)

I don't think this applies to BAR0 only - it can be any BAR. Suggested 
rewording:

Currently, VFIO will try to map around MSI-X table in the BARs. When 
MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR, 
VFIO will just skip the BAR.

Recent kernel versions will allow VFIO to map the entire BAR containing 
MSI-X tables (*), so instead of trying to map around the MSI-X vector or 
skipping the BAR entirely if it's not possible, we can now try mapping 
the entire BAR first. If mapping the entire BAR doesn't succeed, fall 
back to the old behavior of mapping around MSI-X table or skipping the BAR.

> 
> (*): "vfio-pci: Allow mapping MSIX BAR",
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6

I think your link is wrong here - at least i can't find the commit when 
i copypaste the link into my browser.

> 
> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> 
> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> ---

<snip>

> +	memreg[0].offset = bar->offset;
> +	memreg[0].size = bar->size;
> +	do {
>   		void *map_addr = NULL;
> +		if (again) {
> +			/*
> +			 * VFIO did not let us map the MSI-X table,
> +			 * but we can map around it.
> +			 */
> +			uint32_t table_start = msix_table->offset;
> +			uint32_t table_end = table_start + msix_table->size;
> +			table_end = (table_end + ~PAGE_MASK) & PAGE_MASK;
> +			table_start &= PAGE_MASK;
> +
> +			if (table_start == 0 && table_end >= bar->size) {
> +				/* Cannot map this BAR */
> +				RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n",
> +						bar_index);
> +				bar->size = 0;
> +				bar->addr = 0;
> +				return 0;

You have reserved space for the BAR earlier but do not unmap it on return.

Once that is fixed,

Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v5] vfio: fix workaround of BAR mapping
  2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
                     ` (2 preceding siblings ...)
  2018-07-17  8:22   ` [PATCH v4] " Takeshi Yoshimura
@ 2018-07-20  8:13   ` Takeshi Yoshimura
  2018-07-26  9:35     ` Thomas Monjalon
  3 siblings, 1 reply; 14+ messages in thread
From: Takeshi Yoshimura @ 2018-07-20  8:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, Takeshi Yoshimura

Currently, VFIO will try to map around MSI-X table in the BARs. When
MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR,
VFIO will just skip the BAR.

Recent kernel versions will allow VFIO to map the entire BAR containing
MSI-X tables (*), so instead of trying to map around the MSI-X vector
or skipping the BAR entirely if it's not possible, we can now try
mapping the entire BAR first. If mapping the entire BAR doesn't
succeed, fall back to the old behavior of mapping around MSI-X table or
skipping the BAR.

(*): "vfio-pci: Allow mapping MSIX BAR",
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6

Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")

Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---

Thanks, Anatoly.
I updated the code with munmap in an error path.
I also fixed the message and the wrong link.

Regards,
Takeshi

 drivers/bus/pci/linux/pci_vfio.c | 93 ++++++++++++++++++++++------------------
 1 file changed, 52 insertions(+), 41 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..07188c071 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -332,50 +332,59 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 	void *bar_addr;
 	struct pci_msix_table *msix_table = &vfio_res->msix_table;
 	struct pci_map *bar = &vfio_res->maps[bar_index];
+	bool again = false;
 
 	if (bar->size == 0)
 		/* Skip this BAR */
 		return 0;
 
-	if (msix_table->bar_index == bar_index) {
-		/*
-		 * VFIO will not let us map the MSI-X table,
-		 * but we can map around it.
-		 */
-		uint32_t table_start = msix_table->offset;
-		uint32_t table_end = table_start + msix_table->size;
-		table_end = (table_end + ~PAGE_MASK) & PAGE_MASK;
-		table_start &= PAGE_MASK;
-
-		if (table_start == 0 && table_end >= bar->size) {
-			/* Cannot map this BAR */
-			RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n", bar_index);
-			bar->size = 0;
-			bar->addr = 0;
-			return 0;
-		}
-
-		memreg[0].offset = bar->offset;
-		memreg[0].size = table_start;
-		memreg[1].offset = bar->offset + table_end;
-		memreg[1].size = bar->size - table_end;
-
-		RTE_LOG(DEBUG, EAL,
-			"Trying to map BAR%d that contains the MSI-X "
-			"table. Trying offsets: "
-			"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
-			memreg[0].offset, memreg[0].size,
-			memreg[1].offset, memreg[1].size);
-	} else {
-		memreg[0].offset = bar->offset;
-		memreg[0].size = bar->size;
-	}
-
 	/* reserve the address using an inaccessible mapping */
 	bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |
 			MAP_ANONYMOUS | additional_flags, -1, 0);
-	if (bar_addr != MAP_FAILED) {
+	if (bar_addr == MAP_FAILED) {
+		RTE_LOG(ERR, EAL,
+			"Failed to create inaccessible mapping for BAR%d\n",
+			bar_index);
+		return -1;
+	}
+
+	memreg[0].offset = bar->offset;
+	memreg[0].size = bar->size;
+	do {
 		void *map_addr = NULL;
+		if (again) {
+			/*
+			 * VFIO did not let us map the MSI-X table,
+			 * but we can map around it.
+			 */
+			uint32_t table_start = msix_table->offset;
+			uint32_t table_end = table_start + msix_table->size;
+			table_end = (table_end + ~PAGE_MASK) & PAGE_MASK;
+			table_start &= PAGE_MASK;
+
+			if (table_start == 0 && table_end >= bar->size) {
+				/* Cannot map this BAR */
+				RTE_LOG(DEBUG, EAL, "Skipping BAR%d\n",
+						bar_index);
+				munmap(bar_addr, bar->size);
+				bar->size = 0;
+				bar->addr = 0;
+				return 0;
+			}
+
+			memreg[0].offset = bar->offset;
+			memreg[0].size = table_start;
+			memreg[1].offset = bar->offset + table_end;
+			memreg[1].size = bar->size - table_end;
+
+			RTE_LOG(DEBUG, EAL,
+				"Trying to map BAR%d that contains the MSI-X "
+				"table. Trying offsets: "
+				"0x%04lx:0x%04lx, 0x%04lx:0x%04lx\n", bar_index,
+				memreg[0].offset, memreg[0].size,
+				memreg[1].offset, memreg[1].size);
+		}
+
 		if (memreg[0].size) {
 			/* actual map of first part */
 			map_addr = pci_map_resource(bar_addr, vfio_dev_fd,
@@ -384,6 +393,12 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 							MAP_FIXED);
 		}
 
+		if (map_addr == MAP_FAILED &&
+			msix_table->bar_index == bar_index && !again) {
+			again = true;
+			continue;
+		}
+
 		/* if there's a second part, try to map it */
 		if (map_addr != MAP_FAILED
 			&& memreg[1].offset && memreg[1].size) {
@@ -404,12 +419,8 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res,
 					bar_index);
 			return -1;
 		}
-	} else {
-		RTE_LOG(ERR, EAL,
-				"Failed to create inaccessible mapping for BAR%d\n",
-				bar_index);
-		return -1;
-	}
+		break;
+	} while (again);
 
 	bar->addr = bar_addr;
 	return 0;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v5] vfio: fix workaround of BAR mapping
  2018-07-20  8:13   ` [PATCH v5] vfio: fix workaround of BAR mapping Takeshi Yoshimura
@ 2018-07-26  9:35     ` Thomas Monjalon
  2018-07-29  8:44       ` Jerin Jacob
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Monjalon @ 2018-07-26  9:35 UTC (permalink / raw)
  To: Takeshi Yoshimura; +Cc: dev, Anatoly Burakov

20/07/2018 10:13, Takeshi Yoshimura:
> Currently, VFIO will try to map around MSI-X table in the BARs. When
> MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR,
> VFIO will just skip the BAR.
> 
> Recent kernel versions will allow VFIO to map the entire BAR containing
> MSI-X tables (*), so instead of trying to map around the MSI-X vector
> or skipping the BAR entirely if it's not possible, we can now try
> mapping the entire BAR first. If mapping the entire BAR doesn't
> succeed, fall back to the old behavior of mapping around MSI-X table or
> skipping the BAR.
> 
> (*): "vfio-pci: Allow mapping MSIX BAR",
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6
> 
> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> 
> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5] vfio: fix workaround of BAR mapping
  2018-07-26  9:35     ` Thomas Monjalon
@ 2018-07-29  8:44       ` Jerin Jacob
  2018-07-30  8:51         ` Burakov, Anatoly
  0 siblings, 1 reply; 14+ messages in thread
From: Jerin Jacob @ 2018-07-29  8:44 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Takeshi Yoshimura, dev, Anatoly Burakov

-----Original Message-----
> Date: Thu, 26 Jul 2018 11:35:43 +0200
> From: Thomas Monjalon <thomas@monjalon.net>
> To: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> Cc: dev@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping
> 
> 
> 20/07/2018 10:13, Takeshi Yoshimura:
> > Currently, VFIO will try to map around MSI-X table in the BARs. When
> > MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR,
> > VFIO will just skip the BAR.
> >
> > Recent kernel versions will allow VFIO to map the entire BAR containing
> > MSI-X tables (*), so instead of trying to map around the MSI-X vector
> > or skipping the BAR entirely if it's not possible, we can now try
> > mapping the entire BAR first. If mapping the entire BAR doesn't
> > succeed, fall back to the old behavior of mapping around MSI-X table or
> > skipping the BAR.
> >
> > (*): "vfio-pci: Allow mapping MSIX BAR",
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> > commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6
> >
> > Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> >
> > Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
> > Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>


This change set breaks thunderx/octeontx platform with following error.(Tested with 4.9.0 kernel)

EAL:   probe driver: 177d:a034 net_thunderx
EAL:   using IOMMU type 1 (Type 1)
EAL: pci_map_resource(): cannot mmap(44, 0xffff60200000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff)
EAL: PCI device 0001:01:00.2 on NUMA socket 0
EAL:   probe driver: 177d:a034 net_thunderx
EAL: pci_map_resource(): cannot mmap(47, 0xffff60600000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff)

According Linux kernel change, user space application suppose to use VFIO_REGION_INFO_CAP_MSIX_MAPPABLE
capability to detect this feature to work < 4.15 kernel. Right? if so, Why we
are doing this retry based logic?





> 
> Applied, thanks
> 
> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5] vfio: fix workaround of BAR mapping
  2018-07-29  8:44       ` Jerin Jacob
@ 2018-07-30  8:51         ` Burakov, Anatoly
  2018-07-30 10:03           ` Burakov, Anatoly
  0 siblings, 1 reply; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-30  8:51 UTC (permalink / raw)
  To: Jerin Jacob, Thomas Monjalon; +Cc: Takeshi Yoshimura, dev

On 29-Jul-18 9:44 AM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Thu, 26 Jul 2018 11:35:43 +0200
>> From: Thomas Monjalon <thomas@monjalon.net>
>> To: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>> Cc: dev@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>
>> Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping
>>
>>
>> 20/07/2018 10:13, Takeshi Yoshimura:
>>> Currently, VFIO will try to map around MSI-X table in the BARs. When
>>> MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR,
>>> VFIO will just skip the BAR.
>>>
>>> Recent kernel versions will allow VFIO to map the entire BAR containing
>>> MSI-X tables (*), so instead of trying to map around the MSI-X vector
>>> or skipping the BAR entirely if it's not possible, we can now try
>>> mapping the entire BAR first. If mapping the entire BAR doesn't
>>> succeed, fall back to the old behavior of mapping around MSI-X table or
>>> skipping the BAR.
>>>
>>> (*): "vfio-pci: Allow mapping MSIX BAR",
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
>>> commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6
>>>
>>> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
>>>
>>> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>>> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> 
> This change set breaks thunderx/octeontx platform with following error.(Tested with 4.9.0 kernel)
> 
> EAL:   probe driver: 177d:a034 net_thunderx
> EAL:   using IOMMU type 1 (Type 1)
> EAL: pci_map_resource(): cannot mmap(44, 0xffff60200000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff)
> EAL: PCI device 0001:01:00.2 on NUMA socket 0
> EAL:   probe driver: 177d:a034 net_thunderx
> EAL: pci_map_resource(): cannot mmap(47, 0xffff60600000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff)
> 
> According Linux kernel change, user space application suppose to use VFIO_REGION_INFO_CAP_MSIX_MAPPABLE
> capability to detect this feature to work < 4.15 kernel. Right? if so, Why we
> are doing this retry based logic?

I don't think anything's broken there - just a gratuitous error message.

But yes, i seem to have missed the region info flag. It was my 
suggestion to use the retry logic. I'll submit a patch fixing this.

> 
> 
> 
> 
> 
>>
>> Applied, thanks
>>
>>
>>
> 


-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v5] vfio: fix workaround of BAR mapping
  2018-07-30  8:51         ` Burakov, Anatoly
@ 2018-07-30 10:03           ` Burakov, Anatoly
  0 siblings, 0 replies; 14+ messages in thread
From: Burakov, Anatoly @ 2018-07-30 10:03 UTC (permalink / raw)
  To: Jerin Jacob, Thomas Monjalon; +Cc: Takeshi Yoshimura, dev

On 30-Jul-18 9:51 AM, Burakov, Anatoly wrote:
> On 29-Jul-18 9:44 AM, Jerin Jacob wrote:
>> -----Original Message-----
>>> Date: Thu, 26 Jul 2018 11:35:43 +0200
>>> From: Thomas Monjalon <thomas@monjalon.net>
>>> To: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>>> Cc: dev@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>
>>> Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping
>>>
>>>
>>> 20/07/2018 10:13, Takeshi Yoshimura:
>>>> Currently, VFIO will try to map around MSI-X table in the BARs. When
>>>> MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR,
>>>> VFIO will just skip the BAR.
>>>>
>>>> Recent kernel versions will allow VFIO to map the entire BAR containing
>>>> MSI-X tables (*), so instead of trying to map around the MSI-X vector
>>>> or skipping the BAR entirely if it's not possible, we can now try
>>>> mapping the entire BAR first. If mapping the entire BAR doesn't
>>>> succeed, fall back to the old behavior of mapping around MSI-X table or
>>>> skipping the BAR.
>>>>
>>>> (*): "vfio-pci: Allow mapping MSIX BAR",
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
>>>> commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6
>>>>
>>>> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
>>>>
>>>> Signed-off-by: Takeshi Yoshimura <t.yoshimura8869@gmail.com>
>>>> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
>>
>>
>> This change set breaks thunderx/octeontx platform with following 
>> error.(Tested with 4.9.0 kernel)
>>
>> EAL:   probe driver: 177d:a034 net_thunderx
>> EAL:   using IOMMU type 1 (Type 1)
>> EAL: pci_map_resource(): cannot mmap(44, 0xffff60200000, 0x200000, 
>> 0x40000000000): Invalid argument (0xffffffffffffffff)
>> EAL: PCI device 0001:01:00.2 on NUMA socket 0
>> EAL:   probe driver: 177d:a034 net_thunderx
>> EAL: pci_map_resource(): cannot mmap(47, 0xffff60600000, 0x200000, 
>> 0x40000000000): Invalid argument (0xffffffffffffffff)
>>
>> According Linux kernel change, user space application suppose to use 
>> VFIO_REGION_INFO_CAP_MSIX_MAPPABLE
>> capability to detect this feature to work < 4.15 kernel. Right? if so, 
>> Why we
>> are doing this retry based logic?
> 
> I don't think anything's broken there - just a gratuitous error message.
> 
> But yes, i seem to have missed the region info flag. It was my 
> suggestion to use the retry logic. I'll submit a patch fixing this.
> 

The patch to fix it involves way more work than i am comfortable with 
submitting to rc3, so i believe we should revert this patch and postpone 
the change to 18.11.


-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-07-30 10:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12  2:44 [PATCH] vfio: fix workaround of BAR0 mapping Takeshi Yoshimura
2018-07-12  3:08 ` [PATCH v2] " Takeshi Yoshimura
2018-07-12  9:10   ` Burakov, Anatoly
2018-07-13 10:11   ` [PATCH v3] " Takeshi Yoshimura
2018-07-13 11:00     ` Burakov, Anatoly
2018-07-13 11:08       ` Burakov, Anatoly
2018-07-17  8:21         ` Takeshi Yoshimura
2018-07-17  8:22   ` [PATCH v4] " Takeshi Yoshimura
2018-07-17 10:08     ` Burakov, Anatoly
2018-07-20  8:13   ` [PATCH v5] vfio: fix workaround of BAR mapping Takeshi Yoshimura
2018-07-26  9:35     ` Thomas Monjalon
2018-07-29  8:44       ` Jerin Jacob
2018-07-30  8:51         ` Burakov, Anatoly
2018-07-30 10:03           ` Burakov, Anatoly

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.