Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5209323rwj; Tue, 20 Dec 2022 22:41:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXvKTO/OXPwuofAVPgdawScuLN9/5BXqeoCmXqlv7si3C2SdsA6SZbiWdAQUAo+wPmmnzp4U X-Received: by 2002:aa7:d4c8:0:b0:467:559e:530c with SMTP id t8-20020aa7d4c8000000b00467559e530cmr498241edr.18.1671604873014; Tue, 20 Dec 2022 22:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671604872; cv=none; d=google.com; s=arc-20160816; b=E7fwluyvqddY250u1J8UJoYQDCVoGmbse9Zfni9B4Vj+ecJa5nEWknB4wVLgaqDV+v 4muCET9XPUk9U7i4O5kHuc7XC3BbjO3AwpTiDZxMhyRXIaW/3NwryTgKxC1cIPc84dai GMCL2ncxNy4JnImoSYrcOGGzYbUHe9tvmrzJGYlN1b3wgMco57HrGzIk4CLt900BhOb8 CHqtkrunxF3DJdMBUWPJnC3va0DnQPUYHJetruI3UOenHnRKnwI+JI6Xe3/7+5rRz8U9 5Qg6NxMNwf5VX0STrWY8YZ/hNtiHJWrQsZFXUcWPN3GIblMwpWbuuX9rIfYZFTBdfDRI 25uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YbUTDBvvbkpTowLUKuY9NOUf0QooGXIhFhvRisHIr4Q=; b=s8m4B+yiBr14nNEjQr9TntySdI3PebX7wWuN8V8di9oBmjuTjBN97WEeqKUShS60t6 mVhlbh5ThHBBV0wZWjx5e4w5N7fPNP2sCpKpyrAhHYtl0lV4BOrV5yKqk2AgE4V1ASSS vi40DqyyT0EvPrjY3DRoAyVejQFow2GjbfLnhz3xGUNRcwglY9ZQgJxMNosUt2LadscY fnGwEHKpTWjxx+0Q2P+101It9WgjJ6tWzaz+AJ1B5xX+i4rxFkyi+ogbNu3wc22Km0go UJ4O5b6zS83JWk2fQOx5WFzrvF3BdnCFGJnGWFpmPC05x1d15xYOV2zwFKn3xlu8CvKm vnCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JePHgRy2; 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 g41-20020a056402322900b0047d9b95e75esi1268545eda.104.2022.12.20.22.40.56; Tue, 20 Dec 2022 22:41:12 -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=JePHgRy2; 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 S231245AbiLUGWo (ORCPT + 69 others); Wed, 21 Dec 2022 01:22:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiLUGWm (ORCPT ); Wed, 21 Dec 2022 01:22:42 -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 0CB1FBDB for ; Tue, 20 Dec 2022 22:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671603714; 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; bh=YbUTDBvvbkpTowLUKuY9NOUf0QooGXIhFhvRisHIr4Q=; b=JePHgRy26hFhNadvyPVcajPaPJYxfsVNvQVBfOCE34/JQ16jvBVaeMqcmz/WwWis7oLVrH dq+m3SS9XjWvlCaHTv2r9Y7N6Ye66PPSFtg2uykZFjNBpnTeJRI8EaZay9oBwmhEf/i86Y TZJwWj8o4OSXp6niMaLGmCevdKmyGug= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-26-uqvySR1SPRev5hYvxGYHgg-1; Wed, 21 Dec 2022 01:21:52 -0500 X-MC-Unique: uqvySR1SPRev5hYvxGYHgg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 323612823807; Wed, 21 Dec 2022 06:21:52 +0000 (UTC) Received: from localhost.localdomain (ovpn-13-236.pek2.redhat.com [10.72.13.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 298E4112132C; Wed, 21 Dec 2022 06:21:48 +0000 (UTC) From: Jason Wang To: mst@redhat.com, jasowang@redhat.com Cc: sgarzare@redhat.com, eperezma@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] vdpa_sim: use weak barriers Date: Wed, 21 Dec 2022 14:21:46 +0800 Message-Id: <20221221062146.15356-1-jasowang@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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(-) 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