Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp630418iog; Fri, 24 Jun 2022 10:32:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vQ6QC8bf9Dbxo+edBrIXToUE3HrPa+Z/KpTI3LoLpQ1A5OMmdzxBKDbFfEoNy0Ti0czQdB X-Received: by 2002:a17:907:97d4:b0:722:e550:7490 with SMTP id js20-20020a17090797d400b00722e5507490mr51335ejc.625.1656091958885; Fri, 24 Jun 2022 10:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656091958; cv=none; d=google.com; s=arc-20160816; b=Y7iUZ9UemB0VWvAcwJ7AAig+MGoqUkQortndBW/O+BQ28xleyaFcmGcxycERbOj33z 7vi5cnvE4Md0n0dFyJ59kYkEPflUysLb/IkG6WQGJ1bwmpPlsFY3/Jn+sWxBvn+6FMqj L2duSY72UZpY51G7kRaRSpRJP7vpvLrFhsJ87rxy/Wy+wTLb9GSakswq3SV7kxJ0llhe jRljaFtBAMB7u8qwnluRTQHdfgQGmJ63R0OBKCZ5R1fkyco7sZ13Y08ZO4M7iExh2Ytw H1hB4Qc2A5X0DeGAu1puqV+C0Y3KWjcsFn7cAlyMyzuR3SV7/u0V7FLN4Vfudjc9nTMx QzsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h7TLEeCFth7PheP9Vjw0eOfwGgWMcwKrKSrdpGrebWY=; b=P7Z/+YhGK3Vsy2XdBN7IaQpkjDeplb0YHM26j2475hmrc7kZgeIvEMiEr7CG9/JkOe 5XpjnnrAA3TLgbtIf8RMBatBdehTlawNCmqhCuqX/WIdFF5080mrLnkQKiocylnF9Pt3 ruRvQnkFcYjI/WOsUTFkXAOGXFOKIhBY9x5K5pCxan4KwhbXedQn+TDle2u4c9lj4msI Yn1OPisSyKJkABqTX5eR5OBiOLbJ3sb5ovcgR1uT5n4746K5b0zyn3/F4SToIpPUS+Xw 7MfIBJZWmkGcn5PM0IDN05ErWqpAmluAD0N1QKXY0XU1jLLjZszo0pLjjVzv1OqBYzko p0Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IU3rG809; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i27-20020a170906265b00b006f3b5fbc9easi2762037ejc.904.2022.06.24.10.31.59; Fri, 24 Jun 2022 10:32:38 -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=@google.com header.s=20210112 header.b=IU3rG809; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231584AbiFXRQL (ORCPT + 99 others); Fri, 24 Jun 2022 13:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbiFXRQI (ORCPT ); Fri, 24 Jun 2022 13:16:08 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FDEC6479F for ; Fri, 24 Jun 2022 10:16:07 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id c30so3460634ljr.9 for ; Fri, 24 Jun 2022 10:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h7TLEeCFth7PheP9Vjw0eOfwGgWMcwKrKSrdpGrebWY=; b=IU3rG809nvHZOZvyEcynZb5cx8uhkr0QKQGEbHpM7aM3INwbrTUi+sJoYs+poBe5yp SUxlrL0gk2U5l9Tl1uRgX2Nvd+9OoDaDB+rrpLWMA0+YwmNGiX1IXzrNmkjxDMe9VIPF DJpA0UjxRjtbScKgaEKHhW7ppvN09yvXNsrNVzUhjEdkni1H9IjXu4Cqtxh2Dm8+7aRH LmaYAiHtbI1K235l7U6bwe38YtQjXSw1g0zhcNTQaALYl2nxJaEA70C6ZTI3HaFVPIiB 80IC0gWVvBSre5Xp3FBbIEwP1uT9dAn+VU8gMLbLK3/QoV2/fGqIq9mRE892Iuk4TWZS FE2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h7TLEeCFth7PheP9Vjw0eOfwGgWMcwKrKSrdpGrebWY=; b=K8afjNKUwLP/gsulAISCsVQlchZZgUXAt54aNCKZ4qYprZTQXYRhtAPun/yGPQeLpK hj3YgNk+uhvgJ368Z9BnIPbfex1moCLcyaM6QOYFu6XGqnwqGvCVzUhfZklHpTrwk3lm bkYnx7+J02PRQoB0lYkfbXuAykfJShH3Wnxt2YaKfPmmSuFlB8oPoQ1LU1aIPFeG+VPY Sjp9Vb+m2YAu//OoDFeU0swkp2MWu+zCx1rVoHP5iSY4wEWNJ9/14a+ovr5rAGdENytE 84/OkvhtZLIh5wx8XaonU0+a1oTXSaZfYR+QjpA57MGSynol+w7SBAyBfi2rnGFTT69n rogw== X-Gm-Message-State: AJIora8K+KsfIlUY9DqHxpc39Vxdz3m4wFGSydYlOEPhaKCqXxkEF5hE bb0+YwSmkk/kcpLbw0HP483q59p3MDBpjFa9gewf6g== X-Received: by 2002:a2e:b911:0:b0:25a:9942:4171 with SMTP id b17-20020a2eb911000000b0025a99424171mr9602ljb.426.1656090965474; Fri, 24 Jun 2022 10:16:05 -0700 (PDT) MIME-Version: 1.0 References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <5af19000-4482-7eb9-f158-0a461891f087@intel.com> In-Reply-To: From: Peter Gonda Date: Fri, 24 Jun 2022 11:15:53 -0600 Message-ID: Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory To: Dave Hansen Cc: Marc Orr , "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , 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 , tim.gardner@canonical.com, Khalid ElMously , philip.cox@canonical.com, "the arch/x86 maintainers" , linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 >> > Peter, is your enter key broken? You seem to be typing all your text in >> > a single unreadable paragraph. Sorry I will try to format better in the future. >> > You're saying that firmware basically has two choices: >> > 1. Accept all the memory up front and boot slowly, but reliably >> > 2. Use thus "unaccepted memory" mechanism, boot fast, but risk that the >> > VM loses a bunch of memory. That's right. Given that the first round of SNP guest patches are in but this work to support unaccepted memory for SNP is not we assume we will have distros that support SNP without this "unaccepted memory" feature. On Fri, Jun 24, 2022 at 11:10 AM Dave Hansen wrote: > > On 6/24/22 10:06, Marc Orr wrote: > > I think Peter's point is a little more nuanced than that. Once lazy > > accept goes into the guest firmware -- without the feature negotiation > > that Peter is suggesting -- cloud providers now have a bookkeeping > > problem. Which images have kernels that can boot from a guest firmware > > that doesn't pre-validate all the guest memory? > > Hold on a sec though... > > Is this a matter of > > can boot from a guest firmware that doesn't pre-validate all the > guest memory? > > or > > can boot from a guest firmware that doesn't pre-validate all the > guest memory ... with access to all of that guest's RAM? > > In other words, are we talking about "fails to boot" or "can't see all > the RAM"? > Yes, I'm sorry I was mistaken. If FW uses unaccepted memory but the kernel doesn't support it the VM should still boot but will fail to utilize all of its given RAM. >> > If the customer screws up, they lose a bunch of the RAM they paid for. >> > That seems like a rather self-correcting problem to me. Providing customers with an easy to use product is a problem for us the cloud provider, encoding foot-guns doesn't sound like what's best for the user here. I wanted to bring this up here since it seems like a problem most vendors/users of SNP and TDX would run into. We can of course figure this out internally if no one else sees this as an issue.