Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5365671rwj; Wed, 21 Dec 2022 01:25:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsVkQJ/OrePvtk+vhbGwVK6dCPoJRznH9wr33qiotooceZp7c1wiUYUz3yN/EOalpbLyMA1 X-Received: by 2002:a17:90a:e28e:b0:219:c550:a305 with SMTP id d14-20020a17090ae28e00b00219c550a305mr1405743pjz.20.1671614748463; Wed, 21 Dec 2022 01:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671614748; cv=none; d=google.com; s=arc-20160816; b=t396zhQdXxwXIBYxdHZs8P3k1KhdK2xPeLqQmYwLVN+sOiljW6nB6MOhEd2UqI7KRW 0ZVR9WDCFs6EBVM1cEQX3y9q3mvkQ7mS9nj7+GVuurvZBt/GB1h+snH4l5wLOoRoQx8/ il+7tl1G2jYUW55NFMHuY9aL30yaD7JEh8qllZyFleQNWnHVAA3SIzmmNDCAyQVYTzok f1oi6jOMKIFGP8hpJb9tIMZ52T6cCNy+JXJZ0s4fpSS9ELH16/lWEb2BhH6g+3KYccUs M3sLojKtZ2bzHc6AePxFGlaU7sbPeFLqhGTXBmsL+e/efe6r7Jf1V31T4fwvYx8oOajQ ITQA== 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=AergAdW6+TgtRXhtnjRDfBqIWsvcGuj5y1ttsyoo6mc=; b=xCT2OgdStTrqPU428n9H8QyzEJlJnYgQiEuRFUSq+2IN3f/D0hMRLOLqGG1ChP+qGi ormxmpGxoE6XRT7fUntPski5fbPs3sK+xk9Cas27vJOnA+5FDtqRIddF4vv42PYboBH3 CK66+UC5w4//W/xqkx8ydOPrnXncWtgrHPbj23/8ju+rpz8a9JsBgqoe81iYvCi4hjFW AGsmqmH2qJNjSWRfZpN4TpR4aSKGNCOHiCeCiTVk7rM3bIfSyOUoBEeXsPxDOh0tMT9s meiaw0OqTHiQuiM8B1K2azCYsu84UCQgouDmkajtAupTdTcPg59s/ek7E7m5t7Wb6Yl0 1HFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TB9kWcwi; 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 nu4-20020a17090b1b0400b00219ebe1506esi1376523pjb.131.2022.12.21.01.25.39; Wed, 21 Dec 2022 01:25:48 -0800 (PST) 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=TB9kWcwi; 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 S234535AbiLUJSZ (ORCPT + 70 others); Wed, 21 Dec 2022 04:18:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234073AbiLUJSV (ORCPT ); Wed, 21 Dec 2022 04:18:21 -0500 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 621B3FCE7 for ; Wed, 21 Dec 2022 01:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671614258; 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=AergAdW6+TgtRXhtnjRDfBqIWsvcGuj5y1ttsyoo6mc=; b=TB9kWcwi9ghGmpF3bYE0ggQk8mlWQSTmoo2xSmqgaYy3Ww9sozZlQqgJNYwZ87am4V7JkK JZ1iY7C9VJ2uI7+P0xPY9kLhcpKbipSYGgmekFoRzBo82u30w3EHqSYJZbb+joaeSwYNjd GkB19Ih/zPDLUfZqIs4aad5vR2CSSWQ= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-556-9IxsV4r9M6CJWiUk5QYaOg-1; Wed, 21 Dec 2022 04:17:37 -0500 X-MC-Unique: 9IxsV4r9M6CJWiUk5QYaOg-1 Received: by mail-ej1-f70.google.com with SMTP id hs18-20020a1709073e9200b007c0f9ac75f9so10036735ejc.9 for ; Wed, 21 Dec 2022 01:17:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=AergAdW6+TgtRXhtnjRDfBqIWsvcGuj5y1ttsyoo6mc=; b=Fhpm2JiKoJrLI7B9Z0KdKH8w0ZUS3S5UWs2y0p4CrAkOuMlvETU4OICDAeQZ4InJcJ yZeAuwRHRezyOsM+9WQzKZ7xp2CchcsILbp4NVnuOehgFICaplelCOC8uOhnKGKxqxmM OSqDcx6gsOdFmtlT/Qo0lLiJoaRksowDLra6cRRmbhF3fY/AxV9uNOtpvsVn6T8RKED1 YzQkNGkWZInmNDr378ssnZ40C6lor8q2mb+b6uQ+eoBDTifPLuuhZ5obDzsUs9IJfhOM 506tow5WbVgv/QLAGKMJweLrjhqrK/zq9jdM2EKaR5sCCAKzOSlUJNoHgUkaIHNsTphf zAIg== X-Gm-Message-State: AFqh2kr0AvC4E9lAjSkpWsqUtMd4v2jNcv8AY9LOsV+er3oIY6ojFFvI a+5I6/MeHkivTxhNRqK/4hv+aUHQfCrKqaWPC8ttsKrdxZtlRVRvivNod4ApdhIaPV2qksveGI9 TXBFhX8sO8vn/uAn7m+tmYSOd X-Received: by 2002:a17:907:c28f:b0:83f:5f77:8ff9 with SMTP id tk15-20020a170907c28f00b0083f5f778ff9mr555338ejc.12.1671614256279; Wed, 21 Dec 2022 01:17:36 -0800 (PST) X-Received: by 2002:a17:907:c28f:b0:83f:5f77:8ff9 with SMTP id tk15-20020a170907c28f00b0083f5f778ff9mr555327ejc.12.1671614256062; Wed, 21 Dec 2022 01:17:36 -0800 (PST) Received: from sgarzare-redhat (host-87-11-6-51.retail.telecomitalia.it. [87.11.6.51]) by smtp.gmail.com with ESMTPSA id ch16-20020a170906c2d000b0079e11b8e891sm6677651ejb.125.2022.12.21.01.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 01:17:35 -0800 (PST) Date: Wed, 21 Dec 2022 10:17:32 +0100 From: Stefano Garzarella To: Jason Wang Cc: mst@redhat.com, eperezma@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vdpa_sim: use weak barriers Message-ID: <20221221091732.gvc724dnq2ntza7g@sgarzare-redhat> References: <20221221062146.15356-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20221221062146.15356-1-jasowang@redhat.com> 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, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Wed, Dec 21, 2022 at 02:21:46PM +0800, Jason Wang wrote: >vDPA simulators are software emulated device, so let's switch to use >weak barriers to avoid extra overhead in the driver. > >Signed-off-by: Jason Wang >--- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I was going to propose the same :-) Reviewed-by: Stefano Garzarella > >diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c >index b071f0d842fb..eeaeaf43b476 100644 >--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c >+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c >@@ -68,7 +68,7 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > > vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, >- VDPASIM_QUEUE_MAX, false, >+ VDPASIM_QUEUE_MAX, true, > (struct vring_desc *)(uintptr_t)vq->desc_addr, > (struct vring_avail *) > (uintptr_t)vq->driver_addr, >-- >2.25.1 >