Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4862014imw; Tue, 19 Jul 2022 15:00:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlJ/BI/bRYOqmaantEd1cMjy8dmaBeKGXI5KbI7NvtTqKzBzYom09vIDUklE6y69CAKdlc X-Received: by 2002:a05:6a00:181c:b0:52a:bc83:d767 with SMTP id y28-20020a056a00181c00b0052abc83d767mr35108180pfa.76.1658268021398; Tue, 19 Jul 2022 15:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658268021; cv=none; d=google.com; s=arc-20160816; b=gt3Wz1sVhtuxua2i72n/xHGLVgf6xk7M0Z20KVoS1WLlfTgdejVs7KBAwjVbb+vC6b mwB1iq+Lutz5b28X6reuUbrIP8M5kM3bUO+6ST1EuOIAc2/3d19O0KVuYtgR6WT2TKnf 3WRrq6etyX97n6uGy6WinTKZhnUSyvaSRJTZ/m2qgDYBxIZjFwVfnXGmPwSgxq57gE2B QEqcUeWo/tGRzpmRvcMujtBVU8Do+bJN7NPxko/KTZ/asNa1/6pEfTxpTuOErIDtHBA4 tSA6DUvRZFT4hS93Erj+Lp8hlOP6iHxlP989gSPweFiM6R/Bjl2B++Jat98l2JacY6lK DOWg== 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=RiLRSeSrQbdMG2zQCqhnnPnmcRmrvC4CXHKDD5x+nVw=; b=IXkavYka3m6a8QKWGWQynPKCfV+JKb3HDkgxZlP3uvOben7nXND795LE5Yec4dBnaZ vRBUlOdLv9hHz50K1vuZKxUuiZ7NOVcN1at8h3rAoNFnthCB+nehys18tIf+8GsDJX1R bvG7GbjW3b5IW+6xB2PQq8HVVlJn5Hjm/aftPlT2w2N95yGy63oyfbKgOUWmmtsM1FR5 SB8wK2TC1597kSvsaulsDozwZ3KzcmED4uDi4lwlpn0FPN1AowVOPZgk9gcvwLbDOoWn UirU7XJMfOZp+s5iySUpVXFOqgd6Pbow1SmGC6fxHPfz4hlTkyg3RvIEfSbWMMgVX7Jg CTVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hiCRIz2M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 rm12-20020a17090b3ecc00b001e0b16a6bb9si287088pjb.159.2022.07.19.15.00.03; Tue, 19 Jul 2022 15:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=hiCRIz2M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S240620AbiGSVvQ (ORCPT + 99 others); Tue, 19 Jul 2022 17:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240613AbiGSVvI (ORCPT ); Tue, 19 Jul 2022 17:51:08 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E20B56B83; Tue, 19 Jul 2022 14:51:07 -0700 (PDT) Received: from zn.tnic (p200300ea97297609329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:7609:329c:23ff:fea6:a903]) (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 9B7301EC0645; Tue, 19 Jul 2022 23:51:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658267461; 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=RiLRSeSrQbdMG2zQCqhnnPnmcRmrvC4CXHKDD5x+nVw=; b=hiCRIz2M+wi07p91BD9LK8bIexysFg9QoRVs5JmpL35MTXXCvCLiMLaulnJEKVj3fURGNF rHSHSsauaNe8BSd93KjcwtyB5cY3MkeqYoNU7bNOhpex7K0HvwpSXxDwpY6IzywYQSemv9 nLaNM9g+XIpBA/eYS4hizIgojlpANOM= Date: Tue, 19 Jul 2022 23:50:57 +0200 From: Borislav Petkov To: Dave Hansen Cc: Ard Biesheuvel , Dionna Amalie Glaze , "Kirill A. Shutemov" , Peter Gonda , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Mike Rapoport , David Hildenbrand , Marcelo Cerri , tim.gardner@canonical.com, Khalid ElMously , philip.cox@canonical.com, the arch/x86 maintainers , Linux Memory Management List , linux-coco@lists.linux.dev, linux-efi , LKML , "Yao, Jiewen" Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory Message-ID: References: <20220627223808.ihgy3epdx6ofll43@black.fi.intel.com> <20220718172159.4vwjzrfthelovcty@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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-kernel@vger.kernel.org On Tue, Jul 19, 2022 at 02:35:45PM -0700, Dave Hansen wrote: > They're trying to design something that can (forever) handle guests that > might not be able to accept memory. Wait, what? If you can't modify those guests to teach them to accept memory, how do you add TDX or SNP guest support to them? I.e., you need to modify the guests and then you can add memory acceptance. Basically, your point below... > It's based on the idea that *something* needs to assume control and > EFI doesn't have enough information to assume control. > > I wish we didn't need all this complexity, though. > > There are three entities that can influence how much memory is accepted: > > 1. The host > 2. The guest firmware > 3. The guest kernel (or bootloader or something after the firmware) > > This whole thread is about how #2 and #3 talk to each other and make > sure *someone* does it. > > I kinda think we should just take the guest firmware out of the picture. > There are only going to be a few versions of the kernel that can boot > under TDX (or SEV-SNP) and *can't* handle unaccepted memory. It seems a > bit silly to design this whole interface for a few versions of the OS > that TDX folks tell me can't be used anyway. > > I think we should just say if you want to run an OS that doesn't have > unaccepted memory support, you can either: > > 1. Deal with that at the host level configuration > 2. Boot some intermediate thing like a bootloader that does acceptance > before running the stupid^Wunenlightended OS > 3. Live with the 4GB of pre-accepted memory you get with no OS work. > > Yeah, this isn't convenient for some hosts. But, really, this is > preferable to doing an EFI/OS dance until the end of time. Ack. Definitely. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette