Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1602508pxy; Mon, 2 Aug 2021 06:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH9Gm1HIu4/V7z78qVmCo02mApd3j04EWlgxM4qgoHfb2YctETNdD8hT3M+rMfnbQlcUbV X-Received: by 2002:a2e:9a58:: with SMTP id k24mr11571791ljj.8.1627909296855; Mon, 02 Aug 2021 06:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627909296; cv=none; d=google.com; s=arc-20160816; b=xIMSmQayE1axHS2lYKXs8PHZPkF4BU0SenNZVX4tZwvlqAUvGjslt6Hx6rFPgk+rfL I4GpLHnuas3YbRDn1sq0Wh7nBi5bzuSOnOoYrRgmQk42vzC4SdY6uXO2GkaWQ0OxAFe+ EEGoz2c0n7hZSS3Pg4h+ueoGGl+bHRkrhySavLYYdMft7GzGIt8YtyMYf3BnrrXTwhuo ItZlLrlL7MEGDHgCkXL17ZLEvK70xK91UTQVYZm0tdLTSuCuW67jw+10LfLrzvTCfJNy lPJIFSilsu3Q1Gt2sUGX7yg+8i5NSB7XT02PcaiPIlBnKmpZ3XmCSSOSc5HUpi294TYs 1gSQ== 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; bh=CC5/mCPZA5BpdaAbyW163RGfTtQ6uXhFrO4/yhFjmyE=; b=D70+ZjZCpxoTuV37nZhSi4kUWywd+YOHql2YJzicRGZ2b+VRr5d+JVm2GAbMKpczYN MXzwkxYcMHGo5rUhYVQGeb6SJU0252cgKOxOqn4RmWwJPYV9+GhTdWSdEFjXD3lnhbka UX0YLbkqUcaxeID6HqIAVN/x2Nim5OZ0pYErcXmegwFNPfgPjAUJRKIvCaGNJEIq+DjG LjOTQIWolsynwkxHaEViZRow351N0q65ruzYq8dUy0RBzH+0CMtIqYMxHOEfEYShBPjP fu+TSmkjdgSy1sfBs8x3fb9Cailta03FiXDqs+J/f40/ZcgvYbCii5f41CRNfR6nwsE0 m1Zw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si9474686ejj.92.2021.08.02.06.01.12; Mon, 02 Aug 2021 06:01:36 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233762AbhHBM7z (ORCPT + 99 others); Mon, 2 Aug 2021 08:59:55 -0400 Received: from 8bytes.org ([81.169.241.247]:53006 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233718AbhHBM7y (ORCPT ); Mon, 2 Aug 2021 08:59:54 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id D9F01379; Mon, 2 Aug 2021 14:59:43 +0200 (CEST) Date: Mon, 2 Aug 2021 14:59:42 +0200 From: Joerg Roedel To: Tianyu Lan Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, will@kernel.org, davem@davemloft.net, kuba@kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, arnd@arndb.de, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, ardb@kernel.org, Tianyu.Lan@microsoft.com, rientjes@google.com, martin.b.radev@gmail.com, akpm@linux-foundation.org, rppt@kernel.org, kirill.shutemov@linux.intel.com, aneesh.kumar@linux.ibm.com, krish.sadhukhan@oracle.com, saravanand@fb.com, xen-devel@lists.xenproject.org, pgonda@google.com, david@redhat.com, keescook@chromium.org, hannes@cmpxchg.org, sfr@canb.auug.org.au, michael.h.kelley@microsoft.com, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, vkuznets@redhat.com, anparri@microsoft.com Subject: Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM Message-ID: References: <20210728145232.285861-1-ltykernel@gmail.com> <20210728145232.285861-5-ltykernel@gmail.com> <173823d1-280c-d34e-be2c-157b55bb6bc3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <173823d1-280c-d34e-be2c-157b55bb6bc3@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021 at 08:56:29PM +0800, Tianyu Lan wrote: > Both second and third are HV_GPADL_RING type. One is send ring and the > other is receive ring. The driver keeps the order to allocate rx and > tx buffer. You are right this is not robust and will add a mutex to keep > the order. Or you introduce fixed indexes for the RX and TX buffers?