Re: [RFC PATCH v2 0/6] Improve SOCK_SEQPACKET receive logic

2021-07-04 Thread Michael S. Tsirkin
On Sun, Jul 04, 2021 at 11:08:13AM +0300, Arseny Krasnov wrote: > This patchset modifies receive logic for SOCK_SEQPACKET. > Difference between current implementation and this version is that > now reader is woken up when there is at least one RW packet in rx > queue of socket and data is cop

Re: [RFC PATCH v2 0/6] Improve SOCK_SEQPACKET receive logic

2021-07-04 Thread Michael S. Tsirkin
On Sun, Jul 04, 2021 at 12:23:03PM +0300, Arseny Krasnov wrote: > > On 04.07.2021 11:30, Michael S. Tsirkin wrote: > > On Sun, Jul 04, 2021 at 11:08:13AM +0300, Arseny Krasnov wrote: > >>This patchset modifies receive logic for SOCK_SEQPACKET. > >> Difference between current implementation and

Re: [RFC PATCH] vhost-vdpa: mark vhost device invalid to reflect vdpa device unregistration

2021-07-04 Thread Michael S. Tsirkin
On Mon, Jul 05, 2021 at 02:22:04AM +0530, gautam.da...@xilinx.com wrote: > From: Gautam Dawar > > As mentioned in Bug 213179, any malicious user-space application can render > a module registering a vDPA device to hang forever. This will typically > surface when vdpa_device_unregister() is called

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
I think we missed the first deadline for 5.14-rc1 as Wolfram should be out of office now. Anyway lets make sure we fix all the pending bits before he is back and see if we can still pull it off by rc2. On 02-07-21, 16:46, Jie Deng wrote: > diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 02-07-21, 12:58, Andy Shevchenko wrote: > On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: > > +static int virtio_i2c_complete_reqs(struct virtqueue *vq, > > + struct virtio_i2c_req *reqs, > > + struct i2c_msg *msgs, int nr, >

Re: [PATCH V2 5/6] virtio: add one field into virtio_device for recording if device uses managed irq

2021-07-04 Thread Ming Lei
On Fri, Jul 02, 2021 at 11:55:40AM -0400, Michael S. Tsirkin wrote: > On Fri, Jul 02, 2021 at 11:05:54PM +0800, Ming Lei wrote: > > blk-mq needs to know if the device uses managed irq, so add one field > > to virtio_device for recording if device uses managed irq. > > > > If the driver use managed

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 10:43, Viresh Kumar wrote: On 02-07-21, 12:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: +static int virtio_i2c_complete_reqs(struct virtqueue *vq, + struct virtio_i2c_req *reqs, +

Re: [PATCH v8 10/10] Documentation: Add documentation for VDUSE

2021-07-04 Thread Jason Wang
在 2021/7/4 下午5:49, Yongji Xie 写道: OK, I get you now. Since the VIRTIO specification says "Device configuration space is generally used for rarely-changing or initialization-time parameters". I assume the VDUSE_DEV_SET_CONFIG ioctl should not be called frequently. The spec uses MUST and other te

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 10:40, Viresh Kumar wrote: I think we missed the first deadline for 5.14-rc1 as Wolfram should be out of office now. Anyway lets make sure we fix all the pending bits before he is back and see if we can still pull it off by rc2. On 02-07-21, 16:46, Jie Deng wrote: diff --git a/dri

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/2 17:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device specificati

Re: [RFC PATCH] vhost-vdpa: mark vhost device invalid to reflect vdpa device unregistration

2021-07-04 Thread Jason Wang
在 2021/7/5 上午4:52, gautam.da...@xilinx.com 写道: vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); @@ -1091,11 +1122,13 @@ static void vhost_vdpa_remove(struct vdpa_device *vdpa) opened = atomic_cmpxchg(&v->opened, 0, 1); if (!opened)

Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2021-07-04 Thread Viresh Kumar
On 03-07-21, 04:05, Michael S. Tsirkin wrote: > On Wed, May 26, 2021 at 09:02:06AM +0530, Viresh Kumar wrote: > > On 25-05-21, 14:59, Enrico Weigelt, metux IT consult wrote: > > > On 24.05.21 13:27, Viresh Kumar wrote: > > > > > > Hi, > > > > > > > > > > We (Linaro's Project Stratos > > > > http

Re: [PATCH V2 5/6] virtio: add one field into virtio_device for recording if device uses managed irq

2021-07-04 Thread Jason Wang
在 2021/7/2 下午11:05, Ming Lei 写道: blk-mq needs to know if the device uses managed irq, so add one field to virtio_device for recording if device uses managed irq. If the driver use managed irq, this flag has to be set so it can be passed to blk-mq. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc:vir

Re: [PATCH linux-next v3 2/6] vdpa: Introduce query of device config layout

2021-07-04 Thread Jason Wang
在 2021/7/2 下午2:04, Parav Pandit 写道: From: Jason Wang Sent: Thursday, July 1, 2021 1:13 PM Actually it depends on what attributes is required for building the config. We can simply reuse the existing virtio_net_config, if most of the fields are required. struct virtio_net_config_set {   

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 05-07-21, 11:45, Jie Deng wrote: > On 2021/7/5 10:40, Viresh Kumar wrote: > > On 02-07-21, 16:46, Jie Deng wrote: > > The right way of doing this is is making this function return - Error on > > failure > > and 0 on success. There is no point returning number of successful additions > > here. >

Re: [PATCH 2/3] vDPA/ifcvf: implement management netlink framework for ifcvf

2021-07-04 Thread Jason Wang
在 2021/6/30 下午4:21, Zhu Lingshan 写道: This commit implments the management netlink framework for ifcvf, including register and add / remove a device It works with iprouter2: [root@localhost lszhu]# vdpa mgmtdev show -jp { "mgmtdev": { "pci/:01:00.5": { "supported_c

Re: [PATCH 3/3] vDPA/ifcvf: set_status() should get a adapter from the mgmt dev

2021-07-04 Thread Jason Wang
在 2021/6/30 下午4:21, Zhu Lingshan 写道: ifcvf_vdpa_set_status() should get a adapter from the management device Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/

Re: [RFC PATCH] vhost-vdpa: mark vhost device invalid to reflect vdpa device unregistration

2021-07-04 Thread Jason Wang
在 2021/7/5 上午11:48, Jason Wang 写道: 在 2021/7/5 上午4:52, gautam.da...@xilinx.com 写道:   vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); @@ -1091,11 +1122,13 @@ static void vhost_vdpa_remove(struct vdpa_device *vdpa)   opened = atomic_cmpxchg(&v->opened, 0, 1);   if (

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 10:43, Viresh Kumar wrote: On 02-07-21, 12:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: +static int virtio_i2c_complete_reqs(struct virtqueue *vq, + struct virtio_i2c_req *reqs, +

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 12:38, Viresh Kumar wrote: On 05-07-21, 11:45, Jie Deng wrote: On 2021/7/5 10:40, Viresh Kumar wrote: On 02-07-21, 16:46, Jie Deng wrote: The right way of doing this is is making this function return - Error on failure and 0 on success. There is no point returning number of success

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 05-07-21, 14:22, Jie Deng wrote: > On 2021/7/5 12:38, Viresh Kumar wrote: > > On 05-07-21, 11:45, Jie Deng wrote: > > > On 2021/7/5 10:40, Viresh Kumar wrote: > > > > On 02-07-21, 16:46, Jie Deng wrote: > > > > The right way of doing this is is making this function return - Error > > > > on fai

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 05-07-21, 14:21, Jie Deng wrote: > > On 2021/7/5 10:43, Viresh Kumar wrote: > > On 02-07-21, 12:58, Andy Shevchenko wrote: > > > On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: > > > > +static int virtio_i2c_complete_reqs(struct virtqueue *vq, > > > > +

Re: [PATCH 2/3] vDPA/ifcvf: implement management netlink framework for ifcvf

2021-07-04 Thread Michael S. Tsirkin
On Mon, Jul 05, 2021 at 01:04:11PM +0800, Jason Wang wrote: > > +static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id > > *id) > > +{ > > + struct ifcvf_vdpa_mgmt_dev *ifcvf_mgmt_dev; > > + struct device *dev = &pdev->dev; > > + struct ifcvf_adapter *adapter; > > > adapt

[PATCH v13] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device specification can be found on https://lists.oasis-open.org/archives/virtio-comment/202101/msg8.html. By followi