Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 01:43:36PM +0800, Zhu, Lingshan wrote: > > > On 9/23/2022 1:32 PM, Michael S. Tsirkin wrote: > > On Fri, Sep 23, 2022 at 11:21:41AM +0800, Zhu, Lingshan wrote: > > > > > > On 9/23/2022 9:03 AM, Angus Chen wrote: > > > > The queuepair should be divided by 2 and > > > > it

Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 11:21:41AM +0800, Zhu, Lingshan wrote: > > > On 9/23/2022 9:03 AM, Angus Chen wrote: > > The queuepair should be divided by 2 and > > it should not be hw->nr_vring when multi-queue feature was enabled > This is not about MQ, even no MQ, there are still space in the cap sto

Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 09:03:56AM +0800, Angus Chen wrote: > The queuepair should be divided by 2 and > it should not be hw->nr_vring when multi-queue feature was enabled > > Fixes: 2ddae773c93b ("vDPA/ifcvf: detect and use the onboard number of queues > directly") > > changes in v2: > - ad

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 06:31:32PM +0800, Zhu, Lingshan wrote: > > > On 9/22/2022 6:17 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > > > > > > On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > > > > On Thu, Sep 22, 2022 at 08:55:26AM +, An

Re: 答复: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:52:05AM +, Angus Chen wrote: > > > > On 9/22/2022 6:17 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > >> > >> On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > >>> On Thu, Sep 22, 2022 at 08:55:26AM +, Angus C

Re: [PATCH v1] vdpa/ifcvf: avoid waste ioremap area of vdpa hot migration

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 12:22 PM Zhu, Lingshan wrote: > > > > On 9/23/2022 12:18 PM, Jason Wang wrote: > > On Fri, Sep 23, 2022 at 12:15 PM Zhu, Lingshan > > wrote: > >> > >> > >> On 9/23/2022 12:09 PM, Jason Wang wrote: > >>> On Fri, Sep 23, 2022 at 11:53 AM Angus Chen > >>> wrote: > The

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Jason Wang
On Thu, Sep 22, 2022 at 1:14 PM Eli Cohen wrote: > > > From: Jason Wang > > Sent: Thursday, 22 September 2022 5:43 > > To: m...@redhat.com; jasow...@redhat.com > > Cc: Eli Cohen ; si-wei@oracle.com; Parav Pandit > > ; wuzongy...@linux.alibaba.com; > > virtualization@lists.linux-foundation.org

Re: [PATCH v1] vdpa/ifcvf: avoid waste ioremap area of vdpa hot migration

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 12:15 PM Zhu, Lingshan wrote: > > > > On 9/23/2022 12:09 PM, Jason Wang wrote: > > On Fri, Sep 23, 2022 at 11:53 AM Angus Chen > > wrote: > >> The array capacity should be queuepair, > > If this is true, we need a better name for the ifcvf_vring_lm_cfg structure. > Not tr

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Jason Wang
On Thu, Sep 22, 2022 at 5:12 PM Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 08:01:23AM +, Eli Cohen wrote: > > > From: Michael S. Tsirkin > > > Sent: Thursday, 22 September 2022 10:53 > > > To: Eli Cohen > > > Cc: Jason Wang ; si-wei@oracle.com; Parav > > > Pandit ; wuzongy...@

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Jason Wang
On Thu, Sep 22, 2022 at 7:00 PM Angus Chen wrote: > > The queuepair should be divided by 2 > It should not be hw->nr_vring when multi-queue feature was enabled > fix commit 2ddae773c93b ("detect and use the onboard number ") > > Signed-off-by: Angus Chen Fixed tags should be placed above SOB. P

Re: [PATCH v1] vdpa/ifcvf: avoid waste ioremap area of vdpa hot migration

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:53 AM Angus Chen wrote: > > The array capacity should be queuepair, If this is true, we need a better name for the ifcvf_vring_lm_cfg structure. Thanks > and the queuepairs should > be half of IFCVF_MAX_QUEUES without control queue, > or should be (IFCVF_MAX_QUEUES+1)

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Jason Wang
On Thu, Sep 22, 2022 at 5:23 PM Stefano Garzarella wrote: > > On Thu, Sep 22, 2022 at 10:43:04AM +0800, Jason Wang wrote: > >This patch implements features provisioning for vdpa_sim_net. > > > >1) validating the provisioned features to be a subset of the parent > > features. > >2) clearing the f

Re: [PATCH] smp/hotplug, x86/vmware: Put offline vCPUs in halt instead of mwait

2022-09-22 Thread Srivatsa S. Bhat
Hi Boris, Thomas, Peter, On 7/21/22 1:44 PM, Srivatsa S. Bhat wrote: > From: Srivatsa S. Bhat (VMware) > > VMware ESXi allows enabling a passthru mwait CPU-idle state in the > guest using the following VMX option: > > monitor_control.mwait_in_guest = "TRUE" > > This lets a vCPU in mwait to r

Re: [PATCH RFC 4/8] fs: Introduce FALLOC_FL_PROVISION

2022-09-22 Thread Brian Foster
On Thu, Sep 22, 2022 at 01:04:33AM -0700, Sarthak Kukreti wrote: > On Wed, Sep 21, 2022 at 8:39 AM Brian Foster wrote: > > > > On Fri, Sep 16, 2022 at 02:02:31PM -0700, Sarthak Kukreti wrote: > > > On Fri, Sep 16, 2022 at 4:56 AM Brian Foster wrote: > > > > > > > > On Thu, Sep 15, 2022 at 09:48:2

Re: [PATCH v3] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Stefan Hajnoczi
On Wed, Sep 21, 2022 at 11:27:29AM +0300, Alvaro Karsz wrote: > Support for the VIRTIO_BLK_F_SECURE_ERASE VirtIO feature. > > A device that offers this feature can receive VIRTIO_BLK_T_SECURE_ERASE > commands. > > A device which supports this feature has the following fields in the > virtio confi

Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 12:57:01PM -0400, Michael S. Tsirkin wrote: > On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote: > > Hi Michael, > > > > Can this patch be merged to the next rc? > > We received two bug reports about this issue and need to fix it. > > > > Regards, > > Suwan Kim > >

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Michael S. Tsirkin
On Tue, Sep 20, 2022 at 02:10:37PM -0400, Stefan Hajnoczi wrote: > On Sun, Sep 18, 2022 at 07:07:34PM +0300, Alvaro Karsz wrote: > > > sounds good. Add a code comment? > > > > I will. > > > > > yes but I now see two places that seem to include this logic. > > > > > > Yes, this is because the s

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Michael S. Tsirkin
On Tue, Sep 20, 2022 at 02:11:40PM -0400, Stefan Hajnoczi wrote: > On Mon, Sep 19, 2022 at 09:09:05PM +0300, Alvaro Karsz wrote: > > Thanks for the reply. > > > > > This can be simplified with min_not_zero(). > > > > Ok, I will do it in the next version. > > > > > It's worth including a comment

Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote: > Hi Michael, > > Can this patch be merged to the next rc? > We received two bug reports about this issue and need to fix it. > > Regards, > Suwan Kim > > > On Wed, Aug 31, 2022 at 9:44 PM Pankaj Raghav wrote: > > > > On Wed, Aug 31, 2

[PATCH v2] dt-bindings: virtio: Convert virtio, pci-iommu to DT schema

2022-09-22 Thread Jean-Philippe Brucker
Convert the binding that describes virtio-pci base IOMMU to DT schema. Change the compatible string to "pci," which is defined by the PCI Bus Binding Signed-off-by: Jean-Philippe Brucker --- v2: Fix example, make compatible a required property v1: https://lore.kernel.org/all/20220916132229.19088

Re: [PATCH] dt-bindings: virtio: Convert virtio,pci-iommu to DT schema

2022-09-22 Thread Jean-Philippe Brucker
On Sun, Sep 18, 2022 at 10:23:06AM +0100, Krzysztof Kozlowski wrote: > > +required: > > Also: compatible > > > + - reg > > + - '#iommu-cells' > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > +pcie0 { > > Node name: pcie > > > +#address-cells = <3>; > > +

Re: [RFC PATCH] iommu/virtio: __viommu_sync_req is no need to return a value

2022-09-22 Thread Jean-Philippe Brucker
Hi Liu, On Thu, Sep 22, 2022 at 07:24:46PM +0800, Liu Song wrote: > From: Liu Song > > In "__viommu_sync_req", 0 is always returned as the only return value, no > return value is needed for this case, and the processes and functions > involved are adjusted accordingly. > > Signed-off-by: Liu So

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
Thanks! Let's see if we get an ack. Minor things for the future (in case a new version will be needed): Subject should include the patch version. Also pls avoid capital letters in the middle of the sentence. E.g. [PATCH v3] vDPA/ifcvf: fix the calculation of queuepair On Thu, Sep 22, 2022 at 0

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 6:15 AM > > It's nitpicking to be frank. v6 arrived while I was traveling and I didn't > notice it. > I see Jason acked that so I guess I will just apply as is. Do you ack v6 too? > Yes. I reviewed it. Gavin added reviewed-by. Th

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > > > On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 08:55:26AM +, Angus Chen wrote: > > > >From 4f65eae86ab15d7abb8bd30401187cb195dfd27b Mon Sep 17 00:00:00 2001 > > > From: "angus.chen" > > > Date:

Re: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:04:53AM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Thursday, September 22, 2022 5:35 AM > > > > On Thu, Sep 01, 2022 at 05:10:38AM +0300, Gavin Li wrote: > > > Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big > > > packets e

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 5:27 AM > > > > > > And I'd like commit log to include results of perf testing > > > - with indirect feature on > > Which device do you suggest using for this test? > > AFAIK most devices support INDIRECT, e.g. don't nvidia cards

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 5:35 AM > > On Thu, Sep 01, 2022 at 05:10:38AM +0300, Gavin Li wrote: > > Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big > > packets even when GUEST_* offloads are not present on the device. > > However, if gu

Re: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 01, 2022 at 05:10:38AM +0300, Gavin Li wrote: > Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big > packets even when GUEST_* offloads are not present on the device. > However, if guest GSO is not supported, it would be sufficient to > allocate segments to cover just

Re: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 07:51:38PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Wednesday, September 7, 2022 3:36 PM > > > > On Wed, Sep 07, 2022 at 07:27:16PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > > Sent: Wednesday, September 7, 2022 3:2

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Stefano Garzarella
On Thu, Sep 22, 2022 at 10:43:04AM +0800, Jason Wang wrote: This patch implements features provisioning for vdpa_sim_net. 1) validating the provisioned features to be a subset of the parent features. 2) clearing the features that is not wanted by the userspace For example: # vdpa mgmtdev sho

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:10:37AM +0200, Paolo Abeni wrote: > On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote: > > On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > > > hi Michael > > > > > > in virtio-net.c > > >     /* Parameters for control virtqueue, if any */ > > >     if

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Michael S. Tsirkin
On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > hi Michael > > in virtio-net.c >     /* Parameters for control virtqueue, if any */ >     if (vi->has_cvq) { >         callbacks[total_vqs - 1] = NULL; >         names[total_vqs - 1] = "control"; >     } > > I think the Author who write the

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 08:01:23AM +, Eli Cohen wrote: > > From: Michael S. Tsirkin > > Sent: Thursday, 22 September 2022 10:53 > > To: Eli Cohen > > Cc: Jason Wang ; si-wei@oracle.com; Parav > > Pandit ; wuzongy...@linux.alibaba.com; > > virtualization@lists.linux-foundation.org; linux-k

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Paolo Abeni
On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote: > On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > > hi Michael > > > > in virtio-net.c > >     /* Parameters for control virtqueue, if any */ > >     if (vi->has_cvq) { > >         callbacks[total_vqs - 1] = NULL; > >         na

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 08:55:26AM +, Angus Chen wrote: > >From 4f65eae86ab15d7abb8bd30401187cb195dfd27b Mon Sep 17 00:00:00 2001 > From: "angus.chen" > Date: Thu, 22 Sep 2022 14:47:28 +0800 > Subject: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair > > The queuepair should b

RE: [PATCH v4 5/6] iommu: Use EINVAL for incompatible device/domain in ->attach_dev

2022-09-22 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, September 21, 2022 4:24 PM > > Following the new rules in include/linux/iommu.h kdocs, update all drivers > ->attach_dev callback functions to return EINVAL in the failure paths that > are related to domain incompatibility. > > Also, drop adjacent error pr

RE: [PATCH v4 3/6] iommu: Add return value rules to attach_dev op and APIs

2022-09-22 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, September 21, 2022 4:23 PM > > > +/** > + * iommu_attach_device - Attach a device to an IOMMU domain > + * @domain: IOMMU domain to attach > + * @dev: Device that will be attached > + * > + * Returns 0 on success and error code on failure > + * > + * Note

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 07:47:40AM +, Eli Cohen wrote: > > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Thursday, 22 September 2022 10:30 > > To: Eli Cohen > > Cc: Jason Wang ; si-wei@oracle.com; Parav > > Pandit ; wuzongy...@linux.alibaba.com; > > virtualizatio

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 05:13:59AM +, Eli Cohen wrote: > > From: Jason Wang > > Sent: Thursday, 22 September 2022 5:43 > > To: m...@redhat.com; jasow...@redhat.com > > Cc: Eli Cohen ; si-wei@oracle.com; Parav Pandit > > ; wuzongy...@linux.alibaba.com; > > virtualization@lists.linux-foundat