Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 16 +++- > include/uapi/linux/vhost_types.h | 2 ++ > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/vhost/vdpa.c

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-14 Thread Jason Wang
On Mon, Aug 14, 2023 at 10:15 PM Dragos Tatulea wrote: > > On Wed, 2023-08-09 at 09:42 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 3:24 PM Dragos Tatulea wrote: > > > > > > On Tue, 2023-08-08 at 10:57 +0800, Jason Wang wrote: > > > > On Thu, Aug 3, 2023 at 7:40 PM Dragos Tatulea > > >

Re: [PATCH RFC 3/4] vhost-vdpa: should restore 1:1 dma mapping before detaching driver

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index b43e868..62b0a01 100644 > --- a/drivers/vhost/vdpa.c > +++

Re: [PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:46 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > include/linux/vdpa.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index db1b0ea..3a3878d 100644 > --- a/include/linux/vdpa.h > +++

[PATCH RFC 2/4] vdpa/mlx5: implement .reset_map driver op

2023-08-14 Thread Si-Wei Liu
This patch is based on top of the "vdpa/mlx5: Fixes for ASID handling" series [1]. [1] vdpa/mlx5: Fixes for ASID handling https://lore.kernel.org/virtualization/20230802171231.11001-1-dtatu...@nvidia.com/ Signed-off-by: Si-Wei Liu --- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 +

[PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-14 Thread Si-Wei Liu
Signed-off-by: Si-Wei Liu --- drivers/vhost/vdpa.c | 16 +++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 62b0a01..75092a7 100644 --- a/drivers/vhost/vdpa.c +++

[PATCH RFC 3/4] vhost-vdpa: should restore 1:1 dma mapping before detaching driver

2023-08-14 Thread Si-Wei Liu
Signed-off-by: Si-Wei Liu --- drivers/vhost/vdpa.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index b43e868..62b0a01 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -131,6 +131,15 @@ static struct

[PATCH RFC 0/4] vdpa: decouple reset of iotlb mapping from device reset

2023-08-14 Thread Si-Wei Liu
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip

[PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-14 Thread Si-Wei Liu
Signed-off-by: Si-Wei Liu --- include/linux/vdpa.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index db1b0ea..3a3878d 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -314,6 +314,12 @@ struct vdpa_map_file { *

Re: [PATCH] virtio-balloon: correct the comment of virtballoon_migratepage()

2023-08-14 Thread David Hildenbrand
On 13.08.23 16:07, Xueshi Hu wrote: After commit 68f2736a8583 ("mm: Convert all PageMovable users to movable_operations"), the execution path has been changed to move_to_new_folio movable_operations->migrate_page balloon_page_migrate

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-14 Thread Xuan Zhuo
On Mon, 14 Aug 2023 11:05:49 +0800, Jason Wang wrote: > On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo wrote: > > > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > > caller can do dma operation in advance. The purpose is to keep memory > > mapped across multiple add/get buf

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-14 Thread Michael S. Tsirkin
On Mon, Aug 14, 2023 at 04:56:53PM +0800, Xuan Zhuo wrote: > On Mon, 14 Aug 2023 11:05:49 +0800, Jason Wang wrote: > > On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo > > wrote: > > > > > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > > > caller can do dma operation in advance.

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-14 Thread Xuan Zhuo
On Mon, 14 Aug 2023 07:24:59 -0400, "Michael S. Tsirkin" wrote: > On Mon, Aug 14, 2023 at 04:56:53PM +0800, Xuan Zhuo wrote: > > On Mon, 14 Aug 2023 11:05:49 +0800, Jason Wang wrote: > > > On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo > > > wrote: > > > > > > > > Added virtqueue_dma_dev() to get

Re: [PATCH net-next 6/8] virtio-net: support rx netdim

2023-08-14 Thread kernel test robot
://lore.kernel.org/r/20230811065512.22190-7-hengqi%40linux.alibaba.com patch subject: [PATCH net-next 6/8] virtio-net: support rx netdim config: microblaze-randconfig-r081-20230814 (https://download.01.org/0day-ci/archive/20230814/202308142100.l4cn4g6z-...@intel.com/config) compiler: microblaze-linux-gcc (GCC

[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-14 Thread Feng Liu via Virtualization
The virtio_net driver currently deals with different versions and types of virtio net headers, such as virtio_net_hdr_mrg_rxbuf, virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies on multiple type casts to convert memory between different structures, potentially leading to bugs

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-14 Thread Dragos Tatulea via Virtualization
On Wed, 2023-08-09 at 09:42 +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 3:24 PM Dragos Tatulea wrote: > > > > On Tue, 2023-08-08 at 10:57 +0800, Jason Wang wrote: > > > On Thu, Aug 3, 2023 at 7:40 PM Dragos Tatulea wrote: > > > > > > > > On Thu, 2023-08-03 at 16:03 +0800, Jason Wang