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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54AB7C43217 for ; Fri, 12 Nov 2021 21:37:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 387B460C51 for ; Fri, 12 Nov 2021 21:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235749AbhKLVkp (ORCPT ); Fri, 12 Nov 2021 16:40:45 -0500 Received: from mail.skyhub.de ([5.9.137.197]:54232 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbhKLVko (ORCPT ); Fri, 12 Nov 2021 16:40:44 -0500 Received: from zn.tnic (p4fed33a9.dip0.t-ipconnect.de [79.237.51.169]) (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 B53951EC0554; Fri, 12 Nov 2021 22:37:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636753071; 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=A0iII0qVuog0Us7YryaxXrUyUW2CBNn6Ykbyj7Igh68=; b=YZuttsgWwb+WKurJdCNhc5NmHv25S0MaUbJTuzppmjXZ5dM8Uni2tWbVFdStd/xywoMfx+ +/9Pfb/VS/49AlbSRQyGMxHJ72nLMZG28+TdmLG3H76n816eT7L+S5RoOkum81AS5YwwQm wdE1jX0Drz1biV+Y775fQOs2z+IaMhg= Date: Fri, 12 Nov 2021 22:35:35 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Marc Orr , Sean Christopherson , Dave Hansen , Peter Gonda , Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@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 , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Dave Hansen , Sergio Lopez , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part2 v5 00/45] Add AMD Secure Nested Paging (SEV-SNP) Hypervisor Support Message-ID: References: <20210820155918.7518-1-brijesh.singh@amd.com> <061ccd49-3b9f-d603-bafd-61a067c3f6fa@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 12, 2021 at 01:23:25PM -0800, Andy Lutomirski wrote: > SEV-SNP, TDX, and any reasonable software solution all require that the host > know which pages are private and which pages are shared. Sure, the old > SEV-ES Linux host implementation was very simple, but it's nasty and > fundamentally can't support migration. Right, so at least SNP guests need to track which pages have been already PVALIDATEd by them so that they don't validate them again. So if we track that somewhere in struct page or wherever, that same bit can be used to state, page is private or shared. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette