Re: [PATCH] virtio: console: remove check for cpkt value when nominating console port

2022-11-28 Thread Andy Bui
On Wed, Nov 23, 2022 at 11:46:54AM +0100, Amit Shah wrote: > I think the backward compat concern I have here is that a really old > hypervisor - one that doesn't do virtio-serial-ports yet, will not have > any other messages sent from the host, but the original console setup > messages. > > The is

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-28 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 04:28:54AM +, Chaitanya Kulkarni wrote: > On 11/28/22 11:07, Stefan Hajnoczi wrote: > > On Fri, Nov 25, 2022 at 12:09:45AM +0200, Alvaro Karsz wrote: > >>> I suggest defining a separate UAPI struct for this ioctl. > >> > >> Sounds fine to me. > >> I could use the followi

[PATCH V3] vdpa: allow provisioning device features

2022-11-28 Thread Jason Wang
This patch allows device features to be provisioned via vdpa. This will be useful for preserving migration compatibility between source and destination: # vdpa dev add name dev1 mgmtdev pci/:02:00.0 device_features 0x30002 # vdpa dev config show dev1 # dev1: mac 52:54:00:12:34:56 link up l

Re: [PATCH 0/4] Fix probe failed when modprobe modules

2022-11-28 Thread Jason Wang
On Mon, Nov 28, 2022 at 6:14 PM Michael S. Tsirkin wrote: > > On Mon, Nov 28, 2022 at 10:10:01AM +0800, Li Zetao wrote: > > This patchset fixes similar issue, the root cause of the > > problem is that the virtqueues are not stopped on error > > handling path. > > I've been thinking about this. > A

Re: [PATCH v3] vhost_vdpa: fix the crash in unmap a large memory

2022-11-28 Thread Jason Wang
On Fri, Nov 25, 2022 at 3:38 PM Cindy Lu wrote: > > / and > > > On Fri, 25 Nov 2022 at 15:17, Jason Wang wrote: > > > > On Fri, Nov 25, 2022 at 10:31 AM Cindy Lu wrote: > > > > > > While testing in vIOMMU, sometimes guest will unmap very large memory, > > > which will cause the crash. To fix thi

Re: [PATCH v3] vduse: Validate vq_num in vduse_validate_config()

2022-11-28 Thread Jason Wang
On Mon, Nov 28, 2022 at 11:57 PM Harshit Mogalapalli wrote: > > Add a limit to 'config->vq_num' which is user controlled data which > comes from an vduse_ioctl to prevent large memory allocations. > > Micheal says - This limit is somewhat arbitrary. > However, currently virtio pci and ccw are lim

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-28 Thread Jason Wang
On Mon, Nov 28, 2022 at 10:36 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > 在 2022/11/28 22:17, Michael S. Tsirkin 写道: > > On Mon, Nov 28, 2022 at 09:20:21PM +0800, Longpeng (Mike, Cloud > > Infrastructure Service Product Dept.) wrote: > >> > >> > >> 在 2022/11/28 2

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-28 Thread Jason Wang
On Mon, Nov 28, 2022 at 10:17 PM Michael S. Tsirkin wrote: > > On Mon, Nov 28, 2022 at 09:20:21PM +0800, Longpeng (Mike, Cloud > Infrastructure Service Product Dept.) wrote: > > > > > > 在 2022/11/28 20:20, Michael S. Tsirkin 写道: > > > On Mon, Nov 28, 2022 at 07:59:33PM +0800, Longpeng (Mike, Clou

RE: [RFC PATCH net-next 06/19] pds_core: add FW update feature to devlink

2022-11-28 Thread Keller, Jacob E
> -Original Message- > From: Shannon Nelson > Sent: Monday, November 28, 2022 3:46 PM > To: Jakub Kicinski > Cc: Shannon Nelson ; net...@vger.kernel.org; > da...@davemloft.net; m...@redhat.com; jasow...@redhat.com; > virtualization@lists.linux-foundation.org; driv...@pensando.io; Kelle

RE: [RFC PATCH net-next 06/19] pds_core: add FW update feature to devlink

2022-11-28 Thread Keller, Jacob E
> -Original Message- > From: Jakub Kicinski > Sent: Monday, November 28, 2022 3:33 PM > To: Shannon Nelson > Cc: Shannon Nelson ; net...@vger.kernel.org; > da...@davemloft.net; m...@redhat.com; jasow...@redhat.com; > virtualization@lists.linux-foundation.org; driv...@pensando.io; Kelle

Re: [RFC PATCH net-next 10/19] pds_core: devlink params for enabling VIF support

2022-11-28 Thread Andrew Lunn
> > I know we are running short of short acronyms and we have to recycle > > them, rfc5513 and all, so could you actually use > > DEVLINK_PARAM_GENERIC_ID_ENABLE_LIST_MANAGER making it clear your > > Smart NIC is running majordomo and will soon replace vger. > > > >Andrew > > Oh, hush, so

Re: [RFC PATCH net-next 10/19] pds_core: devlink params for enabling VIF support

2022-11-28 Thread Andrew Lunn
On Mon, Nov 28, 2022 at 02:26:26PM -0800, Shannon Nelson wrote: > On 11/28/22 10:29 AM, Jakub Kicinski wrote: > > On Fri, 18 Nov 2022 14:56:47 -0800 Shannon Nelson wrote: > > > + DEVLINK_PARAM_DRIVER(PDSC_DEVLINK_PARAM_ID_LM, > > > + "enable_lm", > > > +

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-28 Thread Michael S. Tsirkin
On Fri, Nov 25, 2022 at 12:09:45AM +0200, Alvaro Karsz wrote: > > I suggest defining a separate UAPI struct for this ioctl. > > Sounds fine to me. > I could use the following struct > > struct virtio_blk_lifetime_ioctl { > u16 pre_eol_info; > u16 device_lifetime_est_typ_a; >

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-28 Thread Stefan Hajnoczi
On Fri, Nov 25, 2022 at 12:09:45AM +0200, Alvaro Karsz wrote: > > I suggest defining a separate UAPI struct for this ioctl. > > Sounds fine to me. > I could use the following struct > > struct virtio_blk_lifetime_ioctl { > u16 pre_eol_info; > u16 device_lifetime_est_typ_a; >

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 09:20:21PM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > 在 2022/11/28 20:20, Michael S. Tsirkin 写道: > > On Mon, Nov 28, 2022 at 07:59:33PM +0800, Longpeng (Mike, Cloud > > Infrastructure Service Product Dept.) wrote: > > > > > > > > >

Re: [PATCH v2] vduse: Validate vq_num in vduse_validate_config()

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 12:13:10PM +0100, Stefano Garzarella wrote: > On Mon, Nov 28, 2022 at 01:58:00PM +0300, Dan Carpenter wrote: > > On Mon, Nov 28, 2022 at 11:53:12AM +0100, Stefano Garzarella wrote: > > > On Mon, Nov 28, 2022 at 12:36:26AM -0800, Harshit Mogalapalli wrote: > > > > Add a limit

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 07:59:33PM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > 在 2022/11/28 18:19, Michael S. Tsirkin 写道: > > On Mon, Nov 28, 2022 at 04:19:30PM +0800, Longpeng (Mike, Cloud > > Infrastructure Service Product Dept.) wrote: > > > > > > > > >

Re: [PATCH v2] vduse: Validate vq_num in vduse_validate_config()

2022-11-28 Thread Stefano Garzarella
On Mon, Nov 28, 2022 at 01:58:00PM +0300, Dan Carpenter wrote: On Mon, Nov 28, 2022 at 11:53:12AM +0100, Stefano Garzarella wrote: On Mon, Nov 28, 2022 at 12:36:26AM -0800, Harshit Mogalapalli wrote: > Add a limit to 'config->vq_num' which is user controlled data which > comes from an vduse_ioct

Re: [PATCH v2] vduse: Validate vq_num in vduse_validate_config()

2022-11-28 Thread Dan Carpenter
On Mon, Nov 28, 2022 at 11:53:12AM +0100, Stefano Garzarella wrote: > On Mon, Nov 28, 2022 at 12:36:26AM -0800, Harshit Mogalapalli wrote: > > Add a limit to 'config->vq_num' which is user controlled data which > > comes from an vduse_ioctl to prevent large memory allocations. > > > > This is foun

Re: [PATCH v2] vduse: Validate vq_num in vduse_validate_config()

2022-11-28 Thread Stefano Garzarella
On Mon, Nov 28, 2022 at 12:36:26AM -0800, Harshit Mogalapalli wrote: Add a limit to 'config->vq_num' which is user controlled data which comes from an vduse_ioctl to prevent large memory allocations. This is found using static analysis with smatch. Suggested-by: Michael S. Tsirkin Signed-off-b

Re: [PATCH v2] vhost_vdpa: fix the crash in unmap a large memory

2022-11-28 Thread Stefano Garzarella
On Fri, Nov 25, 2022 at 10:23:17AM +0800, Cindy Lu wrote: While testing in vIOMMU, sometimes guest will unmap very large memory, which will cause the crash. To fix this,Move the iommu_unmap to vhost_vdpa_pa_unmap/vhost_vdpa_va_unmap and only unmap the memory that saved in iotlb. Call Trace: [ 6

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 04:19:30PM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > 在 2022/11/28 12:05, Jason Wang 写道: > > On Mon, Nov 28, 2022 at 10:56 AM Longpeng(Mike) > > wrote: > > > > > > From: Longpeng > > > > > > Support doorbell mapping for vdpasim de

Re: [PATCH 0/4] Fix probe failed when modprobe modules

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 10:10:01AM +0800, Li Zetao wrote: > This patchset fixes similar issue, the root cause of the > problem is that the virtqueues are not stopped on error > handling path. I've been thinking about this. Almost all drivers are affected. The reason really is that it used to be t

Re: [PATCH 3/4] virtio-input: Fix probe failed when modprobe virtio_input

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 10:10:04AM +0800, Li Zetao wrote: > When doing the following test steps, an error was found: > step 1: modprobe virtio_input succeeded > # modprobe virtio_input <-- OK > > step 2: fault injection in input_allocate_device() > # modprobe -r virtio_input <--

Re: [PATCH 2/4] virtio-mem: Fix probe failed when modprobe virtio_mem

2022-11-28 Thread David Hildenbrand
On 28.11.22 03:10, Li Zetao wrote: When doing the following test steps, an error was found: step 1: modprobe virtio_mem succeeded # modprobe virtio_mem <-- OK step 2: fault injection in virtio_mem_init() # modprobe -r virtio_mem <-- OK # ... CPU: 0 PID: 1837 Co