Re: [RFC PATCH] virtio: make sure legacy pci device gain 32bit-pfn vq

2021-12-07 Thread Michael S. Tsirkin
On Tue, Dec 07, 2021 at 05:09:56PM +0800, 王贇 wrote: > > > 在 2021/12/7 下午4:13, Michael S. Tsirkin 写道: > > On Tue, Dec 07, 2021 at 03:51:45PM +0800, 王贇 wrote: > > > We observed issues like: > > >virtio-pci :14:00.0: platform bug: legacy virtio-mmio must > > >not be used with RAM above 0

Re: [PATCH 5/7] vdpa: Add support for querying control virtqueue index

2021-12-07 Thread Jason Wang
On Wed, Dec 8, 2021 at 2:07 PM Eli Cohen wrote: > > On Wed, Dec 08, 2021 at 11:25:01AM +0800, Jason Wang wrote: > > On Tue, Dec 7, 2021 at 3:57 PM Eli Cohen wrote: > > > > > > On Fri, Dec 03, 2021 at 10:35:30AM +0800, Jason Wang wrote: > > > > On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > >

Re: [PATCH V5 00/12] vhost: multiple worker support

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 10:51 AM Mike Christie wrote: > > The following patches apply over linus's tree and the user_worker > patchset here: > > https://lore.kernel.org/virtualization/20211129194707.5863-1-michael.chris...@oracle.com/T/#t It looks to me it gets some acks, maybe we need to nudge th

Re: [PATCH 7/7] vhost-test: drop flush after vhost_dev_cleanup

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 10:45 AM Mike Christie wrote: > > The flush after vhost_dev_cleanup is not needed because: > > 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread > so the flush call will just return since the worker has not device. > > 2. It's not needed. The comment a

Re: [PATCH 6/7] vhost-scsi: drop flush after vhost_dev_cleanup

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 10:45 AM Mike Christie wrote: > > The flush after vhost_dev_cleanup is not needed because: > > 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread > so the flush call will just return since the worker has not device. > > 2. It's not needed for the re-que

Re: [PATCH 5/7] vhost_vsock: simplify vhost_vsock_flush()

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 10:45 AM Mike Christie wrote: > > From: Andrey Ryabinin > > vhost_vsock_flush() calls vhost_work_dev_flush(vsock->vqs[i].poll.dev) > before vhost_work_dev_flush(&vsock->dev). This seems pointless > as vsock->vqs[i].poll.dev is the same as &vsock->dev and several flushes > i

Re: [PATCH 1/7] vhost: get rid of vhost_poll_flush() wrapper

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 10:45 AM Mike Christie wrote: > > vhost_poll_flush() is a simple wrapper around vhost_work_dev_flush(). > It gives wrong impression that we are doing some work over vhost_poll, > while in fact it flushes vhost_poll->dev. This "problem" is a byproduct of 7235acdb1144 ("vhost

Re: [PATCH v3] vduse: vduse: check that offsets are within bounds

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 7:49 PM Dan Carpenter wrote: > > In vduse_dev_ioctl(), the "config.offset" comes from the user. There > needs to a check to prevent it being out of bounds. The "config.offset" > and "dev->config_size" variables are both type u32. So if the offset is > out of bounds then t

Re: [PATCH] vdpa: Provide means to read configured features

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 9:03 PM Eli Cohen wrote: > > Hi Jason, > > I noticed the lack of interface to get the currently configured > features. > > Does the below patch make sense to you? If so I can post it along with > a patch that implements the function for all current vdpa drivers. Yes. > > >

Re: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-07 Thread Jason Wang
On Wed, Dec 8, 2021 at 7:16 AM Si-Wei Liu wrote: > > > > On 12/7/2021 12:19 AM, Eli Cohen wrote: > > On Thu, Dec 02, 2021 at 11:28:12PM -0800, Si-Wei Liu wrote: > >> > >> On 12/1/2021 11:57 AM, Eli Cohen wrote: > >>> Check whether the max number of data virtqueue pairs was provided when a > >>> ad

Re: [PATCH 5/7] vdpa: Add support for querying control virtqueue index

2021-12-07 Thread Jason Wang
On Tue, Dec 7, 2021 at 3:57 PM Eli Cohen wrote: > > On Fri, Dec 03, 2021 at 10:35:30AM +0800, Jason Wang wrote: > > On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > > > > > Add netlink attribute and callback function to query the control VQ > > > index of a device. > > > > It's better to expla

Re: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-07 Thread Si-Wei Liu
On 12/7/2021 12:19 AM, Eli Cohen wrote: On Thu, Dec 02, 2021 at 11:28:12PM -0800, Si-Wei Liu wrote: On 12/1/2021 11:57 AM, Eli Cohen wrote: Check whether the max number of data virtqueue pairs was provided when a adding a new device and verify the new value does not exceed device capabiliti

[PATCH v3] vduse: vduse: check that offsets are within bounds

2021-12-07 Thread Dan Carpenter
In vduse_dev_ioctl(), the "config.offset" comes from the user. There needs to a check to prevent it being out of bounds. The "config.offset" and "dev->config_size" variables are both type u32. So if the offset is out of bounds then the "dev->config_size - config.offset" subtraction results in a

Re: [PATCH v2] vduse: vduse: fix memory corruption in vduse_dev_ioctl()

2021-12-07 Thread Dan Carpenter
On Tue, Dec 07, 2021 at 02:21:46PM +0300, Dan Carpenter wrote: > The "config.offset" comes from the user. There needs to a check to > prevent it being out of bounds. The "config.offset" and > "dev->config_size" variables are both type u32. So if the offset if > out of bounds then the "dev->confi

Re: [PATCH v2] iova: Move fast alloc size roundup into alloc_iova_fast()

2021-12-07 Thread Robin Murphy
On 2021-12-07 11:17, John Garry wrote: It really is a property of the IOVA rcache code that we need to alloc a power-of-2 size, so relocate the functionality to resize into alloc_iova_fast(), rather than the callsites. I'd still much prefer to resolve the issue that there shouldn't *be* more t

Re: [PATCH] vduse: fix memory corruption in vduse_dev_ioctl()

2021-12-07 Thread Dan Carpenter
On Tue, Dec 07, 2021 at 07:19:35PM +0800, Yongji Xie wrote: > On Tue, Dec 7, 2021 at 6:46 PM Dan Carpenter wrote: > > > > The "config.offset" comes from the user. There needs to a check to > > prevent it being out of bounds. The "config.offset" and > > "dev->config_size" variables are both type

[PATCH v2] vduse: vduse: fix memory corruption in vduse_dev_ioctl()

2021-12-07 Thread Dan Carpenter
The "config.offset" comes from the user. There needs to a check to prevent it being out of bounds. The "config.offset" and "dev->config_size" variables are both type u32. So if the offset if out of bounds then the "dev->config_size - config.offset" subtraction results in a very high u32 value.

Re: [PATCH] vduse: fix memory corruption in vduse_dev_ioctl()

2021-12-07 Thread Dan Carpenter
On Tue, Dec 07, 2021 at 01:46:14PM +0300, Dan Carpenter wrote: > The "config.offset" comes from the user. There needs to a check to > prevent it being out of bounds. The "config.offset" and > "dev->config_size" variables are both type u32. So if the offset if > out of bounds then the "dev->confi

[PATCH] vduse: fix memory corruption in vduse_dev_ioctl()

2021-12-07 Thread Dan Carpenter
The "config.offset" comes from the user. There needs to a check to prevent it being out of bounds. The "config.offset" and "dev->config_size" variables are both type u32. So if the offset if out of bounds then the "dev->config_size - config.offset" subtraction results in a very high u32 value.

Re: [RFC PATCH] virtio: make sure legacy pci device gain 32bit-pfn vq

2021-12-07 Thread Michael S. Tsirkin
On Tue, Dec 07, 2021 at 05:09:56PM +0800, 王贇 wrote: > > > 在 2021/12/7 下午4:13, Michael S. Tsirkin 写道: > > On Tue, Dec 07, 2021 at 03:51:45PM +0800, 王贇 wrote: > > > We observed issues like: > > >virtio-pci :14:00.0: platform bug: legacy virtio-mmio must > > >not be used with RAM above 0

Re: [PATCH] drm: Return error codes from struct drm_driver.gem_create_object

2021-12-07 Thread Thomas Zimmermann
Hi Am 07.12.21 um 09:55 schrieb Dan Carpenter: I appologize. This thread has been really frustrating. I got mixed up because I recently sent patches for ingenic and vc4. Also we are working against different trees so maybe that is part of the problem? I'm looking at today's linux-next. Your

Re: [PATCH] drm: Return error codes from struct drm_driver.gem_create_object

2021-12-07 Thread Dan Carpenter
I appologize. This thread has been really frustrating. I got mixed up because I recently sent patches for ingenic and vc4. Also we are working against different trees so maybe that is part of the problem? I'm looking at today's linux-next. Your patch has been applied. Yes. You updated all th

Re: [PATCH] drm: Return error codes from struct drm_driver.gem_create_object

2021-12-07 Thread Thomas Zimmermann
Hi Am 06.12.21 um 15:40 schrieb Dan Carpenter: On Mon, Dec 06, 2021 at 12:16:24PM +0100, Thomas Zimmermann wrote: Hi Am 06.12.21 um 11:42 schrieb Dan Carpenter: On Tue, Nov 30, 2021 at 10:52:55AM +0100, Thomas Zimmermann wrote: GEM helper libraries use struct drm_driver.gem_create_object to

Re: [RFC PATCH] virtio: make sure legacy pci device gain 32bit-pfn vq

2021-12-07 Thread Michael S. Tsirkin
On Tue, Dec 07, 2021 at 03:51:45PM +0800, 王贇 wrote: > We observed issues like: > virtio-pci :14:00.0: platform bug: legacy virtio-mmio must > not be used with RAM above 0x4000GB > > when we have a legacy pci device which desired 32bit-pfn vq > but gain 64bit-pfn instead, lead into the fail