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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9E20C636C9 for ; Wed, 21 Jul 2021 13:19:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 711B8611CE for ; Wed, 21 Jul 2021 13:19:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 711B8611CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DDB06B0036; Wed, 21 Jul 2021 09:19:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 162C06B0071; Wed, 21 Jul 2021 09:19:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F12D96B0072; Wed, 21 Jul 2021 09:19:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id CDC1B6B006C for ; Wed, 21 Jul 2021 09:19:55 -0400 (EDT) Received: from forelay.prod.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by fograve04.hostedemail.com (Postfix) with ESMTP id 3C82423116 for ; Wed, 21 Jul 2021 10:53:24 +0000 (UTC) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C9ECB8248047 for ; Wed, 21 Jul 2021 10:53:23 +0000 (UTC) X-FDA: 78386283486.02.DE971DA Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf01.hostedemail.com (Postfix) with ESMTP id 4A0BA50180CF for ; Wed, 21 Jul 2021 10:53:23 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EA654224C5; Wed, 21 Jul 2021 10:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626864801; h=from:from:reply-to: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=uC4JHriA0CBKe4OgSBxOhsq1bT7TDY8nMHdACrDqoE4=; b=ohxJ5jBG3DrGKxgJu6r7lhW82HIRfRoRgPqm4l8CQRg002ilYJdkoeZo40LxVco63FnReE wLPI3sDrzcxm75Ldov1mVAvVTb4bMgw2nIf03Oug8stPnfaaD4cCWvDHdcth5u+btYN0Wj xbpk6gc7LbapGM3SV0TP2b6XXCFoFEQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626864801; h=from:from:reply-to: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=uC4JHriA0CBKe4OgSBxOhsq1bT7TDY8nMHdACrDqoE4=; b=eFqtn9xtfWhXzLo8SrLHoPObf5H9/Sc1AG3+OsRL/0Fag5cRlYllSLedEZglPJrLaoZHgA AXIbUm4twKwh97BA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 33CCD13B37; Wed, 21 Jul 2021 10:53:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 88f5CqH892DIOgAAMHmgww (envelope-from ); Wed, 21 Jul 2021 10:53:21 +0000 Date: Wed, 21 Jul 2021 12:53:19 +0200 From: Joerg Roedel To: "Kirill A. Shutemov" Cc: Mike Rapoport , David Rientjes , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Vlastimil Babka , "Kirill A. Shutemov" , Andi Kleen , Brijesh Singh , Tom Lendacky , Jon Grimm , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , "Kaplan, David" , Varad Gautam , Dario Faggioli , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev Subject: Re: Runtime Memory Validation in Intel-TDX and AMD-SNP Message-ID: References: <20210720173004.ucrliup5o7l3jfq3@box.shutemov.name> <20210721100206.mfldptiwiothowpz@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210721100206.mfldptiwiothowpz@box> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 4A0BA50180CF X-Stat-Signature: wwws5z55883saftgekjrcrbk5fzocubn Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ohxJ5jBG; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=eFqtn9xt; spf=pass (imf01.hostedemail.com: domain of jroedel@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=jroedel@suse.de; dmarc=none X-HE-Tag: 1626864803-738198 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: On Wed, Jul 21, 2021 at 01:02:06PM +0300, Kirill A. Shutemov wrote: > Yeah, we would need to reconstruct the EFI map somehow. Or we can give > most of memory back to the host and accept/validate the memory again after > reboot/kexec. I donno. Invalidating all memory will also take a lot of time (in the range of seconds). And the EFI map can get pretty large when there is enough fragmentation. The easiest way to handle this is to just pass on an up-to-date data structure. Regards, Joerg