Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1221584rdb; Sat, 7 Oct 2023 19:20:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGb0TWYpbK1y3+6Or1xHViUVwMIAcM5pmn8GdTfWlC6Ui+K0pSIhuXvNEtYFxxhRM7CuAzO X-Received: by 2002:a05:622a:190a:b0:419:63ff:5ab2 with SMTP id w10-20020a05622a190a00b0041963ff5ab2mr14940709qtc.24.1696731613603; Sat, 07 Oct 2023 19:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696731613; cv=none; d=google.com; s=arc-20160816; b=XccIgA+35UIhvN4gIMxSoFweC1I3x1E6rRDo4znYLJ3mHFcjDpONC0s5il0w6UND/8 VJ4xW06ADF2srWZFMBUw+ZhXotX9F4yXkvZeujkFW851GXAF0N9OkkO/pc+GcWqCPsX2 UVzWglrOnox9+YIEHsEyXYkVQyHq9X9Fngvq9QvAU0Gt+kFbvO/ORLdw67x2dH0hyQ/i ZDJNcuWB1zG7MrjgRN3M/sFEEV7CCIpUv4XL5NwaYYOaytuWOQLYZZz3TXJrTXElaui2 oSM+subSDBI/0OO/HNz3KA424AgAPo4/NnW3VP5p+WZRRpHQ49y2/+zEarO0Qy5nZ1c8 bltQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:cc:to:from:date:subject :message-id; bh=JRBhcYbtZlEODzvphL+2mpkMDZzjzqeRLVUr34lCNZI=; fh=Rb3tLXIK/Jw+nJk4HMg1snNxZ0bYj6hhHm1wTWlBaJU=; b=UzrKSKkZS36IQp1FyvhaYpda5QdZqgN8PduTnf0VHq6KoTZyxUjTUUVP/W9awDcP3m ow/K9hLnb3m1SMA8596NfLncUNwMugDDawnrYOKlVMBkTQClHmBRiZzyt25IK37YchwK N+qqB/+1GjDhTqrLP9foCaaEqVfUxz4P0fGE01xLUz4Kn0nGiwsT9A2iCSPJQYSU5qQ0 6/gD2Pz5ohzdPX2tRnfBm56iNoOwbd6ZrNWJF0XhP5rwwbholkhvqcjSLkFgmvgivLu9 1mUwiF9/mTtWAn0Fut/r8OxSXX2J90tDCJf+/lqy3PjUmOTKMyiF/Ub3lnn3mUO7fDxH ydog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id cq25-20020a056a00331900b0068fb986fcf3si4692856pfb.377.2023.10.07.19.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 19:20:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3EDAC803E864; Sat, 7 Oct 2023 19:20:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344309AbjJHCT4 (ORCPT + 99 others); Sat, 7 Oct 2023 22:19:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344249AbjJHCTz (ORCPT ); Sat, 7 Oct 2023 22:19:55 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05D4BB9; Sat, 7 Oct 2023 19:19:52 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R551e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VtcTNin_1696731589; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VtcTNin_1696731589) by smtp.aliyun-inc.com; Sun, 08 Oct 2023 10:19:50 +0800 Message-ID: <1696731557.4612653-1-xuanzhuo@linux.alibaba.com> Subject: Re: [PATCH v2 1/2] tools/virtio: Add dma sync api for virtio test Date: Sun, 8 Oct 2023 10:19:17 +0800 From: Xuan Zhuo To: liming.wu@jaguarmicro.com Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liming Wu , "Michael S . Tsirkin" , Jason Wang References: <20230926050021.717-1-liming.wu@jaguarmicro.com> <20230926050021.717-2-liming.wu@jaguarmicro.com> <20230927111904-mutt-send-email-mst@kernel.org> <20231007065547.1028-1-liming.wu@jaguarmicro.com> In-Reply-To: <20231007065547.1028-1-liming.wu@jaguarmicro.com> X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 07 Oct 2023 19:20:11 -0700 (PDT) X-Spam-Level: ** On Sat, 7 Oct 2023 14:55:46 +0800, liming.wu@jaguarmicro.com wrote: > From: Liming Wu > > Fixes: 8bd2f71054bd ("virtio_ring: introduce dma sync api for virtqueue") > also add dma sync api for virtio test. > > Signed-off-by: Liming Wu You should post a new thread. Thanks. > --- > tools/virtio/linux/dma-mapping.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h > index 834a90bd3270..822ecaa8e4df 100644 > --- a/tools/virtio/linux/dma-mapping.h > +++ b/tools/virtio/linux/dma-mapping.h > @@ -24,11 +24,23 @@ enum dma_data_direction { > #define dma_map_page(d, p, o, s, dir) (page_to_phys(p) + (o)) > > #define dma_map_single(d, p, s, dir) (virt_to_phys(p)) > +#define dma_map_single_attrs(d, p, s, dir, a) (virt_to_phys(p)) > #define dma_mapping_error(...) (0) > > #define dma_unmap_single(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0) > #define dma_unmap_page(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0) > > +#define sg_dma_address(sg) (0) > +#define dma_need_sync(v, a) (0) > +#define dma_unmap_single_attrs(d, a, s, r, t) do { \ > + (void)(d); (void)(a); (void)(s); (void)(r); (void)(t); \ > +} while (0) > +#define dma_sync_single_range_for_cpu(d, a, o, s, r) do { \ > + (void)(d); (void)(a); (void)(o); (void)(s); (void)(r); \ > +} while (0) > +#define dma_sync_single_range_for_device(d, a, o, s, r) do { \ > + (void)(d); (void)(a); (void)(o); (void)(s); (void)(r); \ > +} while (0) > #define dma_max_mapping_size(...) SIZE_MAX > > #endif > -- > 2.34.1 >