Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4482651rdh; Wed, 29 Nov 2023 02:48:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGG4DBw3gR+KKbhFvVmDhg0aB5Xcx99spk4vWCCi2KXBKxgsrVbQa0dkqoNzOcfgFsDjswT X-Received: by 2002:a9d:6f01:0:b0:6bd:93e:460b with SMTP id n1-20020a9d6f01000000b006bd093e460bmr19577471otq.19.1701254885853; Wed, 29 Nov 2023 02:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701254885; cv=none; d=google.com; s=arc-20160816; b=sIo7xdXA4QBnq7EnTLZwvbL+ggq4MvWyYx+Zr3TL5+2z5kMBBnaB6MYXYn+dhNKWEP DksQvsdeESOykKJh9yK/eRTOFk1M9RFPgEhk9HSbam/xSIs2EzqfH18rKhNimHqQghj/ 5mm2ZgyoiZMYxyRYuSEwhl15L4AIAYlPCdsrz7n9TD9TGn0++olEyYqE5pJvbY/hQ157 g8Rcie8txmNwIcjAomxHLxLjeU4XlIU+HgK4K67ZZugk8DQrjfHd/rhWpcT9O78NRbLk LXDfMpUtpZjzKQ73Y9iQrQAeLPWej0KSm257JFTNq9cF1qCKiwpvinY3/yslCyfDNW2X 8N1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Owv2Mc03lBpTK+4S9xF0x4+ULWs6EQWdu+bbx0qTpeg=; fh=hlra+5HwQe0uhZnTDvhg1j+X19+vh/U3MS1MiE+pkEY=; b=pnMMchVFybG9U/m+cHU1qglIFoio2gPOl1O4Dw+cOKhXO/tApTou1YOSAyLmL0VEd7 0S4q1RRWvpLivQ4XF2iOwMGafosOO8ooDQJLv2NdVmxAOiRIFs8Guro/bj5ZeYmN0wnE oQJSlrvxbVnAmiabYkrwmG6X8XcmOgkh23f+T/Gf00vEep8ASm7mqYOjK9qFRYBIyKm9 0houXGW0hg7G++DSNgKgl3Z0s6qh388b0snLyO0kb8eg6N+YxuGVrF0ItDsYR0djh7Xm a/tDV9gPlQXRzytzgtfbOxj0Vao/kUfXZiwmme1ZJOlGfyyQBZFjPthpXy5E0nJfVlgI BoaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O7KWoYHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a20-20020a63e854000000b005b18b5da51asi14071286pgk.346.2023.11.29.02.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 02:48:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O7KWoYHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0D03F808E0C0; Wed, 29 Nov 2023 02:46:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbjK2Kqg (ORCPT + 99 others); Wed, 29 Nov 2023 05:46:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbjK2Kqe (ORCPT ); Wed, 29 Nov 2023 05:46:34 -0500 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 29 Nov 2023 02:46:41 PST Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14C9BD73; Wed, 29 Nov 2023 02:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701254801; x=1732790801; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=rbU00ZlSBNX0l3gHoeLVRwt3IFr67F4reSXWY6JN9vE=; b=O7KWoYHaT3sMySUX9cVthzatsqsct3Zq+zBp3zmr6xVVzwW4tcHrZWkE W/GKh1HPYXBP/SHDPys7PBYt+c8q6h5WYJGzcLk+sSwwYe8GA34/KIYm5 cREhpMxFZwyNUIoL5Ah0Xq0RPKMIlESAFX8a6pq+8gVHnI/zjg/GObSjX PtMZLwmNsRuHKyXWh9x0Y8obs/bflb4DFg6QT46VaX7jXxrLhmyCIFKe4 6+FcOdkS4xkZELRsSccuHUFO++JgZ9xkxP+jkvqEPOPLOESOUabrxVhLc U4HJsIOiUxOZozDz1VEDF2P0J2IlVZPrbAWNMbm7jmlwSsaeMcdBaBl/v w==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="29567" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="29567" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 02:45:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="859781936" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="859781936" Received: from hongyuni-mobl.ccr.corp.intel.com (HELO [10.238.2.21]) ([10.238.2.21]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 02:45:34 -0800 Message-ID: Date: Wed, 29 Nov 2023 18:45:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [GIT PULL] virtio: features To: Jason Wang Cc: "Michael S. Tsirkin" , xuanzhuo@linux.alibaba.com, Linus Torvalds , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, eperezma@redhat.com, shannon.nelson@amd.com, yuanyaogoog@chromium.org, yuehaibing@huawei.com, kirill.shutemov@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, alexander.shishkin@linux.intel.com References: <20230903181338-mutt-send-email-mst@kernel.org> <647701d8-c99b-4ca8-9817-137eaefda237@linux.intel.com> <6f84bbad-62f9-43df-8134-a6836cc3b66c@linux.intel.com> Content-Language: en-US From: "Ning, Hongyu" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 02:46:55 -0800 (PST) On 2023/11/29 18:20, Jason Wang wrote: > On Wed, Nov 29, 2023 at 6:12 PM Ning, Hongyu > wrote: >> >> >> On 2023/11/29 17:16, Jason Wang wrote: >>> On Wed, Nov 29, 2023 at 5:05 PM Ning, Hongyu >>> wrote: >>>> >>>> >>>> >>>> On 2023/9/4 6:13, Michael S. Tsirkin wrote: >>>>> The following changes since commit 2dde18cd1d8fac735875f2e4987f11817cc0bc2c: >>>>> >>>>> Linux 6.5 (2023-08-27 14:49:51 -0700) >>>>> >>>>> are available in the Git repository at: >>>>> >>>>> https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus >>>>> >>>>> for you to fetch changes up to 1acfe2c1225899eab5ab724c91b7e1eb2881b9ab: >>>>> >>>>> virtio_ring: fix avail_wrap_counter in virtqueue_add_packed (2023-09-03 18:10:24 -0400) >>>>> >>>>> ---------------------------------------------------------------- >>>>> virtio: features >>>>> >>>>> a small pull request this time around, mostly because the >>>>> vduse network got postponed to next relase so we can be sure >>>>> we got the security store right. >>>>> >>>>> Signed-off-by: Michael S. Tsirkin >>>>> >>>>> ---------------------------------------------------------------- >>>>> Eugenio Pérez (4): >>>>> vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag >>>>> vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature >>>>> vdpa: add get_backend_features vdpa operation >>>>> vdpa_sim: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK >>>>> >>>>> Jason Wang (1): >>>>> virtio_vdpa: build affinity masks conditionally >>>>> >>>>> Xuan Zhuo (12): >>>>> virtio_ring: check use_dma_api before unmap desc for indirect >>>>> virtio_ring: put mapping error check in vring_map_one_sg >>>>> virtio_ring: introduce virtqueue_set_dma_premapped() >>>>> virtio_ring: support add premapped buf >>>>> virtio_ring: introduce virtqueue_dma_dev() >>>>> virtio_ring: skip unmap for premapped >>>>> virtio_ring: correct the expression of the description of virtqueue_resize() >>>>> virtio_ring: separate the logic of reset/enable from virtqueue_resize >>>>> virtio_ring: introduce virtqueue_reset() >>>>> virtio_ring: introduce dma map api for virtqueue >>>>> virtio_ring: introduce dma sync api for virtqueue >>>>> virtio_net: merge dma operations when filling mergeable buffers >>>> >>>> Hi, >>>> above patch (upstream commit 295525e29a5b) seems causing a virtnet >>>> related Call Trace after WARNING from kernel/dma/debug.c. >>>> >>>> details (log and test setup) tracked in >>>> https://bugzilla.kernel.org/show_bug.cgi?id=218204 >>>> >>>> it's recently noticed in a TDX guest testing since v6.6.0 release cycle >>>> and can still be reproduced in latest v6.7.0-rc3. >>>> >>>> as local bisects results show, above WARNING and Call Trace is linked >>>> with this patch, do you mind to take a look? >>> >>> Looks like virtqueue_dma_sync_single_range_for_cpu() use >>> DMA_BIDIRECTIONAL unconditionally. >>> >>> We should use dir here. >>> >>> Mind to try? >>> >>> Thanks >>> >> >> sure, but what I see in the code >> virtqueue_dma_sync_single_range_for_cpu() is using DMA_FROM_DEVICE, >> probably I misunderstood your point? >> >> Please let me know any patch/setting to try here. > > Something like attached. (Not even compiling test). > > Thanks > Oh, this patch works, WARNING and Call Trace are no more reproduced in the same Linux Guest Kernel setup. >> >> >>>> >>>>> >>>>> Yuan Yao (1): >>>>> virtio_ring: fix avail_wrap_counter in virtqueue_add_packed >>>>> >>>>> Yue Haibing (1): >>>>> vdpa/mlx5: Remove unused function declarations >>>>> >>>>> drivers/net/virtio_net.c | 230 ++++++++++++++++++--- >>>>> drivers/vdpa/mlx5/core/mlx5_vdpa.h | 3 - >>>>> drivers/vdpa/vdpa_sim/vdpa_sim.c | 8 + >>>>> drivers/vhost/vdpa.c | 15 +- >>>>> drivers/virtio/virtio_ring.c | 412 ++++++++++++++++++++++++++++++++----- >>>>> drivers/virtio/virtio_vdpa.c | 17 +- >>>>> include/linux/vdpa.h | 4 + >>>>> include/linux/virtio.h | 22 ++ >>>>> include/uapi/linux/vhost_types.h | 4 + >>>>> 9 files changed, 625 insertions(+), 90 deletions(-) >>>>> >>>> >>> >>