Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1552097ybz; Sat, 18 Apr 2020 03:27:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJjiBcnM+L2gT46LUE2cIRFw9eq+G894eXMZRLv3126Bh0EsDv6bgaytLwpVDCWOWHRHZsG X-Received: by 2002:a17:906:4356:: with SMTP id z22mr6941966ejm.334.1587205652686; Sat, 18 Apr 2020 03:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587205652; cv=none; d=google.com; s=arc-20160816; b=Zlme73f9LZVq5HPPn++Ip4KdW8dDv7w6q2lBYdBth4tlyx1hzYRlLXwouV4iyhCaYx DIuaWfnwJTjtwHjcFe2mYz+mNnXx8bZy5sRv2NobHV+pP2SO6dlusvJwp/vQhLaWC/fX 3iY+rlEu6HELRPhYly2b2EyBO681N9OtIiBQ7FFSk6DNwgNi7Sj4U3Jg030sNi9QtMRB 12k+IwRn2S85xvLjUBqt0bIhTKCdfVR89AtKa/kjlzo9hHWIvsdlPuNgvMgK+dTT285G Uz0WOENXilysyDi/VLy8xV2vdr+64jJNEb6h/hKD7gIkRTQ/SITzEpb3QG1nPUp8Oyfy 8Csw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vwWNaCCFGnInUmv5tpeoOpCpadYnvdzVMsJO2bg1Nbc=; b=sIjIG176GBAnVFBWJqsv7FNyoVfnsfaW9i+S4VxSF33PxlyRYVYiYnOG1HC7znTwHD +lGBGrx04ICFIxaGtQE0HG6lbNeRZg4sKKseCWLJnIZJMxV1smDguZeZaKxWo8GqAN4z Qf2R4vPKgK0zWWj9nOvqOz2aRmtsTPoevKeCpnupGolWM33TIftbkUAflHZHmn5sd7J8 VLrcSdNEfHxl5b9dac6w6HYeBdTe3blKvXzbUDzsBYdljGtxnp+UjvdhYjqTeVWIuKEL +P3a2w3MAgd069GDUYKtVyR5Tol3RHvxRsCg0UJbl52jN9VLtpkQK+fjiTnXcFLSAHkH Np5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CTKtiEtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de14si3913882edb.283.2020.04.18.03.27.10; Sat, 18 Apr 2020 03:27:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CTKtiEtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1725879AbgDRKZG (ORCPT + 99 others); Sat, 18 Apr 2020 06:25:06 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34484 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725953AbgDRKWj (ORCPT ); Sat, 18 Apr 2020 06:22:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587205357; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vwWNaCCFGnInUmv5tpeoOpCpadYnvdzVMsJO2bg1Nbc=; b=CTKtiEtIouzPa7qnoAsP3LlRzbTbaNdvxM1/IKEDF0hhQb36KMc/+9lU0F8plsJ8gAYflw v8SI6mBSWBxDQBlFOBH+8k5jigRFHkT9bF/pYxsKxzqT7lJJV0hLDpAsukJZpI30rNGdAy wIpuE1TF1Xxa744fpDSyu08VNy3hOvQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-5AHjK9raMU2HXAvB4v78SQ-1; Sat, 18 Apr 2020 06:22:30 -0400 X-MC-Unique: 5AHjK9raMU2HXAvB4v78SQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 70BEB8018A3; Sat, 18 Apr 2020 10:22:29 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-112-94.ams2.redhat.com [10.36.112.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 137831001DC2; Sat, 18 Apr 2020 10:22:26 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Halil Pasic , Cornelia Huck , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Christian Borntraeger , kvm list , Stephen Rothwell , Linux Next Mailing List Subject: [PATCH v3 1/8] vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl Date: Sat, 18 Apr 2020 12:22:10 +0200 Message-Id: <20200418102217.32327-2-eperezma@redhat.com> In-Reply-To: <20200418102217.32327-1-eperezma@redhat.com> References: <20200418102217.32327-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org They are cleaned in vhost_vq_set_backend, which can be called with an active backend. To set and remove backends already clean batched descriptors, so to do it here is completely redundant. Fixes: ("e7539c20a4a6 vhost: batching fetches") Signed-off-by: Eugenio P=C3=A9rez --- drivers/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 0395229486a9..882d0df57e24 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1579,7 +1579,6 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigne= d int ioctl, void __user *arg vq->last_avail_idx =3D s.num; /* Forget the cached index value. */ vq->avail_idx =3D vq->last_avail_idx; - vq->ndescs =3D vq->first_desc =3D 0; break; case VHOST_GET_VRING_BASE: s.index =3D idx; --=20 2.18.1