Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp45683pxj; Thu, 3 Jun 2021 00:03:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0TRxNDpxhnEtXNdwsV9T7Qz40NSgtL92ibZ7CKpgzE9KQENceRjf8qJF4Int39F/IPAoQ X-Received: by 2002:a17:906:9143:: with SMTP id y3mr28237558ejw.465.1622703782667; Thu, 03 Jun 2021 00:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622703782; cv=none; d=google.com; s=arc-20160816; b=QbBdxcQNEg/YGM12gMeXVS6w3rH/mlEGnRPMhEt6YDFHJX2zk19E0rHYQXrFz+embf xev9IfRrEf6OC7tdccB8jWeWbfZZq8GHFCStQp50Y/MzbiU3bJ2J4Rcg9XkuxRtT1fjq DJXaRgEPBTfL/GBl/E5vW6UnbYWtpYMco44REp3X1RmDL3YZZxP/PAKtjb0VFV9NNoo3 LqsX84tNLBg21RRER/53u/DYzcxVmJ1f4y9KbUxFHh4ePyoB27ADdjGRSjO9zxFzDzH9 snU61BILuA82NCQapmKjHA6JmH1Otnsu/zIz2eW4hWxrpiWmTNQjZZ53GsjULDiFC39P ffTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=PueWFJYsB4q2dbMbGSJGobObFbdsaUmedr2PiYlLS3o=; b=D63DMYyDRDPv4T+2TsiDcR3rgzwj3EC6lYd181ZYhGyKiz6lLX5/qb/4HHSb8ft52L a2vZacKm9c/DQBJanSkiB3lJzaIPSaX0pHm6vNYGp1yUH4KUIaBvwR1JMXYBGj6ZzckT dm4zytVWPLSge2C0akxkx3Ho3Hs4JtIRQ+GDX7StDJNOzWHvMMrjf1iJNXuPVU3Xug/t 6PO1n4/MV7UzO4vXgSxs8meIV2zYGdcAkAstg7/G92I3A6DpkVZkkFJuLXZIVC7n/hJ6 s7p+fQOtawb5iCKsQ00mUcnc6W4FW6S4jsgk5hr85PObanJXqvGr/YH9PVai4wrGAscs ekhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FLa5ACR1; 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 d5si1635832ejo.627.2021.06.03.00.02.39; Thu, 03 Jun 2021 00:03:02 -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=FLa5ACR1; 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 S229835AbhFCHCH (ORCPT + 99 others); Thu, 3 Jun 2021 03:02:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41583 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbhFCHCH (ORCPT ); Thu, 3 Jun 2021 03:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622703623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PueWFJYsB4q2dbMbGSJGobObFbdsaUmedr2PiYlLS3o=; b=FLa5ACR15wc9F88Qkr2wUbiEfOzR4Sozi/bBOYNBW6bKTImRavyHtTX713X/4scfzJENVi izb4lY6ZURZJynsfsiInomP1tdPNTHTXNlbN55lcL6yMHnqB8FynT0wIyViVX8lPr9z4Lg uoIUxoEB5lzNnZR50fiLzDlYOK13jro= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-dK3WdQHTOLuxkASdqNNj5w-1; Thu, 03 Jun 2021 03:00:20 -0400 X-MC-Unique: dK3WdQHTOLuxkASdqNNj5w-1 Received: by mail-pg1-f198.google.com with SMTP id v12-20020a63d54c0000b02902167d3d2f08so3400561pgi.13 for ; Thu, 03 Jun 2021 00:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PueWFJYsB4q2dbMbGSJGobObFbdsaUmedr2PiYlLS3o=; b=JOTDEX/+ibHsQYdQ8DnhqoUVZ0J1m4/SIPRhTHxnYoyld86AvdUo1jRlFH16qfpiJ7 eX82apKYihDJx4y2+V1yHyouLgJL1PJ5U6MHMj77PggcehZ558NKtDadTpUcP5VYyLTc +1zld4cz1N6PcjpWExo6to0jq1jV8xVVQft32IDPjMx/So02itbqRn6rTLo1Rkfayt+c PhoTINhb/ijah+HhMG3cAYY3+LM5TU8lzEiWX92hH3RFSn9AdBScQVrq6RIugRfnam+W oGXDTuTyDHTs9/wUaxGKVC4QPKtH8TP2e2zEUqHmCAMA7FyepmJ1wk2hCDMM9Es6QQbM OGRQ== X-Gm-Message-State: AOAM531kFUPcxRAHFEC57ofcvogLekrYXJH4tStdA1zlyX+tEBhHj2jQ iPBC+B4NmvngEd8OIFL5d5zhq0Nj/WoZ29DstCd9nlUeUJCRMZhO9ORBI20nJqIZZy57fAjgzK6 C6BXQEPXOrAeofzJOiV+qx7rR7Ibf12j2iF+Uz8y4lkXFlw0uPVK0b/d0h41bRQxk7jWuLWYLfF cz X-Received: by 2002:a17:90a:ff94:: with SMTP id hf20mr9823068pjb.6.1622703619483; Thu, 03 Jun 2021 00:00:19 -0700 (PDT) X-Received: by 2002:a17:90a:ff94:: with SMTP id hf20mr9823035pjb.6.1622703619247; Thu, 03 Jun 2021 00:00:19 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id 19sm1128554pfn.43.2021.06.03.00.00.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Jun 2021 00:00:18 -0700 (PDT) Subject: Re: [PATCH] vdpa/mlx5: Clear vq ready indication upon device reset To: Eli Cohen , mst@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20210602085924.62777-1-elic@nvidia.com> From: Jason Wang Message-ID: <6e4f9e1b-2c67-fae6-6edd-1982d0f48e22@redhat.com> Date: Thu, 3 Jun 2021 15:00:15 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210602085924.62777-1-elic@nvidia.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2021/6/2 ????4:59, Eli Cohen ะด??: > After device reset, the virtqueues are not ready so clear the ready > field. > > Failing to do so can result in virtio_vdpa failing to load if the device > was previously used by vhost_vdpa and the old values are ready. > virtio_vdpa expects to find VQs in "not ready" state. > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Eli Cohen Acked-by: Jason Wang > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 02a05492204c..e8bc0842b44c 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -862,6 +862,7 @@ static void destroy_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtq > return; > } > umems_destroy(ndev, mvq); > + mvq->ready = false; > } > > static u32 get_rqpn(struct mlx5_vdpa_virtqueue *mvq, bool fw)