Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1020091ybz; Thu, 16 Apr 2020 01:01:34 -0700 (PDT) X-Google-Smtp-Source: APiQypJsNgp+HnD/mESeBXRY+1HToWbvr9THAotEAcxjj8YVo1qxS7CD72bQPNQRWKioIvrZT/NU X-Received: by 2002:a05:6402:1:: with SMTP id d1mr30003916edu.282.1587024094122; Thu, 16 Apr 2020 01:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587024094; cv=none; d=google.com; s=arc-20160816; b=KDpjBtgoIHpnHWhdlKt8SOB8t0E64VGgx0T4LUNPuRbfq8Sie+TIKtDH4DMZwvqg5j KPxEBmy3AsVcyNGx4bMnS0VkQwTBoCfJIE4aZAsWVJ6ton0tKJCELBmeJqMjDqZIV+ri 968Ll1AJ39VfwF2R1duWt28Ct2+arhV3Ak8R8fYnYd9JQbWunI5FR44zvUPtHPHd6E9O nucBe4ufN0N2HVYM/PatX0fzyXPJP3jiTJeSUR38ha/KvZq8MIciHLzfhRx+ua+6NtKR 2J2M9cbZ9Dlnm79aZN6dpMZLvGd/VLfvTQCPftVi9aH4aHG/DXrB/yar99Jb4rAj81lB IeZw== 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=NIXtCxLH9qE2Xr1d3NAPwfOyt7PzhZHgvlWtNr1RJhc=; b=r+5mEkMDMicKDbE2rzmLXjiy36d4JtnhKMZyW7mnVFUXJvv1AUzfvtLUXytdQPhJn/ oJDSs/Gie4hdsBJQ0iDKByvriqEmSzqO1KYYCHxyQoRKCxbvEdLznQ8xKKrz1uEEsBo/ +I5jlE43cH/5HOydgUhXy4I/Pmo0VyG3gaD24d0D6TV8xdb8khz41R/5hEZxPFQl1+cO sN7TpatFoyP30dcL+6BcCKrUvHmt4ld/c4fsWjG5BTuR7fU39kIbtIcxsM5A5zRd38lh yCgakOEBhbL0xhLSVf3swLrJnm7H8VvYxZlhKWoFt0VK8NsEurpN2TRWlmlBjW9vb1Jc ZJ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=d3JE1EZv; 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 cx17si7701890edb.383.2020.04.16.01.01.10; Thu, 16 Apr 2020 01:01:34 -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=d3JE1EZv; 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 S2440796AbgDPH5k (ORCPT + 99 others); Thu, 16 Apr 2020 03:57:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:51606 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2440769AbgDPH5E (ORCPT ); Thu, 16 Apr 2020 03:57:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587023823; 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=NIXtCxLH9qE2Xr1d3NAPwfOyt7PzhZHgvlWtNr1RJhc=; b=d3JE1EZvYQGzk0bHCiofiQ/IQWQOjHHGd2OOPSShJr2Yq4j0hD5AcvvFivASUR8T5UQjrX Aptb1Z/k1b8eqFvHDg7389PbPHA901zZI/zH3TkHFjDHa6l5gMBtGRQcZBYdzB7HK4jVoh 63L6tAp4WOmlR0DKsmecY8+I/6EdoF8= 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-268-VibkYPSGNAO5AKaTj77VSw-1; Thu, 16 Apr 2020 03:56:59 -0400 X-MC-Unique: VibkYPSGNAO5AKaTj77VSw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 17F23800D5C; Thu, 16 Apr 2020 07:56:58 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id B28567E7C5; Thu, 16 Apr 2020 07:56:55 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: Stephen Rothwell , "virtualization@lists.linux-foundation.org" , Christian Borntraeger , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Linux Next Mailing List , kvm list , Cornelia Huck , Halil Pasic , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 2/8] vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl Date: Thu, 16 Apr 2020 09:56:37 +0200 Message-Id: <20200416075643.27330-3-eperezma@redhat.com> In-Reply-To: <20200416075643.27330-1-eperezma@redhat.com> References: <20200416075643.27330-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: ("af3756cfed9a 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