/mlx5: Decouple cvq iotlb handling from hw mapping
code")
The fix looks fine to me, but how come this is the commit that
introduced the problem? Can you help clarify?
Reviewed-by: Si-Wei Liu
Thanks,
-Siwei
Signed-off-by: Dragos Tatulea
Reviewed-by: Cosmin Ratiu
---
drivers/vdpa/mlx5
On 8/27/2024 9:02 AM, Dragos Tatulea wrote:
When the vdpa device is configured without a specific MAC
address, the vport MAC address is used. However, this
address can be 0 which prevents the driver from properly
configuring the MPFS and breaks steering.
The solution is to simply generate a r
On 12/12/2023 11:21 AM, Eugenio Perez Martin wrote:
On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea wrote:
Addresses get set by .set_vq_address. hw vq addresses will be updated on
next modify_virtqueue.
Signed-off-by: Dragos Tatulea
Reviewed-by: Gal Pressman
Acked-by: Eugenio Pérez
I'm k
On 2/28/2021 1:27 PM, Michael S. Tsirkin wrote:
On Thu, Feb 25, 2021 at 04:56:42PM -0800, Si-Wei Liu wrote:
Hi Michael,
Are you okay to live without this ioctl for now? I think QEMU is the one
that needs to be fixed and will have to be made legacy guest aware. I think
the kernel can just
;s fine, I would proceed to reverting commit fe36cbe067 and related
code in question from the kernel.
Thanks,
-Siwei
On 2/24/2021 10:24 AM, Si-Wei Liu wrote:
Detecting it isn't enough though, we will need a new ioctl to notify
the kernel that it's a legacy guest. Ugh :(
Well, althou
On 2/23/2021 9:04 PM, Michael S. Tsirkin wrote:
On Tue, Feb 23, 2021 at 11:35:57AM -0800, Si-Wei Liu wrote:
On 2/23/2021 5:26 AM, Michael S. Tsirkin wrote:
On Tue, Feb 23, 2021 at 10:03:57AM +0800, Jason Wang wrote:
On 2021/2/23 9:12 上午, Si-Wei Liu wrote:
On 2/21/2021 11:34 PM, Michael S
On 2/23/2021 5:26 AM, Michael S. Tsirkin wrote:
On Tue, Feb 23, 2021 at 10:03:57AM +0800, Jason Wang wrote:
On 2021/2/23 9:12 上午, Si-Wei Liu wrote:
On 2/21/2021 11:34 PM, Michael S. Tsirkin wrote:
On Mon, Feb 22, 2021 at 12:14:17PM +0800, Jason Wang wrote:
On 2021/2/19 7:54 下午, Si-Wei
On 2/21/2021 11:34 PM, Michael S. Tsirkin wrote:
On Mon, Feb 22, 2021 at 12:14:17PM +0800, Jason Wang wrote:
On 2021/2/19 7:54 下午, Si-Wei Liu wrote:
Commit 452639a64ad8 ("vdpa: make sure set_features is invoked
for legacy") made an exception for legacy guests to reset
features
On 2/21/2021 8:14 PM, Jason Wang wrote:
On 2021/2/19 7:54 下午, Si-Wei Liu wrote:
Commit 452639a64ad8 ("vdpa: make sure set_features is invoked
for legacy") made an exception for legacy guests to reset
features to 0, when config space is accessed before features
are set. We should r
On 2/19/2021 6:38 PM, Jason Wang wrote:
Right now the value is exposed to userspace via GET_VRING_BASE, so
only last_avail_idx is synced. If we need sync last_used_idx, we
should also sync pending indices which requires more thoughts.
Technically it doesn't sound right - crossing the bound
On 2/17/2021 11:42 AM, Si-Wei Liu wrote:
On 2/16/2021 8:20 AM, Eli Cohen wrote:
When we suspend the VM, the VDPA interface will be reset. When the VM is
resumed again, clear_virtqueues() will clear the available and used
indices resulting in hardware virqtqueue objects becoming out of sync
On 2/18/2021 7:10 PM, Jason Wang wrote:
On 2021/2/18 8:43 下午, Si-Wei Liu wrote:
On 2/17/2021 8:44 PM, Jason Wang wrote:
On 2021/2/10 下午4:59, Si-Wei Liu wrote:
On 2/9/2021 7:53 PM, Jason Wang wrote:
On 2021/2/10 上午10:30, Si-Wei Liu wrote:
On 2/8/2021 10:37 PM, Jason Wang wrote
o 0
prematurely causes correct MTU and link status unable to load
for the very first config space access, rendering issues like
guest showing inaccurate MTU value, or failure to reject
out-of-range MTU.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by:
On 2/17/2021 8:44 PM, Jason Wang wrote:
On 2021/2/10 下午4:59, Si-Wei Liu wrote:
On 2/9/2021 7:53 PM, Jason Wang wrote:
On 2021/2/10 上午10:30, Si-Wei Liu wrote:
On 2/8/2021 10:37 PM, Jason Wang wrote:
On 2021/2/9 下午2:12, Eli Cohen wrote:
On Tue, Feb 09, 2021 at 11:20:14AM +0800
On 2/16/2021 7:21 AM, Eli Cohen wrote:
On Thu, Feb 11, 2021 at 09:33:14AM +0200, Eli Cohen wrote:
On Wed, Feb 10, 2021 at 01:48:00PM -0800, Si-Wei Liu wrote:
While virtq is stopped, get_vq_state() is supposed to
be called to get sync'ed with the latest internal
avail_index from d
On 2/17/2021 1:20 PM, Michael S. Tsirkin wrote:
On Wed, Feb 17, 2021 at 11:42:48AM -0800, Si-Wei Liu wrote:
On 2/16/2021 8:20 AM, Eli Cohen wrote:
When we suspend the VM, the VDPA interface will be reset. When the VM is
resumed again, clear_virtqueues() will clear the available and used
set_vq_state(). In get_vq_state() we return the value of hardware
used index.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Eli Cohen
Acked-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 17 -
1 file changed, 4 inserti
On 2/10/2021 7:45 AM, Eli Cohen wrote:
On Wed, Feb 10, 2021 at 12:59:03AM -0800, Si-Wei Liu wrote:
On 2/9/2021 7:53 PM, Jason Wang wrote:
On 2021/2/10 上午10:30, Si-Wei Liu wrote:
On 2/8/2021 10:37 PM, Jason Wang wrote:
On 2021/2/9 下午2:12, Eli Cohen wrote:
On Tue, Feb 09, 2021 at 11:20
e Ethernet header up to the FCS altogether.
Fix the MTU so packets won't get dropped silently.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Si-Wei Liu
Acked-by: Jason Wang
Acked-by: Eli Cohen
---
drivers/vdpa/mlx5/core/mlx5_vdpa.
--
v1->v2: move feature capability query to probing (Eli)
Si-Wei Liu (3):
vdpa/mlx5: should exclude header length and fcs from mtu
vdpa/mlx5: fix feature negotiation across device reset
vdpa/mlx5: defer clear_virtqueues to until DRIVER_OK
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4
driv
to be started,
i.e. until VIRTIO_CONFIG_S_DRIVER_OK is set again in
set_status().
Fixes: b35ccebe3ef7 ("vdpa/mlx5: Restore the hardware used index after change
map")
Signed-off-by: Si-Wei Liu
Acked-by: Jason Wang
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
1 file changed, 1 insertion
wire.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/driver
On 2/9/2021 7:53 PM, Jason Wang wrote:
On 2021/2/10 上午10:30, Si-Wei Liu wrote:
On 2/8/2021 10:37 PM, Jason Wang wrote:
On 2021/2/9 下午2:12, Eli Cohen wrote:
On Tue, Feb 09, 2021 at 11:20:14AM +0800, Jason Wang wrote:
On 2021/2/8 下午6:04, Eli Cohen wrote:
On Mon, Feb 08, 2021 at 05:04
, 2021 at 12:27:18PM +0800, Jason Wang wrote:
On 2021/2/6 上午7:07, Si-Wei Liu wrote:
On 2/3/2021 11:36 PM, Eli Cohen wrote:
When a change of memory map occurs, the hardware resources are
destroyed
and then re-created again with the new memory map. In such
case, we need
to restore the hardware
On 2/8/2021 7:37 PM, Jason Wang wrote:
On 2021/2/6 下午8:29, Si-Wei Liu wrote:
While virtq is stopped, get_vq_state() is supposed to
be called to get sync'ed with the latest internal
avail_index from device. The saved avail_index is used
to restate the virtq once device is st
On 2/7/2021 9:48 PM, Eli Cohen wrote:
On Sat, Feb 06, 2021 at 04:29:24AM -0800, Si-Wei Liu wrote:
While virtq is stopped, get_vq_state() is supposed to
be called to get sync'ed with the latest internal
avail_index from device. The saved avail_index is used
to restate the virtq
On 2/7/2021 9:35 PM, Eli Cohen wrote:
On Sat, Feb 06, 2021 at 04:29:23AM -0800, Si-Wei Liu wrote:
The mlx_features denotes the capability for which
set of virtio features is supported by device. In
principle, this field needs not be cleared during
virtio device reset, as this capability is
e Ethernet header up to the FCS altogether.
Fix the MTU so packets won't get dropped silently.
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4
drivers/vdpa/mlx5/net/mlx5_vnet.c | 15 ++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git
to be started,
i.e. until VIRTIO_CONFIG_S_DRIVER_OK is set again in
set_status().
Fixes: b35ccebe3ef7 ("vdpa/mlx5: Restore the hardware used index after change
map")
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
wire.
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index b8416c4..aa6f8cd 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_v
On 2/3/2021 11:36 PM, Eli Cohen wrote:
When a change of memory map occurs, the hardware resources are destroyed
and then re-created again with the new memory map. In such case, we need
to restore the hardware available and used indices. The driver failed to
restore the used index which is adde
On Tue, Feb 2, 2021 at 9:16 PM Jason Wang wrote:
>
>
> On 2021/2/3 上午1:54, Si-Wei Liu wrote:
> > On Tue, Feb 2, 2021 at 1:23 AM Eli Cohen wrote:
> >> On Tue, Feb 02, 2021 at 12:38:51AM -0800, Si-Wei Liu wrote:
> >>> Thanks Eli and Jason for clarifications. S
On Tue, Feb 2, 2021 at 10:48 PM Eli Cohen wrote:
>
> On Tue, Feb 02, 2021 at 09:14:02AM -0800, Si-Wei Liu wrote:
> > On Tue, Feb 2, 2021 at 6:34 AM Eli Cohen wrote:
> > >
> > > When a change of memory map occurs, the hardware resources are destroyed
> > >
On Tue, Feb 2, 2021 at 1:23 AM Eli Cohen wrote:
>
> On Tue, Feb 02, 2021 at 12:38:51AM -0800, Si-Wei Liu wrote:
> > Thanks Eli and Jason for clarifications. See inline.
> >
> > On Mon, Feb 1, 2021 at 11:06 PM Eli Cohen wrote:
> > >
> > > On Tue, Feb 02,
On Tue, Feb 2, 2021 at 6:34 AM Eli Cohen wrote:
>
> When a change of memory map occurs, the hardware resources are destroyed
> and then re-created again with the new memory map. In such case, we need
> to restore the hardware available and used indices. The driver failed to
> restore the used inde
Thanks Eli and Jason for clarifications. See inline.
On Mon, Feb 1, 2021 at 11:06 PM Eli Cohen wrote:
>
> On Tue, Feb 02, 2021 at 02:02:25PM +0800, Jason Wang wrote:
> >
> > On 2021/2/2 下午12:15, Si-Wei Liu wrote:
> > > On Mon, Feb 1, 2021 at 7:13 PM Jason Wang wrote:
On Mon, Feb 1, 2021 at 7:13 PM Jason Wang wrote:
>
>
> On 2021/2/2 上午3:17, Si-Wei Liu wrote:
> > On Mon, Feb 1, 2021 at 10:51 AM Si-Wei Liu wrote:
> >> On Thu, Jan 28, 2021 at 5:46 AM Eli Cohen wrote:
> >>> suspend_vq should only suspend the VQ on not sa
On Mon, Feb 1, 2021 at 10:51 AM Si-Wei Liu wrote:
>
> On Thu, Jan 28, 2021 at 5:46 AM Eli Cohen wrote:
> >
> > suspend_vq should only suspend the VQ on not save the current available
> > index. This is done when a change of map occurs when the driver calls
> >
On Thu, Jan 28, 2021 at 5:46 AM Eli Cohen wrote:
>
> suspend_vq should only suspend the VQ on not save the current available
> index. This is done when a change of map occurs when the driver calls
> save_channel_info().
Hmmm, suspend_vq() is also called by teardown_vq(), the latter of
which doesn
On 11/25/2020 1:30 AM, Michael S. Tsirkin wrote:
On Thu, Nov 05, 2020 at 06:26:33PM -0500, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping
A gentle reminder. Any chance this patch will get picked soon?
Thanks,
-Siwei
On 11/9/2020 7:28 PM, Jason Wang wrote:
On 2020/11/6 上午7:26, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the
On 11/9/2020 7:28 PM, Jason Wang wrote:
On 2020/11/6 上午7:26, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to what
On 11/9/2020 2:42 PM, Michael S. Tsirkin wrote:
On Mon, Nov 09, 2020 at 01:44:03PM -0800, si-wei liu wrote:
On 11/8/2020 7:21 PM, Jason Wang wrote:
On 2020/11/6 上午6:57, si-wei liu wrote:
On 11/4/2020 7:26 PM, Jason Wang wrote:
On 2020/11/5 上午7:33, Si-Wei Liu wrote:
Pinned pages are not
On 11/8/2020 7:21 PM, Jason Wang wrote:
On 2020/11/6 上午6:57, si-wei liu wrote:
On 11/4/2020 7:26 PM, Jason Wang wrote:
On 2020/11/5 上午7:33, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for
memory demand for VM with a large
amount of memory, or in the situation where host is running
short of free memory.
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
Changes in v3:
- Turn explicit last_pfn check to a WARN_ON() (Jason)
Changes in v2:
On 11/4/2020 7:26 PM, Jason Wang wrote:
On 2020/11/5 上午7:33, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to what
On 11/4/2020 7:12 PM, Jason Wang wrote:
On 2020/11/5 上午7:40, si-wei liu wrote:
On 11/3/2020 6:42 PM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages
memory demand for VM with a large
amount of memory, or in the situation where host is running
short of free memory.
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
Changes in v2:
- Drop the reversion patch
- Fix unhandled page leak towards the end of
On 11/3/2020 6:42 PM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to
On 11/3/2020 5:58 PM, Jason Wang wrote:
On 2020/11/4 上午9:08, si-wei liu wrote:
On 11/3/2020 5:06 PM, si-wei liu wrote:
On 11/3/2020 5:00 AM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB
On 11/3/2020 5:06 PM, si-wei liu wrote:
On 11/3/2020 5:00 AM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for
On 11/3/2020 5:00 AM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to
On 10/29/2020 2:53 PM, Michael S. Tsirkin wrote:
On Thu, Oct 15, 2020 at 01:17:14PM -0700, si-wei liu wrote:
On 10/15/2020 6:11 AM, Michael S. Tsirkin wrote:
On Thu, Oct 15, 2020 at 02:15:32PM +0800, Jason Wang wrote:
On 2020/10/14 上午7:42, si-wei liu wrote:
So what I suggest is to fix the
memory demand for VM with a large
amount of memory, or in the situation where host is running
short of free memory.
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 64 +---
1 fi
This reverts commit 7ed9e3d97c32d969caded2dfb6e67c1a2cc5a0b1.
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 119 +--
1 file changed, 48 insertions(+), 71 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index a2dbc85
On 10/29/2020 2:53 PM, Michael S. Tsirkin wrote:
On Thu, Oct 15, 2020 at 01:17:14PM -0700, si-wei liu wrote:
On 10/15/2020 6:11 AM, Michael S. Tsirkin wrote:
On Thu, Oct 15, 2020 at 02:15:32PM +0800, Jason Wang wrote:
On 2020/10/14 上午7:42, si-wei liu wrote:
So what I suggest is to fix the
On 10/15/2020 6:11 AM, Michael S. Tsirkin wrote:
On Thu, Oct 15, 2020 at 02:15:32PM +0800, Jason Wang wrote:
On 2020/10/14 上午7:42, si-wei liu wrote:
So what I suggest is to fix the pinning leakage first and do the
possible optimization on top (which is still questionable to me).
OK
On 10/9/2020 7:27 PM, Jason Wang wrote:
On 2020/10/3 下午1:02, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path. As the inflight pinned
pages, specifically for memory region that
885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
Changes in v3:
- Factor out vhost_vdpa_map() change to a separate patch
Changes in v2:
- Fix incorrect target SHA1 referenced
drivers/vhost/vdpa.c | 119 ++-
1 f
vhost_vdpa_map() should remove the iotlb entry just added
if the corresponding mapping fails to set up properly.
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dri
t_vdpa_map() failure
This patchset attempts to address the above issues.
Changes in v3:
- Factor out changes in vhost_vdpa_map() and the fix for
page pinning leak to separate patches (Jason)
---
Si-Wei Liu (2):
vhost-vdpa: fix vhost_vdpa_map() on error condition
vhost-vdpa: fix page pinning
+ Eli.
On Thu, Oct 1, 2020 at 2:02 PM Si-Wei Liu wrote:
>
> A VM with mlx5 vDPA has below warnings while being reset:
>
> vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
> vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)
>
Thanks Stephen, the SHA1 referenced is not correct. A v2 patch is posted.
Thanks,
-Siwei
On 10/1/2020 3:32 PM, Stephen Rothwell wrote:
Hi all,
In commit
c9795f8fbb41 ("vhost-vdpa: fix page pinning leakage in error path")
Fixes tag
Fixes: 20453a45fb06 ("vhost: introduce vDPA-based bac
885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
Changes in v2:
- Fix incorrect target SHA1 referenced
drivers/vhost/vdpa.c | 121 +++
1 file changed, 73 insertions(+), 48 deletions(-)
diff --git a/drivers/vhost/v
5fb06 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 121 +++
1 file changed, 73 insertions(+), 48 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 796fe97..abc4aa2 10064
index, regardless of vDPA device
status. Save the index that was last seen when virtq was
stopped, so that userspace doesn't complain.
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/dr
66 matches
Mail list logo