Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1620429pxy; Mon, 2 Aug 2021 06:23:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMMGpb393bhkkDyt9Fs4rOCufT029OKZYvirDY2NM6Tw93wKLX5fJMDtnwxx3q/DJjcY27 X-Received: by 2002:a17:906:af05:: with SMTP id lx5mr15388787ejb.485.1627910624220; Mon, 02 Aug 2021 06:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627910624; cv=none; d=google.com; s=arc-20160816; b=JPzWqCiydjv5ZdtVQle1Nv4uyR4ueygpx1BwocQ9OZvnCiqn6aKgGKtgm+hjtaFXH1 iIBy64bCNwC3IN193Nf7d1LSPG+dwylMyjCASsHVT9K1FXQWvB+Oc/HEanPIf+cg4d6w cY3fNnGvl5dt5mNb8LOV382zGmEqiq+5CdPJGbBp7d1o9osa1bwCCaTHiqCpNmAh4gCS sbQJ3d8hlcNkfYE8BPBrUrdIM+vb723WSSydN/rgH2khjoXlY0MFIOpeNqqHl9LHQroK XyNYY4Dp1tkIpmxWzBR9PFcvmOGOOMSxkulHv8ffA5+VpqklcqK2klTKTHJ2amzLJnOj WLvA== 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=vFYr7sA+l+Y2423e3xr+v6m1a0prZKBxZMjTpNefbAw=; b=FZs88gffpNbTZMG9uEVdHN0dwCkMBO1C8ZdwuNomuuPuV3/ufHXCB2ydMHeMbvhz6f SjVkt9yq1jOLoPxuqNDgsb2zwx0QDUoqjKnjuAdsPtYEholSV3Djr+b5Bg3lOUtl/rbC anBxvfohbidhTV0F2OeGEIp1Y/lrkpQrs8ego7QiVlbv/noOq+Melw38yHbAbNEqWmIl J+NWEsailuP+ySlw82GH4cAdwDjr/bN5PiFcY7DQXtGHrxhtN89DZTP2ZTGjFTzgi/aA IEj1c6h4gHBKnqqNcaP9a8U7S0fiM22zeGyreKk613d0oWds51pOCipHmeJaS79vxXv3 3CiA== 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 o20si10124616ejm.682.2021.08.02.06.23.21; Mon, 02 Aug 2021 06:23:44 -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 S233857AbhHBNUf (ORCPT + 99 others); Mon, 2 Aug 2021 09:20:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233691AbhHBNUe (ORCPT ); Mon, 2 Aug 2021 09:20:34 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 743D4C06175F; Mon, 2 Aug 2021 06:20:24 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 69583379; Mon, 2 Aug 2021 15:20:20 +0200 (CEST) Date: Mon, 2 Aug 2021 15:20:03 +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 13/13] HV/Storvsc: Add Isolation VM support for storvsc driver Message-ID: References: <20210728145232.285861-1-ltykernel@gmail.com> <20210728145232.285861-14-ltykernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728145232.285861-14-ltykernel@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 10:52:28AM -0400, Tianyu Lan wrote: > In Isolation VM, all shared memory with host needs to mark visible > to host via hvcall. vmbus_establish_gpadl() has already done it for > storvsc rx/tx ring buffer. The page buffer used by vmbus_sendpacket_ > mpb_desc() still need to handle. Use DMA API to map/umap these > memory during sending/receiving packet and Hyper-V DMA ops callback > will use swiotlb function to allocate bounce buffer and copy data > from/to bounce buffer. I am wondering why you dont't use DMA-API unconditionally? It provides enough abstraction to do the right thing for isolated and legacy VMs. Regards, Joerg