From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6EDEC77B73 for ; Mon, 5 Jun 2023 13:55:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 311FE820F1; Mon, 5 Jun 2023 13:55:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 311FE820F1 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NtDloFDU X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i5c_hL805W6m; Mon, 5 Jun 2023 13:55:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id AA1C78203B; Mon, 5 Jun 2023 13:55:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AA1C78203B Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7032DC007A; Mon, 5 Jun 2023 13:55:09 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6C7CDC0029 for ; Mon, 5 Jun 2023 13:55:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4523F41721 for ; Mon, 5 Jun 2023 13:55:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4523F41721 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NtDloFDU X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id diM3U-VHtgwx for ; Mon, 5 Jun 2023 13:55:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0A29641615 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0A29641615 for ; Mon, 5 Jun 2023 13:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685973305; 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=NtDloFDUgixowRUbDERLQfkddV+3Owad9tXYPpR4QVlVUIjOzm3kNiT5J5bOPA5vQdi1ue JhNPNBmXteYXxJWtKBzFeRUz4L8cW2SASR5g6W1z9/xp9HqrKcTmPNZEu2iTLz8V1YtJCd JfHFIz6m5JjaL0b7+BYcjd2YYQnt4Xg= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-176-stT_NPqMNFG2MUllhefa0g-1; Mon, 05 Jun 2023 09:55:03 -0400 X-MC-Unique: stT_NPqMNFG2MUllhefa0g-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-30a5d4e5731so2205536f8f.1 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=WQVSGAb3dgwSgC9emXX+G7wdz1trG87BZIP2oPq8WD1x5Sra/2PCGRpOgu4aK4KEPU a/bpc/hVIQ98W/P7MgjuZOWNBbQxwOJKhefFuFAAjWycdjfTggr0JOlHcMxFcxOsLWuw 7SO946Yb2a9I+6gAfJaAtbCTXZYmuWV4SeK27Yk/UJvaNchd++Q5JzpO+tw2Geiru5MY /rRslTNIHItNCVP3AdCDcUZUGsyDXV+XpChEMnrFxACVNk+Y3cT/F/L1SiOfshjC8LM+ Pqcrd98k2vnhoKXaTcQ8FKQqAwyZ7Cpd64pbythhjDMxxJhDZkkVIB5UZVbT3TW+VXHT Q+Ig== X-Gm-Message-State: AC+VfDwVqDlMkR5Nnl3kwqKWlLIxKAA1x0KE/NjHkBXJG3Q0Tiz/ME5e ZhWzc74z+3VCz/cXO9vypJPeh2+yXLDgDscCt8KJF+OBq4G43RtkH8lxw0FLZwIsD2eKtykFyd0 XZ95ViJah7hNvP4i3a/ScSNauc55rW+CfMmuTpad+yQ== X-Received: by 2002:a5d:6203:0:b0:309:a4e:52d3 with SMTP id y3-20020a5d6203000000b003090a4e52d3mr5095733wru.5.1685973301862; Mon, 05 Jun 2023 06:55:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZHD4gDUdlfGTiduMiqY+ojv/UUc0qqNDYq2hzP027LaDqgTMXJjGDzbnCN0fSb2MNMtWn6g== 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 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 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: kvm@vger.kernel.org, Tiwei Bie , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Eugenio =?iso-8859-1?Q?P=E9rez?= X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B79C7EE24 for ; Mon, 5 Jun 2023 13:55:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234222AbjFENzy (ORCPT ); Mon, 5 Jun 2023 09:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234231AbjFENzu (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 D7B1C91 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-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-665--JzdXTuUPFSJfJ6z3xEjoQ-1; Mon, 05 Jun 2023 09:55:03 -0400 X-MC-Unique: -JzdXTuUPFSJfJ6z3xEjoQ-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-30ae42628cfso2203447f8f.3 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=fzxUhEkMRaFHpITY7GaYyg+f/atSfzji+xBp1jajQlNxKrreA3ALsCV2zSiRdKLfAZ H/hRqP14jwpIP9DtB8K33RBIewPEeIe3f/L9FWEWxsyLqfw6KcZMqnL3YvwxJiQR3Ku/ cHT3triEXfee0Bjgx05R0H1gYmDmxmLCdCyBOA6kshwnDsv0IO3ebJMKM9MmOdQFqG+q LsG46Lsh/EUIzeqDwKEoESAG2MoPT2yi6s4BFE7SCjl3UaekrTnivSQTFo950p4QUj0m Mc034J/VnPN7Gl7m2yzZA8kh7HgtpKUp0P4q1rnQFK1S8yFnhN2hhnXOaAUVKUpOa+p6 TqVw== X-Gm-Message-State: AC+VfDyB+fBEMyHAlBdB24QJEIo/gZgyPWtaj5ubcoz9QPeWR24HLWc0 8LCMX3MEt7PtDE6DuS0f22Ye3PZii909b+Y0JmTIJhgsx0gYfa7L9V4CgQMVl8qwRgqe+hHcSiG OPvaIhfdOuuO2 X-Received: by 2002:a5d:6203:0:b0:309:a4e:52d3 with SMTP id y3-20020a5d6203000000b003090a4e52d3mr5095729wru.5.1685973301861; Mon, 05 Jun 2023 06:55:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZHD4gDUdlfGTiduMiqY+ojv/UUc0qqNDYq2hzP027LaDqgTMXJjGDzbnCN0fSb2MNMtWn6g== 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: Precedence: bulk List-ID: X-Mailing-List: kvm@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