From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D846BCCA47F for ; Mon, 6 Jun 2022 11:42:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 083EA6B0071; Mon, 6 Jun 2022 07:42:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 030868D0002; Mon, 6 Jun 2022 07:42:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E37DE8D0001; Mon, 6 Jun 2022 07:42:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CCC386B0071 for ; Mon, 6 Jun 2022 07:42:10 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 9DED0803BD for ; Mon, 6 Jun 2022 11:42:10 +0000 (UTC) X-FDA: 79547622420.21.D11B444 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf07.hostedemail.com (Postfix) with ESMTP id 176F04004A for ; Mon, 6 Jun 2022 11:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654515729; 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: in-reply-to:in-reply-to:references:references; bh=LbU0lHc+WuTsfhjoR9o0hk34WGqlmY1f4clG2HCMCgk=; b=SBgDv4n3ogu7LYpofyi07d/oPuOOOdbHTQpReXxBrFBK6QCvzdodHK6WlS8h8a8SBeHC/l arxISAgMna6YFyz7gLAFc4GHrqzxedgGsLaHpZGq8w9m+pkkbvQik0R1zerlcFx7Wi9OC+ 9jaOw8hRW27+tdMlvT1/PLXM8VEtHTs= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-37-z7Jcr0VXM_qZ9jjsm5Uh3Q-1; Mon, 06 Jun 2022 07:42:06 -0400 X-MC-Unique: z7Jcr0VXM_qZ9jjsm5Uh3Q-1 Received: by mail-wm1-f70.google.com with SMTP id k15-20020a7bc40f000000b0039c4b7f7d09so1859433wmi.8 for ; Mon, 06 Jun 2022 04:42:06 -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:user-agent; bh=LbU0lHc+WuTsfhjoR9o0hk34WGqlmY1f4clG2HCMCgk=; b=OBdlbx/YfSF1KA5rostb8lFGrHk3WkcJUVz6+PE2h6hjnvwFYlTELX412IoXixEvJJ dNar+KBF8si2C/788xKdSsFnFCg9NjvEFsfyt2pZ6yJ1U/J2Ag7S20MUcZnolEfXptUq r29Ls633YXra00rI9qQJfMWM5LAMZ23Av2HINVK3S0ektSyhJheeyQAxbmltTezIjUfy lH3GXu+lQWGmncVxER61WSu02rVCOxKnus+i3VE6YvDcnwuMeiTaLgOVl+ZDiFK2bkam sBwpKclX0eX3Yn5QIEKbKthE0D1dXHuL9L/O3N/x+Ri+9gjFKzxar1aQqNg981DRzBtD V0oA== X-Gm-Message-State: AOAM530Rvh5Qwe200fpik9G0yL9Co2HsThzKADPmyN05xwj4Ej7eju32 Zw7f8kwyBsxqQGbPOedP6PIrYdp5uPRwjOBrPYvgrj329bHE3Lup/+v7xpQYYG9AZGDhoJYB5i1 daT2k1tbypiQ= X-Received: by 2002:adf:f385:0:b0:213:bb0e:383a with SMTP id m5-20020adff385000000b00213bb0e383amr16114855wro.481.1654515725382; Mon, 06 Jun 2022 04:42:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEvzYVC9++mJVt13KuXQ5MBP3pxhBSkYiVChyG6utGpOcobdad2X2l/uq7b7FRSa2su3OnkA== X-Received: by 2002:adf:f385:0:b0:213:bb0e:383a with SMTP id m5-20020adff385000000b00213bb0e383amr16114820wro.481.1654515725160; Mon, 06 Jun 2022 04:42:05 -0700 (PDT) Received: from work-vm (cpc109025-salf6-2-0-cust480.10-2.cable.virginm.net. [82.30.61.225]) by smtp.gmail.com with ESMTPSA id h5-20020a5d5045000000b0020d07d90b71sm14848968wrt.66.2022.06.06.04.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 04:42:04 -0700 (PDT) Date: Mon, 6 Jun 2022 12:42:01 +0100 From: "Dr. David Alan Gilbert" To: Jarkko Sakkinen Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , tony.luck@intel.com, npmccallum@redhat.com, brijesh.ksingh@gmail.com Subject: Re: [PATCH Part2 RFC v4 04/40] x86/sev: Add the host SEV-SNP initialization support Message-ID: References: <20210707183616.5620-1-brijesh.singh@amd.com> <20210707183616.5620-5-brijesh.singh@amd.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.2.1 (2022-02-19) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: uinmnocgu7qafojh3w5tmqorp35pernw Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SBgDv4n3; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf07.hostedemail.com: domain of dgilbert@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=dgilbert@redhat.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 176F04004A X-HE-Tag: 1654515715-486015 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * Jarkko Sakkinen (jarkko.sakkinen@iki.fi) wrote: > On Wed, Jul 07, 2021 at 01:35:40PM -0500, Brijesh Singh wrote: > > The memory integrity guarantees of SEV-SNP are enforced through a new > > structure called the Reverse Map Table (RMP). The RMP is a single data > > structure shared across the system that contains one entry for every 4K > > page of DRAM that may be used by SEV-SNP VMs. The goal of RMP is to > > track the owner of each page of memory. Pages of memory can be owned by > > the hypervisor, owned by a specific VM or owned by the AMD-SP. See APM2 > > section 15.36.3 for more detail on RMP. > > > > The RMP table is used to enforce access control to memory. The table itself > > is not directly writable by the software. New CPU instructions (RMPUPDATE, > > PVALIDATE, RMPADJUST) are used to manipulate the RMP entries. > > What's the point of throwing out a set of opcodes, if there's > no explanation what they do? TBF They are described in the public document section linked in the previous paragraph. Dave > BR, Jarkko > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK