Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6223369rwd; Mon, 5 Jun 2023 15:11:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5x/QDC6/3uAUAmx8jY+i8NOx7b0Ouie4VC32yFxpQr5CL3lu/B7wHjupC77mJvJ0icln2A X-Received: by 2002:a17:902:dacc:b0:1ac:8837:de9 with SMTP id q12-20020a170902dacc00b001ac88370de9mr276292plx.3.1686003106804; Mon, 05 Jun 2023 15:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686003106; cv=none; d=google.com; s=arc-20160816; b=dxTGeV9lDOGrQmr1re0gpMZ0QLLoppzaQ+GV9ceYJuF8qj72rv/Anyswtsi+R039oL IHsyPPDEVw9rpVWRrIvspb+EeugLGgTekKkFiLi8qr7vLNDPtO+uWmygV+3/y5DKn3PN /y23675Taq1fVGmuz2RjdVqkWit8pxWRSUB+ovfq6V3XYbLEOG4fBne88kQQjSUn0R5X QvzJvYBW+5kPVFl40N4EfE0n1aCewPt4C8eaZfMePoh6evfPAHOzDpjUZu08OnbjxcrY cAryQd+bAXdohb0terHAOPSoN6SLAmuh3TkK6iUQL8Q54xi5FX/5sfojX+0nSpQ3VuY5 DuVQ== 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=WpKIMI7QM/wVRTxo2f7IQpPSM5zVOF2jBBbDgfwLd/0=; b=tRmBc7qEmC6XH1cKqCfzs71zGKr0eYrlq9KJxHh5hYuKDTNotDnD5RkBll4Jm4ymtn hxU39lNPQnQ6XvICS+owyP7y9waJx0HHP0+CzZTw3G6bCIBPKVJQU7swrGZS1a9lviU1 fdtdFYT8ibt01nU3WIfz9E+n+X0A+tg1hzb4cXa7zviIwmGah9vdPxbs16RZAHRWktRH no4XsciGA60MJcrittcAmyao/3w/OIPdK6OU8vA3TmEuaNM1gp9MO//hRxZoB06iyfwR mKXQZTyIi23CK96Lrz1vrrDeqdW3shJnotvXKYqpi2xjd+vEGcZuMIozBhe5wqs4RWky WCCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NJAMbUDu; 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 d18-20020a170902aa9200b001ab1ba2572csi5897845plr.240.2023.06.05.15.11.32; Mon, 05 Jun 2023 15:11:46 -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=NJAMbUDu; 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 S231432AbjFEVpq (ORCPT + 99 others); Mon, 5 Jun 2023 17:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232896AbjFEVpp (ORCPT ); Mon, 5 Jun 2023 17:45:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E598AF9 for ; Mon, 5 Jun 2023 14:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686001498; 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=WpKIMI7QM/wVRTxo2f7IQpPSM5zVOF2jBBbDgfwLd/0=; b=NJAMbUDu0E0eTeX594qykwp0+c1Lbz+cD119QIRTgfpRVroIKRdBYZLk2SmyLpKDA1/XsB kB16h5JgkSPGDEM2IdOt+WGDV9tTJ2zWWifLWTiavrf55Ai0T+7w6z3EZvf2+SPBUtOJ8S mA8rU0062xR0zAO42ykCuaE1bVvB+n4= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-674-8Qf-zdi1NCew6yy17aZl1A-1; Mon, 05 Jun 2023 17:44:56 -0400 X-MC-Unique: 8Qf-zdi1NCew6yy17aZl1A-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f7005d4a85so23122985e9.1 for ; Mon, 05 Jun 2023 14:44:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686001495; x=1688593495; 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=WpKIMI7QM/wVRTxo2f7IQpPSM5zVOF2jBBbDgfwLd/0=; b=Y9P/UacDoW8Oy1vCACu/WOTtiVHkyplUHHK/7NQ8Utu8hkRMjGr3vaMnpuFpPyq2rJ yNjmxdw8ile/TzYvUoMuCV2Awec5xd2e0u1XexNPyIzU6ROKKkpsgbtk8Ggdio7KmrQA E9dTObk1IiAn3/gOTx1fFITLoKLllOUmOd7BTNjnC9jTdgVTy+Y10eRKRzrNg613KpNt VIJVfql1H3x/NAjIeuHfiGv+9qte5uhHdiqzLLXK67fjaS5JRRITGsHoMAQbQxa5DS6d AlszAp6cFYHmsAzk5E8SaY4BJeCD1a+8Y+//qeHI+jHWZnwhCJRR3P8v1MwIIt78AHFJ RAvw== X-Gm-Message-State: AC+VfDwMg4FzQOybz1+A5dWTifwz2CpllZz1zcXhieozvMImRsl/BE7b sq2wKTapovmb61vSd0A/DWPo7ExdEdRCzXx8yCZL9JBzNaAmxdbOmw+v4D/HmYslcMBeFb9sXJZ ZOrh+8nb2kP0ZcxGdhkAB+tlf X-Received: by 2002:a7b:c40f:0:b0:3f7:5e08:7a04 with SMTP id k15-20020a7bc40f000000b003f75e087a04mr324440wmi.25.1686001495373; Mon, 05 Jun 2023 14:44:55 -0700 (PDT) X-Received: by 2002:a7b:c40f:0:b0:3f7:5e08:7a04 with SMTP id k15-20020a7bc40f000000b003f75e087a04mr324432wmi.25.1686001495049; Mon, 05 Jun 2023 14:44:55 -0700 (PDT) Received: from redhat.com ([2.55.41.2]) by smtp.gmail.com with ESMTPSA id b14-20020a5d40ce000000b002e5ff05765esm10931997wrq.73.2023.06.05.14.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 14:44:54 -0700 (PDT) Date: Mon, 5 Jun 2023 17:44:50 -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: <20230605173958-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> <20230605095404-mutt-send-email-mst@kernel.org> <32ejjuvhvcicv7wjuetkv34qtlpa657n4zlow4eq3fsi2twozk@iqnd2t5tw2an> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32ejjuvhvcicv7wjuetkv34qtlpa657n4zlow4eq3fsi2twozk@iqnd2t5tw2an> 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 04:56:37PM +0200, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > > 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. > > I tried, but it is not easy since we added the support for packed virtqueue > in vdpa and vhost incrementally. > > Initially I was thinking of adding the same tag used here: > > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") > > Then I discovered that vq_state wasn't there, so I was thinking of > > Fixes: 530a5678bc00 ("vdpa: support packed virtqueue for set/get_vq_state()") > > So we would have to backport quite a few patches into the stable branches. > I don't know if it's worth it... > > I still think it is better to disable packed in the stable branches, > otherwise I have to make a list of all the patches we need. > > Any other ideas? > > Thanks, > Stefano OK so. You want me to apply this one now, and fixes in the next kernel? -- MST