Re: [PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers

2020-07-16 Thread Jason Wang
On 2020/7/16 下午7:23, Zhu Lingshan wrote: This commit replaced irq_request/free() with helpers in vDPA core, so that it can request/free irq and setup irq offloading on order. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 14 +- 1

Re: [PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-16 Thread Jason Wang
On 2020/7/16 下午7:23, Zhu Lingshan wrote: This patch introduce a set of functions for setup/unsetup and update irq offloading respectively by register/unregister and re-register the irq_bypass_producer. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang --- drivers/vhost/Kconfig | 1 +

Re: [PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core

2020-07-16 Thread Jason Wang
On 2020/7/16 下午7:23, Zhu Lingshan wrote: This commit implements IRQ offloading helpers Let's say "vq irq allocate/free helpers" here. in vDPA core by introducing two couple of functions: vdpa_alloc_vq_irq() and vdpa_free_vq_irq(): request irq and free irq, will setup irq offloading.

Re: [PATCH V2 2/6] kvm: detect assigned device via irqbypass manager

2020-07-16 Thread Jason Wang
On 2020/7/16 下午7:23, Zhu Lingshan wrote: vDPA devices has dedicated backed hardware like passthrough-ed devices. Then it is possible to setup irq offloading to vCPU for vDPA devices. Thus this patch tries to manipulated assigned device counters via irqbypass manager. This part needs some

Re: [PATCH V2 1/6] vhost: introduce vhost_call_ctx

2020-07-16 Thread Jason Wang
On 2020/7/16 下午7:23, Zhu Lingshan wrote: This commit introduces struct vhost_call_ctx which replaced raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. Besides eventfd_ctx, it contains a spin lock and an irq_bypass_producer in its structure. Signed-off-by: Zhu Lingshan Suggested-by:

Re: [PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 01:19:55PM +0200, Christian Borntraeger wrote: > > > On 15.07.20 13:51, Michael S. Tsirkin wrote: > > On Wed, Jul 15, 2020 at 06:16:59PM +0800, Jason Wang wrote: > >> > >> On 2020/7/15 下午5:50, Michael S. Tsirkin wrote: > >>> On Wed, Jul 15, 2020 at 10:31:09AM +0200,

Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code

2020-07-16 Thread kernel test robot
Hi Eli, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: ia64-allmodconfig

Re: [PATCH v7 2/2] s390: virtio: PV needs VIRTIO I/O device protection

2020-07-16 Thread Christian Borntraeger
On 15.07.20 13:51, Michael S. Tsirkin wrote: > On Wed, Jul 15, 2020 at 06:16:59PM +0800, Jason Wang wrote: >> >> On 2020/7/15 下午5:50, Michael S. Tsirkin wrote: >>> On Wed, Jul 15, 2020 at 10:31:09AM +0200, Pierre Morel wrote: If protected virtualization is active on s390, the virtio queues

Re: [PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices

2020-07-16 Thread kernel test robot
Hi Eli, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: i386-allyesconfig

Re: [virtio-dev] [RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 03:01:18PM +0800, teawater wrote: > > > > 2020年7月16日 14:38,Michael S. Tsirkin 写道: > > > > On Thu, Jul 16, 2020 at 10:41:50AM +0800, Hui Zhu wrote: > >> The first, second and third version are in [1], [2] and [3]. > >> Code of current version for Linux and qemu is

Re: [PATCH vhost next 08/10] vdpa/mlx5: Add support library for mlx5 VDPA implementation

2020-07-16 Thread kernel test robot
Hi Eli, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: mips-allyesconfig

Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code

2020-07-16 Thread kernel test robot
Hi Eli, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: i386

Re: [PATCH vhost next 06/10] vdpa: Add means to communicate vq status on get_vq_state

2020-07-16 Thread Jason Wang
On 2020/7/16 下午4:21, Eli Cohen wrote: On Thu, Jul 16, 2020 at 04:11:00PM +0800, Jason Wang wrote: On 2020/7/16 下午3:23, Eli Cohen wrote: Currently, get_vq_state() is used only to pass the available index value of a vq. Extend the struct to return status on the VQ to the caller. For now, define

Re: Interesting qemu/virt-manager bug about the "rotational" attribute on virtio-blk disks

2020-07-16 Thread Stefano Garzarella
+Cc Michael, Stefan, virtualization@lists.linux-foundation.org On Thu, Jul 16, 2020 at 09:06:14AM +0100, Richard W.M. Jones wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1857515 > > A virtio-blk disk which is backed by a raw file on an SSD, > inside the guest shows rotational = 1. > >

Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code

2020-07-16 Thread Jason Wang
On 2020/7/16 下午4:28, Eli Cohen wrote: On Thu, Jul 16, 2020 at 04:13:21PM +0800, Jason Wang wrote: On 2020/7/16 下午3:23, Eli Cohen wrote: Add code to support registering guest's memory region for the device. It would be better to use "userspace" memory here since vhost-vDPA could be used by

Re: [PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices

2020-07-16 Thread Jason Wang
On 2020/7/16 下午3:23, Eli Cohen wrote: Add a front end VDPA driver that registers in the VDPA bus and provides networking to a guest. The VDPA driver creates the necessary resources on the VF it is driving such that data path will be offloaded. Notifications are being communicated through the

Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code

2020-07-16 Thread Jason Wang
On 2020/7/16 下午3:23, Eli Cohen wrote: Add code to support registering guest's memory region for the device. It would be better to use "userspace" memory here since vhost-vDPA could be used by e.g dpdk application on the host in the future. Thanks

Re: [PATCH vhost next 06/10] vdpa: Add means to communicate vq status on get_vq_state

2020-07-16 Thread Jason Wang
On 2020/7/16 下午3:23, Eli Cohen wrote: Currently, get_vq_state() is used only to pass the available index value of a vq. Extend the struct to return status on the VQ to the caller. For now, define VQ_STATE_NOT_READY. In the future it will be extended to include other infomration. Modify current

Re: [PATCH vhost next 05/10] vhost: Fix documentation

2020-07-16 Thread Jason Wang
On 2020/7/16 下午3:23, Eli Cohen wrote: Fix documentation to match actual function prototypes. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Acked-by: Jason Wang --- drivers/vhost/iotlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-16 Thread Jason Wang
On 2020/7/16 下午2:15, Michael S. Tsirkin wrote: On Thu, Jul 16, 2020 at 12:20:09PM +0800, Jason Wang wrote: On 2020/7/16 下午12:13, Zhu, Lingshan wrote: On 7/16/2020 12:02 PM, Jason Wang wrote: On 2020/7/16 上午11:59, Zhu, Lingshan wrote: On 7/16/2020 10:59 AM, Jason Wang wrote: On 2020/7/16

Re: [PATCH RFC don't apply] vdpa_sim: endian-ness for config space

2020-07-16 Thread Jason Wang
On 2020/7/16 下午1:42, Michael S. Tsirkin wrote: On Wed, Jul 15, 2020 at 10:02:32PM +0800, Jason Wang wrote: On 2020/7/15 下午9:58, Michael S. Tsirkin wrote: VDPA sim stores config space as native endian, but that is wrong: modern guests expect LE. I coded up the following to fix it up, but it is

Re: [RFC for Linux v4 1/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES and inflate_cont_vq

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 10:41:51AM +0800, Hui Zhu wrote: > diff --git a/include/uapi/linux/virtio_balloon.h > b/include/uapi/linux/virtio_balloon.h > index dc3e656..4d0151a 100644 > --- a/include/uapi/linux/virtio_balloon.h > +++ b/include/uapi/linux/virtio_balloon.h > @@ -37,6 +37,7 @@ >

Re: [RFC for qemu v4 2/2] virtio_balloon: Add dcvq to deflate continuous pages

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 10:41:55AM +0800, Hui Zhu wrote: > This commit adds a vq dcvq to deflate continuous pages. > When VIRTIO_BALLOON_F_CONT_PAGES is set, try to get continuous pages > from icvq and use madvise MADV_WILLNEED with the pages. > > Signed-off-by: Hui Zhu This is arguably

Re: [RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 10:41:50AM +0800, Hui Zhu wrote: > The first, second and third version are in [1], [2] and [3]. > Code of current version for Linux and qemu is available in [4] and [5]. > Update of this version: > 1. Report continuous pages will increase the speed. So added deflate >

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 12:20:09PM +0800, Jason Wang wrote: > > On 2020/7/16 下午12:13, Zhu, Lingshan wrote: > > > > > > On 7/16/2020 12:02 PM, Jason Wang wrote: > > > > > > On 2020/7/16 上午11:59, Zhu, Lingshan wrote: > > > > > > > > On 7/16/2020 10:59 AM, Jason Wang wrote: > > > > > > > > > >

Re: [PATCH 0/7] *** IRQ offloading for vDPA ***

2020-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2020 at 09:39:17AM +0800, Zhu, Lingshan wrote: > > On 7/15/2020 9:43 PM, Jason Wang wrote: > > > On 2020/7/12 下午10:52, Zhu Lingshan wrote: > > Hi All, > > This series intends to implement IRQ offloading for > vhost_vdpa. > > By the feat of