Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4742122imw; Tue, 19 Jul 2022 12:20:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vh1/mjBFqg9NDS/hMwhXrpK9S5zyskHZZ8rc0IUTUxlk7870hfqw27xl1LBN9iEtTPjjRv X-Received: by 2002:a65:6e93:0:b0:419:acad:f06b with SMTP id bm19-20020a656e93000000b00419acadf06bmr26296594pgb.68.1658258416022; Tue, 19 Jul 2022 12:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658258416; cv=none; d=google.com; s=arc-20160816; b=kuUBDXBpmVWrOEOVHRTn9xXzbckNhtNcvMaWJJOb+eHLOF9Ml98tcixtUz1LGL2I56 ljERTgmhXPvBRYinopG+wgUKRcI/Zdu5DIdiE+WndI1WC0fGOGYZKf0oBTAClNBwlueO lgX5MHhPrJspow8XbPGQHY0hGCj34Tv3IWlz9+JSXiq0tsVf2Q2yFQXzNmoi58QluF7g dbbE/zxttoKMJ62w9SP8Y203eLI2RDptPKm+KB5iSijZDjVH3LB1nIWp6EEPylJk33tn UawSvhQDMxjJVg5Ci4KyDTJpjSukEgSDX/64aknOYZnSJoiksUuLNrkLN4oQb5eL1wEO OE8A== 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=unVD5D8mS78cV9OKwyoa/aVTA3h/WCQeocLsIDcTU88=; b=EM3rWrmAQX51nEE1mft7Mv3PM/qwtx1uNxrbGHXxufxMyloj+pLJCvDi5yJZNJBU6o 4GmVTydR9SxjtsRoCIugaBHM5ehxUYUMODZXKHjayas0lmelpKk118YKtd+VaJW+M4PH 25wVga++O4MHtZY8w0+kHEn4VMvSRvO5DrQmWOESgjxtPo3eSnJy7Hxt9/gRfFlyt7bh f8lb9amj07F6fS6iJMwJUu4rKrlY3pUv8LHwzAGYYAIDA8XDYGqCBTcdjWh4qaH0LFBx gdGNOyFS7BIbx1qXz2TvZdgiVsSnhd4PTlPPSujRxnoQ5mqAEJROWqZxZU3qauublhoA j0qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rlMp77yo; 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 u9-20020a056a00158900b00525281e4ce6si4825141pfk.223.2022.07.19.12.20.01; Tue, 19 Jul 2022 12:20:16 -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=rlMp77yo; 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 S239940AbiGSS3q (ORCPT + 99 others); Tue, 19 Jul 2022 14:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237135AbiGSS3p (ORCPT ); Tue, 19 Jul 2022 14:29:45 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C350F45F4B for ; Tue, 19 Jul 2022 11:29:44 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-31e0d4ad6caso89759417b3.10 for ; Tue, 19 Jul 2022 11:29:44 -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=unVD5D8mS78cV9OKwyoa/aVTA3h/WCQeocLsIDcTU88=; b=rlMp77yoX+jT3kAt/7isGFNXeCnY0JRyS/SjLKC2TnslQLVrLpBU/diTiP/scVZ0nm q0bRaxcxP+Mw3rUeQJBRKBfqgUMpNSg3XvWlFlKvNVo1/RWzse/NtMZbHyTEyqasjVrE ZGBNQ1hsyidPWe5J3G/PRh3S45vmu9vyEYflq5nKzjNotlQ8A60EN+KadQHUJNKaMI5m RdH1zhZgjsxuejJO+HqHon93uFWcbZQH4s/hWG3Ziu2e73+SNwGoDAinIVeqRl2NiP6h ytUAXES0ePRtPCBE+XQbyBq5Yeg+Oos35Ho7JkeaArhRDyQ8KKTXOQ39iSfbw2ATJHZw t72w== 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=unVD5D8mS78cV9OKwyoa/aVTA3h/WCQeocLsIDcTU88=; b=Unb6B+8Ism/X17bFoDWG9zFDBj1NEKgtyOxcy+pQ4jPht9duzdSFnfLKEwxjBwe6eb do/x027ibh0MvE2yQ/R3KmSsCe3hV29id8ZeZoxZonfr9W+UX1BawxsmTSHwf21QhbWZ 4nKAUcbRftg7KW13IVqbSkQQcEvewzam6wSA4Sx/KDvuMzyVRGgBVtgpQLbGowuAcdLO UQt5L/Bjx0jk5cR1wKO7Nc9NLQVoRavNzJOZEdSOWvdYrrw3ZkN39ugBDrBNOw8g/JgE Qy/hnJwGGTcdlLtUl7Qj5jEKh96adq63TAqnn05vHU8KNRnkug5GKPNbsTf4ZphuRHkL a2tA== X-Gm-Message-State: AJIora85yGVOvR/69ApDB3iTl8sTAf4kyHjM6mWjanFBQRRIdvP6BQUl PEA1bNklndsM5qk9b2xgbw1MNRTXRGvCYPhK8XuNhg== X-Received: by 2002:a81:a1ca:0:b0:31e:58d4:e724 with SMTP id y193-20020a81a1ca000000b0031e58d4e724mr5943209ywg.486.1658255383950; Tue, 19 Jul 2022 11:29:43 -0700 (PDT) MIME-Version: 1.0 References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220627113019.3q62luiay7izhehr@black.fi.intel.com> <20220627122230.7eetepoufd5w3lxd@black.fi.intel.com> <20220627223808.ihgy3epdx6ofll43@black.fi.intel.com> <20220718172159.4vwjzrfthelovcty@black.fi.intel.com> In-Reply-To: From: Dionna Amalie Glaze Date: Tue, 19 Jul 2022 11:29:32 -0700 Message-ID: Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory To: "Kirill A. Shutemov" Cc: Ard Biesheuvel , Peter Gonda , Borislav Petkov , 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 , Dave Hansen , 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" 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, 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 > > > I think we should make it obvious from a kernel image if it supports > > > unaccepted memory (with UTS_VERSION or other way). > > > > > Something I didn't address in my previous email: how would the UEFI > know where the kernel is to parse this UTS_VERSION out when it's > booting a bootloader before Linux gets booted? > How about instead of the limited resource of UTS_VERSION, we add a SETUP_BOOT_FEATURES enum for setup_data in the boot header? That would be easier to parse out and more extensible in the future. https://www.kernel.org/doc/html/latest/x86/boot.html?highlight=boot This can contain a bitmap of a number of features that we currently need manual tagging for, such as SEV guest support, SEV-SNP guest support, TDX guest support, and (CONFIG_UNACCEPTED_MEMORY, TDX) or (CONFIG_UNACCEPTED_MEMORY, SEV-SNP). The VMM, UEFI, or boot loader can read these from the images/kernels and have the appropriate behavior. -- -Dionna Glaze, PhD (she/her)