From patchwork Sun Mar 29 11:33:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eugenio Perez Martin X-Patchwork-Id: 11463993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BC20913 for ; Sun, 29 Mar 2020 11:34:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A7AC20774 for ; Sun, 29 Mar 2020 11:34:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ps0Qb/Mf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbgC2Ler (ORCPT ); Sun, 29 Mar 2020 07:34:47 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:51825 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728188AbgC2Leq (ORCPT ); Sun, 29 Mar 2020 07:34:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585481685; 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=VZwSHSfoVZBLh2uVqxeFvTZlYVnfU5BIn50vsgPZBrY=; b=Ps0Qb/MfRGA6dEcZ6QSjdIyXovwRN4bvQQ6+XlRZsIg6LLnTVfY3wmtyj5WuURXRX0H+tl mobZulr//sSAyF4ap3/ikde6aiBazIk2lwu0GI1HJo959ypWfZOSleAAvRf+3X+0rHfoJx biLD8BMf2GdjqiG79PsOMSJmUu/Gajg= 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-78-69s3iLlsOYC-Ei4_8RmrFQ-1; Sun, 29 Mar 2020 07:34:43 -0400 X-MC-Unique: 69s3iLlsOYC-Ei4_8RmrFQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01B71477; Sun, 29 Mar 2020 11:34:42 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-112-95.ams2.redhat.com [10.36.112.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66FC85C1B5; Sun, 29 Mar 2020 11:34:38 +0000 (UTC) From: =?utf-8?q?Eugenio_P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: "virtualization@lists.linux-foundation.org" , Halil Pasic , =?utf-8?q?Eugenio_P=C3=A9rez?= , Stephen Rothwell , Linux Next Mailing List , kvm list , Cornelia Huck , Christian Borntraeger , "linux-kernel@vger.kernel.org" Subject: [PATCH 6/6] fixup! vhost: batching fetches Date: Sun, 29 Mar 2020 13:33:59 +0200 Message-Id: <20200329113359.30960-7-eperezma@redhat.com> In-Reply-To: <20200329113359.30960-1-eperezma@redhat.com> References: <20200329113359.30960-1-eperezma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Old code did not take into account the _SET_BASE ioctl. Signed-off-by: Eugenio PĂ©rez --- drivers/vhost/vhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 5f84f29b6c47..1646b1ce312a 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1652,6 +1652,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg vq->last_avail_idx = s.num; /* Forget the cached index value. */ vq->avail_idx = vq->last_avail_idx; + vq->ndescs = vq->first_desc = 0; break; case VHOST_GET_VRING_BASE: s.index = idx;