Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5676307rwd; Mon, 5 Jun 2023 07:08:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4TMVxdJeVTebH/YMEQ8uv+INBxAkDsxLluyaMrrwngO6MmgXq1gYzBkJmZSK6EPb/qem5d X-Received: by 2002:a05:6a21:33a0:b0:10b:b5cc:6348 with SMTP id yy32-20020a056a2133a000b0010bb5cc6348mr2432471pzb.20.1685974091259; Mon, 05 Jun 2023 07:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685974091; cv=none; d=google.com; s=arc-20160816; b=nbqT77gvArK05dDWs3/CrVcDXpoON+tkPEXkPSLnW1bLdRQ/BX+9cOIu0tStlUH8g6 4IHiOkRB/bm2G8jWY/aURBuENnHARtgpQeg3WX/RJiOmRLu/FsqqCYLDe3j9GR3gRZ7m w3Yt3syoAupYnCoKa5XQLnX0nFhd+yltiq1eMw5LkgsYcoiE1Z2LJOCU18kJWrDZyG5i GKkpDeInqpAi4sVTKASE4o0v3QkJMOn1PHg2wR+8YmvxD/Lsxl+e+eIlaAlJXka66ONO /hdyLTdrZwgZp6KTXxUI6cV/VPQKLXsE+DU6wEsFoSC9fUpvohb79noqv9W9V2oQ75KV J2JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jb5+j0WuGaWQLAokH8FJzOfd9IpoIc69UMNApn2Um/Q=; b=cB51ANHUNLUhnu17tUEno1Km5YzpT5036jTRONYArYEGiOkaKTEhEhLWCRxn2fabjv cMqMycv+SzXpP+BjHBRI2XoIe5teo5SJs4CyqK8udInu588PwbRnAHckW4Y5RMLWQUFI ACrs/iiIQuxsL2JWFAAeZ1ihiBw8IKaY3OI4DhGeyW/XarV2Yem1yMpVB/BGHaHNL2Zg 09kpdwH5vdTt77XWL5/QLo7/D7k45MgriPA5iJ4BpWeYHiX8kB96SO6SVoq8i/VjT7Ih 7xvOJyhAr/+0rPRAWrvXlsbzd1Gw7+xgU7UjxE6+S8c8RzJj/0xEFAc6Mq1gmlh1d6YP K7cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dxfh8soU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a63b510000000b00534e68cc8f5si5518522pge.270.2023.06.05.07.07.55; Mon, 05 Jun 2023 07:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dxfh8soU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234217AbjFENzy (ORCPT + 99 others); Mon, 5 Jun 2023 09:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234230AbjFENzu (ORCPT ); Mon, 5 Jun 2023 09:55:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4AD09C for ; Mon, 5 Jun 2023 06:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685973304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jb5+j0WuGaWQLAokH8FJzOfd9IpoIc69UMNApn2Um/Q=; b=Dxfh8soU2MojWuonyjetGUN6NDhxhGjPNIx541Csp9cytow+8jMV4M1KsgpNbfIsppxZye fomarvyTa2/rJTiYf/5DOGjBv6+fpVUJd0PM9JlatWMcpvOBk99dv7q1JvSZHpss6J16+5 +lJZtqzBXZUUP47rHKl/e++pVBY8D5A= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-399-MoW14sriNYSFA0LuSKEbuQ-1; Mon, 05 Jun 2023 09:55:02 -0400 X-MC-Unique: MoW14sriNYSFA0LuSKEbuQ-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-30b590d5931so2195970f8f.2 for ; Mon, 05 Jun 2023 06:55:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685973302; x=1688565302; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jb5+j0WuGaWQLAokH8FJzOfd9IpoIc69UMNApn2Um/Q=; b=fVxnd54dUfAaEdnUtynlbGv3DtWHBJQeQTN/nbmhuIxN4dY+v1ppaaH6JTzb2GZVF/ 7ktzRm/6Dt1OtmpHMzzTueCkgLHZKifcI2XuoUTJs/jhR1EKsyaBxUDMkryDxDsNEXtK r5ur5PmTXYFJJY/IaKCPpj9QvhYxF+9NcbKXAmX584NSXYdxLWYGiHlG1Yf0X4dI6nvi 85vOPk0LGxCr5bsAp0+zaoMNuQw2TM1nq2LRiXv+XN5Wvlqhza2/NK77PqOqsMhUx3e8 zMwBtlyjEhlf+/4VaJAWMk4AXj2vbpGfqEbVU9I8ky+u+BmnfGeeZxkAPYgr1Z/wxWnU XdpQ== X-Gm-Message-State: AC+VfDxvDojDUGKRDzmws8ytZtU6IrGKyTz8S3+rvLLVcWd+6C/HmYQC u0O/Shf7ID+7i4ILH05Zv/H+QxVVHhpIvVnxgztlY6XIvYgDvj3J6OSRoNH4aURUYEJlKqHKgqo dOk7JdZG+nRWiPAxY08rvVZHL X-Received: by 2002:a5d:6203:0:b0:309:a4e:52d3 with SMTP id y3-20020a5d6203000000b003090a4e52d3mr5095730wru.5.1685973301861; Mon, 05 Jun 2023 06:55:01 -0700 (PDT) X-Received: by 2002:a5d:6203:0:b0:309:a4e:52d3 with SMTP id y3-20020a5d6203000000b003090a4e52d3mr5095714wru.5.1685973301499; Mon, 05 Jun 2023 06:55:01 -0700 (PDT) Received: from redhat.com ([2.55.41.2]) by smtp.gmail.com with ESMTPSA id t18-20020a05600001d200b0030ae09c5efdsm9932198wrx.42.2023.06.05.06.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 06:55:00 -0700 (PDT) Date: Mon, 5 Jun 2023 09:54:57 -0400 From: "Michael S. Tsirkin" To: Stefano Garzarella Cc: Shannon Nelson , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, Jason Wang , Eugenio =?iso-8859-1?Q?P=E9rez?= , Tiwei Bie , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature Message-ID: <20230605095404-mutt-send-email-mst@kernel.org> References: <20230605110644.151211-1-sgarzare@redhat.com> <20230605084104-mutt-send-email-mst@kernel.org> <24fjdwp44hovz3d3qkzftmvjie45er3g3boac7aezpvzbwvuol@lmo47ydvnqau> <20230605085840-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2023 at 02:54:20PM +0200, Stefano Garzarella wrote: > > > On Mon, Jun 05, 2023 at 08:41:54AM -0400, Michael S. Tsirkin wrote: > > > > On Mon, Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote: > > > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) > > > > > don't support packed virtqueue well yet, so let's filter the > > > > > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features(). > > > > > > > > > > This way, even if the device supports it, we don't risk it being > > > > > negotiated, then the VMM is unable to set the vring state properly. > > > > > > > > > > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") > > > > > Cc: stable@vger.kernel.org > > > > > Signed-off-by: Stefano Garzarella > > > > > --- > > > > > > > > > > Notes: > > > > > This patch should be applied before the "[PATCH v2 0/3] vhost_vdpa: > > > > > better PACKED support" series [1] and backported in stable branches. > > > > > > > > > > We can revert it when we are sure that everything is working with > > > > > packed virtqueues. > > > > > > > > > > Thanks, > > > > > Stefano > > > > > > > > > > [1] https://lore.kernel.org/virtualization/20230424225031.18947-1-shannon.nelson@amd.com/ > > > > > > > > I'm a bit lost here. So why am I merging "better PACKED support" then? > > > > > > To really support packed virtqueue with vhost-vdpa, at that point we would > > > also have to revert this patch. > > > > > > I wasn't sure if you wanted to queue the series for this merge window. > > > In that case do you think it is better to send this patch only for stable > > > branches? > > > > Does this patch make them a NOP? > > > > > > Yep, after applying the "better PACKED support" series and being > > > sure that > > > the IOCTLs of vhost-vdpa support packed virtqueue, we should revert this > > > patch. > > > > > > Let me know if you prefer a different approach. > > > > > > I'm concerned that QEMU uses vhost-vdpa IOCTLs thinking that the kernel > > > interprets them the right way, when it does not. > > > > > > Thanks, > > > Stefano > > > > > > > If this fixes a bug can you add Fixes tags to each of them? Then it's ok > > to merge in this window. Probably easier than the elaborate > > mask/unmask dance. > > CCing Shannon (the original author of the "better PACKED support" > series). > > IIUC Shannon is going to send a v3 of that series to fix the > documentation, so Shannon can you also add the Fixes tags? > > Thanks, > Stefano Well this is in my tree already. Just reply with Fixes: <> to each and I will add these tags. If I start dropping and rebasing this won't make it in this window. -- MST