Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1087131rwe; Thu, 25 Aug 2022 15:21:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6vcOT8cB5HFipjg2UbFdnWVHOUjMw3vsOAY3YAG9Mo2yZSG4cY63X+PzTfiARdoQzsw22f X-Received: by 2002:a05:6a00:23c1:b0:52e:28f5:4e13 with SMTP id g1-20020a056a0023c100b0052e28f54e13mr1075417pfc.20.1661466101775; Thu, 25 Aug 2022 15:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661466101; cv=none; d=google.com; s=arc-20160816; b=g2miDVA2CkEwTCakYFUMrAavDgw5FspnDIAmnolPss2wXQAfhZOat4sRVY3JLtguuU Iumd5Zxyt0IQkbx2dVs29Nd2M2ZKFSKzEfhUKKdAVfdj86EnzaBJdPkrlUv3rM/r4GnY e2d8tCAKJSnXvAT6Ca9n98V3nRtSz67bPxdF2lgKVk+14uyGfGOHqdGwXWaV53dr37zv MD7qJD1kTOh5rLGF/fQyYNGDV7UFYAFjoeK/HuyUcvD2ehv6pqBMj1vIfWMA/CbxTViu U/TQp9kdOhJ2sm4TIh9y/RW5hD+XtExSWPZsCxk24PX+oJCYcK5xEBvXzCZVwobBd6IS epnA== 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=SB92LtmoHMRtHt7Hl06TY3zfz9SgbeIY+18JgkEA/Kw=; b=UfV9Jqb40z7QeJdcJrW3JeKqZE+ntDMM/+YrhqrTJ8mRUYR2XDT6olqNUps0hwTKQS i+3Z5psxy+H+TsPd4XrTSk+UPgtItUkLncOPcYqQcFdnfgPA8asi6Im26T+i2dKTYy3a 7ywVJaHWeeG0WPGn/MAbK+O+PoHN4wesG5vh8+KkIkZnDw4o6VKV8h/WqN7CeBWzMqVw 8UDKMlVMH5KNh9+rMoaB+PJ8JlkX+K3jEZexvaRg30POhMlZdd3tMqrDmCrghKj7K5Xv skLW59kckL8bWke37afDN3/aEoOUwYk676kE5JD38n6leWmc0afRTfMSMCJOQ9HuKuPo 0onA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rxBaX9Gt; 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 m63-20020a632642000000b0042b4018450dsi201459pgm.742.2022.08.25.15.21.29; Thu, 25 Aug 2022 15:21:41 -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=rxBaX9Gt; 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 S244289AbiHYWLU (ORCPT + 99 others); Thu, 25 Aug 2022 18:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244296AbiHYWLJ (ORCPT ); Thu, 25 Aug 2022 18:11:09 -0400 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BCB15AA2F for ; Thu, 25 Aug 2022 15:11:04 -0700 (PDT) Received: by mail-vs1-xe2c.google.com with SMTP id m66so22218370vsm.12 for ; Thu, 25 Aug 2022 15:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=SB92LtmoHMRtHt7Hl06TY3zfz9SgbeIY+18JgkEA/Kw=; b=rxBaX9GtAHIyCKVT9OlFJ5ELgjONaqWbswYyMmc0IpaFpMhlOiy8LOLvUjFu4eG0l+ VSSV8gc74fFwX77LQutccYWVx/2ShLo56Qjw3siRY7DJrg5ujWfL+S4qzDfHpqtXI6cM xpGhTDNIsT5EHPk4igSj/Jty+CpW/bPi9mvrVp0FGuJ1Ug82zxj5uK+zCInjSbujRGCH 9+L3rFES95GOmEJgHVu9xQHLYBYSxpkAbbh17AVdbctP3VplwNAlG/PN0kSBbPA5WJHp HfsenyXKBo1/dJoQfQUDkut9q/v0KXUdvOUBHnD9Q14TiQ7oezOtiMKI8aUKgxZDuRS4 IceQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=SB92LtmoHMRtHt7Hl06TY3zfz9SgbeIY+18JgkEA/Kw=; b=wnTXLYpd8WJarzuXN4gZi8xsDVyjyZKRdB+65O57Moykq+vtJePXkm5LiLZ7GXh+kw Oqi+dnk55Rn07bTG22JKBU99aSGxk3BzQ4ELXwBzpBJvEGPyZA9lr+PLMg347/4fv/pM utP2M0mUocLPXQcmFqRbImx4R6/SNM1s6KPEs+YmgqQCaPbx6KevYdrj7PJAOQC6BL/X 7UfOVcwlhYOsCsUBc/sfsf3fES1dlvLrska6CobvYw+5HJwipQvt2ZGkieWpN9SIrI5i GYGY1eZocfEO43qVtWdmzbcS2vB3cCQQ6/89yn/dGXu3xeErHshp6W5qvts6z4VOnWz0 FEPg== X-Gm-Message-State: ACgBeo2DQWxLe19g899Tyozr4W71HyrXpSwVhGHyn2MpLDH1VZ2QGaUl z5sIvMqTBIZ1Oww7CNZnbAmFXLvlgT9OORWvaHq5mOqrQJiAhg== X-Received: by 2002:a67:e089:0:b0:390:465e:aacb with SMTP id f9-20020a67e089000000b00390465eaacbmr2462660vsl.4.1661465463579; Thu, 25 Aug 2022 15:11:03 -0700 (PDT) MIME-Version: 1.0 References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> In-Reply-To: From: Dionna Amalie Glaze Date: Thu, 25 Aug 2022 15:10:52 -0700 Message-ID: Subject: Re: [PATCH v4 4/4] x86/sev: Add SNP-specific unaccepted memory support To: Tom Lendacky Cc: LKML , "the arch/x86 maintainers" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "Kirill A. Shutemov" , "H. Peter Anvin" , Michael Roth , Joerg Roedel , Andy Lutomirski , Peter Zijlstra 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=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 > > Add SNP-specific hooks to the unaccepted memory support in the boot > path (__accept_memory()) and the core kernel (accept_memory()) in order > to support booting SNP guests when unaccepted memory is present. Without > this support, SNP guests will fail to boot and/or panic() when unaccepted > memory is present in the EFI memory map. > > The process of accepting memory under SNP involves invoking the hypervisor > to perform a page state change for the page to private memory and then > issuing a PVALIDATE instruction to accept the page. Thanks for this update! Tests show the boot performance shaves off a good few seconds over eager acceptance, and it'll get better when we have on-demand pinning. The uncaught #VC exception is still there for 256GB machines and larger though. -- -Dionna Glaze, PhD (she/her)