Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1135578rwb; Fri, 13 Jan 2023 08:19:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXvn3RMDsr1+wruBNZVWoZMdSEuRw4iI2DqdKdeGcw49wDMrDBzqxaNvVJiqentWzOBiPk3M X-Received: by 2002:a62:5f03:0:b0:58a:fdc8:92bf with SMTP id t3-20020a625f03000000b0058afdc892bfmr11147654pfb.2.1673626798217; Fri, 13 Jan 2023 08:19:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673626798; cv=none; d=google.com; s=arc-20160816; b=m8/nh3mPIo2rDqEHY3UOo25zs5UMIZ8kToDpw7us0A6wlczwEZCHvgJA0Bf8fqwHyO OnmXdW038kvsEBHESQGB9fiMNE9GOFsIvjYcYASzxxzGaSDc87yk26al+S4DEMPMINJm aOeuj/6Xlp3JKh/OsVfyQ2sYgjERmEjMA5HcgqmoyhteaaCaOl5txBekv5m29PlwW4b7 53q+kWYn5Fl1un2teRpcrbmfTL1fuT60DvSz019xNy37kW3JczrtBCjs+UAsQGpp6fkt ksk7Jn+RuvkUPTndE5naHYkW5Gv/R1bgvu2WIAhl/j/8eQdJEnO+0ZbfxKUeZ5vQML9x Z/kg== 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:dkim-signature; bh=27o6Yp9lIyQ9qbRTNp3Mdd/CmshSTWD6HQz/gXlOA3o=; b=A59ABAlAk4AmvJFtefke1hT82+se/R6kipmFsrA8NvnAxDzT1l7C8zPDnbEd1m/Z75 DNS3qMc3Ub9CvIBSjdspMgBYqVPYackfoZ0dRM8oyK3LyHirRqGEBk0o8ajm/24wwKAQ 5aIr9bMEcfivp1Cz+PvUKEUwCMx18YqZa3ClyDJELHrjsR4rckWYGM3g+83V8Crb5ez9 IVaCSR7x7SMU1OJ6c/2aVmftS58H0p9tlnI4Ll3Z5BA4f7et0yiIm1BZ726C3Y4ifwIl ckhAllMvBCBpa9LOc5xQsMO8VENxSsYbKsqv6QZkRkENCyo/FxJZ+SZ5gOBrVDosuNYF uGlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=e25h2q38; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020a056a00114100b005780ffc0d4esi22510186pfm.197.2023.01.13.08.19.43; Fri, 13 Jan 2023 08:19:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=e25h2q38; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229957AbjAMQIH (ORCPT + 99 others); Fri, 13 Jan 2023 11:08:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbjAMQHo (ORCPT ); Fri, 13 Jan 2023 11:07:44 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F0381D4F; Fri, 13 Jan 2023 08:00:29 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E46401EC0657; Fri, 13 Jan 2023 17:00:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673625627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=27o6Yp9lIyQ9qbRTNp3Mdd/CmshSTWD6HQz/gXlOA3o=; b=e25h2q38vIHUR9CNYNMf4tXTOlOHI4G8rk4VVrsSmSLtK5pcWLoKu4BpzQjB4kuEIq3lg+ IsXSlOSBZ8LddYkmLkfbbsvYWLBHAbCUKnqKZnif4mdcYkpHnf//cFvKItev7lixW7KDtI BAYLJEDGsUX250/UeZjiceJ21LbTllE= Date: Fri, 13 Jan 2023 17:00:24 +0100 From: Borislav Petkov To: Michael Roth Cc: kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, dovmurik@linux.ibm.com, tobin@ibm.com, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, dgilbert@redhat.com, jarkko@kernel.org, ashish.kalra@amd.com, harald@profian.com, Nikunj A Dadhania Subject: Re: [PATCH RFC v7 07/64] KVM: SEV: Handle KVM_HC_MAP_GPA_RANGE hypercall Message-ID: References: <20221214194056.161492-1-michael.roth@amd.com> <20221214194056.161492-8-michael.roth@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221214194056.161492-8-michael.roth@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 14, 2022 at 01:39:59PM -0600, Michael Roth wrote: > From: Nikunj A Dadhania > > KVM_HC_MAP_GPA_RANGE hypercall is used by the SEV guest to notify a > change in the page encryption status to the hypervisor. > > The hypercall exits to userspace with KVM_EXIT_HYPERCALL exit code, > currently this is used for explicit memory conversion between > shared/private for memfd based private memory. So Tom and I spent a while to figure out what this is doing... Please explain in more detail what that is. Like the hypercall gets ignored for memslots which cannot be private...? And what's the story with supporting UPM with SEV{,-ES} guests? In general, this text needs more background and why this is being done. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette