Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp567774pxb; Mon, 25 Oct 2021 13:57:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrIZqXKeXipA/HtaaBEPLCh71tovo6hR7oSZH0JY/msAT9d3xKdiQwmrRT2Hm15mT0k1kv X-Received: by 2002:aa7:9047:0:b0:44b:e142:8b0d with SMTP id n7-20020aa79047000000b0044be1428b0dmr20653289pfo.45.1635195441454; Mon, 25 Oct 2021 13:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635195441; cv=none; d=google.com; s=arc-20160816; b=krPcreQvW20Rn038vI6kJZ2zD5Z/1dzNiS8AqWjP2aqwWt+kMWnbeVs92i0v+e3PCh cG3EaRmI9+tNHvsdgUDB8Tnkaw+Edl6wWqhudCiY5xbuRd9pTtRai7RToT+EnNNcFlUP TYNtNxfJzstkYUthLNlhFjbl9Q/TCCLL7pw1+4Wfy9J/2eVdqeug0Kz+BgTO+6rkF5p/ yVqEo/r0g3NlDrI3UH82L9MV+hmL9U6mF0E3t2vNQqD0sYYMhFR8Mc+eqCokF0GM0ZEO svLq1AjHcU+00BCaOO14Bj3lx/onAIFg8wma9+S7i+duKAJCHsSO2rC7YqM/bXUZ1sY+ FBjA== 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=q+yfKmb+onnS482Y6u9v2lkAP9a5r5WCNti0ot9YfMg=; b=h53lwexHfy0fwAaERwEj8Xdr2+ZX0H7hLr+ZO+QcCTNg17LFY/q8wPsL2kBv9HDa6f uRcIK91mGYXTk1aD0BZAVYuxPR6aKolUzPhgyEp9IolvtsRIYSYT9HkyKv0Wxwnk2M3n EVYXkndtgNPHSAJVxXtfsy4Suufhizy884KO1iLrvp5nAvDnxN6jd2gL8fNXg/7U8lZ3 8of2c8k0TDfDbsjNz4iffBvseXEv69pLtfadQgADH4E3OtTVXigWKO1LDPUwZQhgMkS3 KaaSN95liDeYyxOXSxofW22mBLczU4/Xgxg6vvCWjxifNoSml3gNb9wLQylhtJXQW/FU 4sgg== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nt21si27867281pjb.178.2021.10.25.13.57.08; Mon, 25 Oct 2021 13:57:21 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234325AbhJYU62 (ORCPT + 99 others); Mon, 25 Oct 2021 16:58:28 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:51873 "EHLO mail-wm1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232690AbhJYU6Z (ORCPT ); Mon, 25 Oct 2021 16:58:25 -0400 Received: by mail-wm1-f47.google.com with SMTP id 5so2192525wmb.1; Mon, 25 Oct 2021 13:56:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=q+yfKmb+onnS482Y6u9v2lkAP9a5r5WCNti0ot9YfMg=; b=xUQTw3gvr5nrkxlziOUeMn9HfUMvaQL0F4JcaLJAgjzeVs0W0mOa0m7PSt93PQb83q gRiekuo5cNPMtA6qRKzD1WipURbGmCZUKl2LAN5Egzp/k/bf3/wWkx/5s0qDb7sYEZG9 ifVYrat4wIIRGHCtTqy84F+tUcTKAl6eCVzyzmEJtirXi69lIo1HprJGxT0uRTqBWkS3 rxWj6ncPlD01FoBsXjFVSxWV1r5pxZyyxgwG2tabXdb+H7k9ss1P63Hyt3kmHRz6XtCT NwDiobnFeTqNs1a2vYoLc9hY3gTbRXNBaLNmwhME66ZYPFnecdyXw/O2zbebEbUxWaJ8 /9qw== X-Gm-Message-State: AOAM530OSOJXyIEJboGJlhBYLnyQnkW4VLRm2bsNqe84GUVtWOvDE25X yzqKuzYEBMdq8g3LHU8F1n4= X-Received: by 2002:a05:600c:3546:: with SMTP id i6mr51776416wmq.146.1635195361619; Mon, 25 Oct 2021 13:56:01 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id m15sm17916917wmq.0.2021.10.25.13.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 13:56:00 -0700 (PDT) Date: Mon, 25 Oct 2021 20:55:59 +0000 From: Wei Liu 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, davem@davemloft.net, kuba@kernel.org, gregkh@linuxfoundation.org, arnd@arndb.de, brijesh.singh@amd.com, jroedel@suse.de, Tianyu.Lan@microsoft.com, thomas.lendacky@amd.com, pgonda@google.com, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, rppt@kernel.org, tj@kernel.org, aneesh.kumar@linux.ibm.com, saravanand@fb.com, sfr@canb.auug.org.au, michael.h.kelley@microsoft.com, linux-arch@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, vkuznets@redhat.com, konrad.wilk@oracle.com, hch@lst.de, robin.murphy@arm.com, joro@8bytes.org, parri.andrea@gmail.com, dave.hansen@intel.com Subject: Re: [PATCH V9 0/9] x86/Hyper-V: Add Hyper-V Isolation VM support(First part) Message-ID: <20211025205559.5wge6ohiktif5hwt@liuwe-devbox-debian-v2> References: <20211025122116.264793-1-ltykernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211025122116.264793-1-ltykernel@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 25, 2021 at 08:21:05AM -0400, Tianyu Lan wrote: > From: Tianyu Lan > > Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based > security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset > is to add support for these Isolation VM support in Linux. > > The memory of these vms are encrypted and host can't access guest > memory directly. Hyper-V provides new host visibility hvcall and > the guest needs to call new hvcall to mark memory visible to host > before sharing memory with host. For security, all network/storage > stack memory should not be shared with host and so there is bounce > buffer requests. > > Vmbus channel ring buffer already plays bounce buffer role because > all data from/to host needs to copy from/to between the ring buffer > and IO stack memory. So mark vmbus channel ring buffer visible. > > For SNP isolation VM, guest needs to access the shared memory via > extra address space which is specified by Hyper-V CPUID HYPERV_CPUID_ > ISOLATION_CONFIG. The access physical address of the shared memory > should be bounce buffer memory GPA plus with shared_gpa_boundary > reported by CPUID. > > This patchset is rebased on the commit d9abdee of Linux mainline tree > and plus clean up patch from Borislav Petkov(https://lore.kernel.org/r/ > YWRwxImd9Qcls/Yy@zn.tnic) > > Applied to hyperv-next. Thanks. Wei.