Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1610548pxy; Mon, 2 Aug 2021 06:10:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfTH/fHOewk43qbkkk5StWwn7UV0kKs6epZgfViNGFdm4z4z1Rhqsu+9DUOoWYVMa7W24b X-Received: by 2002:a92:7f03:: with SMTP id a3mr2436441ild.254.1627909817935; Mon, 02 Aug 2021 06:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627909817; cv=none; d=google.com; s=arc-20160816; b=T3elcEW1HYMz9gDUBdoODad6XSMlvqR/8f+sVWErjBorcZP7SQiAJmL8J2E9xOxrGa NJBdhBzM0u7lRfQ49sQUZK5UnVcuYANfcVJQ0MqZMUv1kcR/pzDcDuPLYjg02mMf9w8f fShkQAXPptZ/Fzy1R1w+iCHtTYTdDTPBB84y6TJnkNHsSfFgFM8JqHWkrwGz7OxAizfc M6kDMYNgcYqDWYdfU/069tWzqwevxcazVWKMNH3bqI56/QSD3Y3dGe7CwE6aMtS6baGh Zv9mT3nlfYRhmi8g6zuU1I21vKHGkixsfaB6Fjyw5/mQXZRAIwbNel/1RmfJ9jao8duz ogdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=s/dUVvpQRfOjAzBt73Z4sPW5uLvROM0ZUBasKGMCJKg=; b=C3GLYh+LuF90Z1jUeV3OQcl51OYO/1bhLk/BHEhKIOZxl+HiIOJSIOT090lyOTaQmU 5yKrEFCsQYwsiEqVMUQr7F6bp/46UnQXFr+QB071sw1QdAnskeovgtL0F81pp8tAFEXm SPgo/7GsXXfkwOy0m+U87HAIkw2WbdQq+xno80cpTvNmsK9Cxxzg7VY1seXqTTwqEaYT stDOOwV7wmUl805eF7+ej+HWMhP4vEhCzZ1exr0k8ynpiGFSmQXBVfpV35XdfCAydn68 9beStbZNPf6P0gJF7KCcVlgyKaiKP1/EiR46rS8mSouNS77ldt7FDtG6vxKfBwAq3mt1 UPlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kRMvDASI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si11592058ila.59.2021.08.02.06.10.06; Mon, 02 Aug 2021 06:10:17 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kRMvDASI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233826AbhHBNJV (ORCPT + 99 others); Mon, 2 Aug 2021 09:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233645AbhHBNJU (ORCPT ); Mon, 2 Aug 2021 09:09:20 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E25C061760; Mon, 2 Aug 2021 06:09:09 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id q2so19507713plr.11; Mon, 02 Aug 2021 06:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s/dUVvpQRfOjAzBt73Z4sPW5uLvROM0ZUBasKGMCJKg=; b=kRMvDASIqRBkh8RnkUbf4UEErYFb5pjTrI6eLr74f8VE9FC14kfOqhTTEmBemGcWD3 vxF/Oj4Z0mk+mgXZi+CkxzbvUrEg28DPozJRYT1LYoOgvdgCBdrLhlOgqpznXe77ZF+D ZRsfi1MTLPkKWKWY6a5qMSDRAgZid5FCeeP8fEMwHWa1vSNeigfHF23aRro1H5sDCITB EkTFVr45YxpYj6Y6XQuQIcwcDZu7zU/oMfjlkHdXqZuf7OlMlr3TYL3Nw0k3yZuHftYR WAG6jG72nxOzN64BlclBwzp9zH42noiu3RiOVNcjdPpHm0wiyHoYEebWFRLTYg8ibXLV BBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s/dUVvpQRfOjAzBt73Z4sPW5uLvROM0ZUBasKGMCJKg=; b=EpbTeBRrTUS1UZ0/i/MtcuQjr6RehHs++hdJmmkUqZGqxJc+WAgPF9gjBjfgDJ+dZN z//Gm2Pk/MkjcCbJpj7Zey1iuDiHHeST2OD3s5ivanbU2PQJ4+tq9lsSf8Lu6YTkP0XE oorIyWpjN7w2fp9POqksiYWJoaVN3ZJJU7P+uZCmu1QdX5Yq/Wukos3ON1VfqZGH+lbc 0bQ6Bne/8KF2jMZV9bjTJszbtLaOVNCijfgIFMFV30BsNPldTHjjz2xxJrHGEWj2MjLy RkZKqMI4ZtOW7/NcNUt2KL4YoUdyYKrccHzpHvprQpJDgB72yb4WOcVdW1beuO5Xxtq+ lvuw== X-Gm-Message-State: AOAM533UsCmQjpH87/K14BiugSAFRu45ysTucOJwrTPFQXreHrUFYWo0 G64YfMFjunivoFTr5EVNvd0= X-Received: by 2002:a17:902:a415:b029:129:5342:eab7 with SMTP id p21-20020a170902a415b02901295342eab7mr2273582plq.26.1627909749426; Mon, 02 Aug 2021 06:09:09 -0700 (PDT) Received: from ?IPv6:2404:f801:0:5:8000::4b1? ([2404:f801:9000:1a:efea::4b1]) by smtp.gmail.com with ESMTPSA id g7sm6715970pfv.66.2021.08.02.06.08.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Aug 2021 06:09:08 -0700 (PDT) Subject: Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM To: Joerg Roedel 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 References: <20210728145232.285861-1-ltykernel@gmail.com> <20210728145232.285861-5-ltykernel@gmail.com> <173823d1-280c-d34e-be2c-157b55bb6bc3@gmail.com> From: Tianyu Lan Message-ID: Date: Mon, 2 Aug 2021 21:08:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/2021 8:59 PM, Joerg Roedel wrote: > 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? > The interface just allocates a buffer and driver will continue to configure the buffer to be rx or tx after calling.