Re: [PATCH v9 17/17] Documentation: Add documentation for VDUSE

2021-07-14 Thread Jason Wang
在 2021/7/13 下午4:46, Xie Yongji 写道: VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-14 Thread Jason Wang
在 2021/7/15 下午12:03, Yongji Xie 写道: Which ioctl can be used for this? I mean we can introduce a new ioctl for that in the future. Ok, I see. I wonder if it's better to do something similar to ccw: 1) requires the userspace to update the status bit in the response 2) update the

Re: [PATCH v9 13/17] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-07-14 Thread Jason Wang
在 2021/7/14 下午5:57, Dan Carpenter 写道: On Wed, Jul 14, 2021 at 05:41:54PM +0800, Jason Wang wrote: 在 2021/7/14 下午4:05, Dan Carpenter 写道: On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote: 在 2021/7/13 下午7:31, Dan Carpenter 写道: On Tue, Jul 13, 2021 at 04:46:52PM +0800, Xie Yongji

Re: [PATCH AUTOSEL 4.4 08/31] drm/virtio: Fixes a potential NULL pointer dereference on probe failure

2021-07-14 Thread Sasha Levin
On Mon, Jul 12, 2021 at 11:59:37PM +0200, Pavel Machek wrote: Hi! From: Xie Yongji [ Upstream commit 17f46f488a5d82c5568e6e786cd760bba1c2ee09 ] The dev->dev_private might not be allocated if virtio_gpu_pci_quirk() or virtio_gpu_init() failed. In this case, we should avoid the cleanup in

Re: [virtio-dev] Fwd: [PATCH v2] Provide detailed specification of virtio-blk lifetime metrics

2021-07-14 Thread Stefan Hajnoczi
On Wed, Jul 14, 2021 at 11:36:58AM +0200, Cornelia Huck wrote: > On Wed, Jul 14 2021, Stefan Hajnoczi wrote: > > > On Wed, May 05, 2021 at 12:37:26PM -0700, Enrico Granata wrote: > >> -- Forwarded message - > >> From: Enrico Granata > >> Date: Wed, May 5, 2021 at 1:37 PM > >>

Re: [PATCH v9 03/17] vdpa: Fix code indentation

2021-07-14 Thread Joe Perches
On Tue, 2021-07-13 at 16:46 +0800, Xie Yongji wrote: > Use tabs to indent the code instead of spaces. There are a lot more of these in this file. $ ./scripts/checkpatch.pl --fix-inplace --strict include/linux/vdpa.h and a little typing gives: --- include/linux/vdpa.h | 50

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-14 Thread Viresh Kumar
On 14-07-21, 07:56, Viresh Kumar wrote: > I agree that even if the device is discoverable at runtime, we should > still have some sort of stuff in DT to distinguish the devices, and > "virtio,deviceDID" sounds good enough for that, considering that we > already do it for USB, etc. > > And I am

Re: [PATCH v9 13/17] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-07-14 Thread Dan Carpenter
On Wed, Jul 14, 2021 at 05:41:54PM +0800, Jason Wang wrote: > > 在 2021/7/14 下午4:05, Dan Carpenter 写道: > > On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote: > > > 在 2021/7/13 下午7:31, Dan Carpenter 写道: > > > > On Tue, Jul 13, 2021 at 04:46:52PM +0800, Xie Yongji wrote: > > > > > @@

Re: [PATCH v9 13/17] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-07-14 Thread Jason Wang
在 2021/7/14 下午4:05, Dan Carpenter 写道: On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote: 在 2021/7/13 下午7:31, Dan Carpenter 写道: On Tue, Jul 13, 2021 at 04:46:52PM +0800, Xie Yongji wrote: @@ -613,37 +618,28 @@ static void vhost_vdpa_unmap(struct vhost_vdpa *v, u64 iova, u64 size)

Re: [RFC v3 21/29] vhost: Add VhostIOVATree

2021-07-14 Thread Jason Wang
在 2021/7/14 下午5:14, Eugenio Perez Martin 写道: On Wed, Jul 14, 2021 at 8:54 AM Eugenio Perez Martin wrote: On Wed, Jul 14, 2021 at 5:04 AM Jason Wang wrote: 在 2021/6/1 下午4:15, Eugenio Perez Martin 写道: On Mon, May 31, 2021 at 11:40 AM Jason Wang wrote: 在 2021/5/20 上午12:28, Eugenio Pérez

Re: [PATCH -next] drm/bochs: Fix missing pci_disable_device() on error in bochs_pci_probe()

2021-07-14 Thread Thomas Zimmermann
Hi Am 14.07.21 um 10:39 schrieb Yang Yingliang: Fix the missing pci_disable_device() before return from bochs_pci_probe() in the error handling case. It's maybe better to replace pci_enable_device() with pcim_enable_device(), [1] so that the release happens automatically. Does this work?

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-14 Thread Jason Wang
在 2021/7/14 下午2:49, Yongji Xie 写道: On Wed, Jul 14, 2021 at 1:45 PM Jason Wang wrote: 在 2021/7/13 下午4:46, Xie Yongji 写道: This VDUSE driver enables implementing software-emulated vDPA devices in userspace. The vDPA device is created by ioctl(VDUSE_CREATE_DEV) on /dev/vduse/control. Then a

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-14 Thread Jason Wang
在 2021/7/14 下午2:47, Greg KH 写道: On Wed, Jul 14, 2021 at 02:02:50PM +0800, Jason Wang wrote: 在 2021/7/14 下午1:54, Michael S. Tsirkin 写道: On Wed, Jul 14, 2021 at 01:45:39PM +0800, Jason Wang wrote: +static int vduse_dev_msg_sync(struct vduse_dev *dev, + struct

Re: [PATCH v4 5/5] bus: Make remove callback return void

2021-07-14 Thread Geert Uytterhoeven
On Tue, Jul 13, 2021 at 9:35 PM Uwe Kleine-König wrote: > The driver core ignores the return value of this callback because there > is only little it can do when a device disappears. > > This is the final bit of a long lasting cleanup quest where several > buses were converted to also return void

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

2021-07-14 Thread Jie Deng
On 2021/7/13 23:38, Michael S. Tsirkin wrote: I think we should tweak this such that we add multiple buffers but only make them visible to host after all add commands were successful. With split this is possible by deffering avail idx update, with packed by deferring update of the avail bit in

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-14 Thread Jean-Philippe Brucker
On Tue, Jul 13, 2021 at 10:34:03PM +0200, Arnd Bergmann wrote: > > > Is it going to be a problem if two devices in kernel use the same > > > of_node ? > > > > There shouldn't be. We have nodes be multiple providers (e.g clocks > > and resets) already. > > I think this would be a little different,

Re: [PATCH v9 13/17] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-07-14 Thread Dan Carpenter
On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote: > > 在 2021/7/13 下午7:31, Dan Carpenter 写道: > > On Tue, Jul 13, 2021 at 04:46:52PM +0800, Xie Yongji wrote: > > > @@ -613,37 +618,28 @@ static void vhost_vdpa_unmap(struct vhost_vdpa *v, > > > u64 iova, u64 size) > > > } > > >

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-14 Thread Greg KH
On Wed, Jul 14, 2021 at 02:02:50PM +0800, Jason Wang wrote: > > 在 2021/7/14 下午1:54, Michael S. Tsirkin 写道: > > On Wed, Jul 14, 2021 at 01:45:39PM +0800, Jason Wang wrote: > > > > +static int vduse_dev_msg_sync(struct vduse_dev *dev, > > > > + struct vduse_dev_msg *msg)

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-14 Thread Jason Wang
在 2021/7/14 下午1:54, Michael S. Tsirkin 写道: On Wed, Jul 14, 2021 at 01:45:39PM +0800, Jason Wang wrote: +static int vduse_dev_msg_sync(struct vduse_dev *dev, + struct vduse_dev_msg *msg) +{ + int ret; + + init_waitqueue_head(>waitq); +