Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp972073rwb; Thu, 22 Sep 2022 08:33:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4rp3xOjHxWVYM2klccj7KkxMjmwTkT1ULfkAe7+XHN8WdjV9E8l6vQMy9U+lfpyJnvLzxw X-Received: by 2002:a17:902:ef45:b0:179:b9fb:c6f1 with SMTP id e5-20020a170902ef4500b00179b9fbc6f1mr2232657plx.109.1663860801113; Thu, 22 Sep 2022 08:33:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663860801; cv=pass; d=google.com; s=arc-20160816; b=bx/O7y/xZGpRtpkvou7mUMd8O5YKhz1QaBtmYT45vhhtV1TI1qurWeL7g8eZ6YTIQ5 8KOeCRmfMmGcQdfIb49IX11RBnTF4kcXmvlOnyk6NzOtgDakR7y5sF0ZxNTaTvuNU9nM w20m5YQr+EW3YwIAkwgye6F925tG9lwOEM6FA5W+nG3QrpBTcO9lAASFOnR+LI2Udy23 wP1eh6cl/Sb1zrl8Ehn64k81E8oWuq8U14WLNshlKeesG6no+MapOZcaBV7doRKswn3K qUW2zvAWcQlWeo3ExJe+yB3J92btEdr5vx72s6/+EHWkzMKpONa80LbjaVMHDApKrmXW 41GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=ESZz7ql9Qw6mAXz9znaWhUcp4oNiuvMOS83VKJba+rY=; b=HNHgjx2+IIYhZL0RtrztJnTOw05NKuQdmmNaAn5op+9Yrcn+oXJ0OGQULSEcMJcXZv VI3cnE2znPvU3e3zKl+2ormTmWmBakVk6orEozIXj8teNAyiL/gbxBaWECydhMlx53tT VQreJ58+8zwdIqBVes7kqTZHnsj8ToraXJ7NEltiIGd/MCZ9yE+vwtj++2p52So7Ur5a MUeowuujfPI3mp/LP4FWIkhldfksrpmgqFX0HJe+qJ4d5Jdgvfd7o+mXOczMpfKxGvop LKu912gcjfU52pzTwMYp4l6atM+dJMX0r94tUikVGBe74iX4VtF/Tt4IwFkOVQbNcH0l uYpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=hUTW4KN0; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170903228e00b00176a0d8780csi149588plh.285.2022.09.22.08.33.06; Thu, 22 Sep 2022 08:33: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=@amd.com header.s=selector1 header.b=hUTW4KN0; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231319AbiIVObY (ORCPT + 99 others); Thu, 22 Sep 2022 10:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbiIVObU (ORCPT ); Thu, 22 Sep 2022 10:31:20 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2072.outbound.protection.outlook.com [40.107.100.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BC88F3F80; Thu, 22 Sep 2022 07:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jt5QyHTzYVXe4m1IAaj9y0SUOGbdxKyBP/wFfhMMp6b46sXuDhvvipON/CWJXLw9mnVXlssL0nhksQorgrIoDeCNeBJ0VWRvTF6mlKk2N1NttvJJSDMRn/Fw++5xSTD3zt9CFcBnFvMzaCR7rg7+7dzVfwwrbglFk6stcL28ns4dJv2H27voki/ufOYfewPZm7uWW386pjZ5oKgUBWXAbKVzYo/9LAEUCM1uoHKbY8I2NxhhsOLMZTpI+W44QfGwfP8pNJJ3aRGx5WWkrD6aW3h+ap60XOZFvRJ47U8y2DcmniU3D03sOLysubAQ59VlAHlMeu5VR8FB7/LKxaiABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ESZz7ql9Qw6mAXz9znaWhUcp4oNiuvMOS83VKJba+rY=; b=mFlnUHu4Plg3jlPChT5R7qlF8omlMPtO27W5cqbzqYMKUo5T6HGtOHdahIIKd4Mz+2mGgRLp6ZN08txljsgPen0Qg2asNt/WjsztvE7ZUfxqHlg053XCS4T6kpRSprU6heoJbnTmJYNOq+TiE1/YjP408F85K/Q4qEuvETQD5tJgyIvCensZSI/DJwr4r4aNZ3qMEHKN/LcRdjFcTW1CFqQFUhEpxRcYRfLpfOr5RWjaFPjOBEC3ihUJlT94WoL+NoNcSZPfAoz0csN1LKW30yCjMyBIawIpWhtC0yLRuFAbTQzK1U/c/as97cpSRNMlbPoyVKjcXO7xOE8yadewUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ESZz7ql9Qw6mAXz9znaWhUcp4oNiuvMOS83VKJba+rY=; b=hUTW4KN0nnE8mFcl/9LdiaA4Hs2ekVl20QsDTEC1SEgy7HDlWAvqCTcNooQ0oHbOQoemjSPC8FfhgxSuxTY072bl15xtPlSikjWN/bTXxbv1tn64LpzJt7G/dfnWPczOIXuy1AzDaJlcwPGXFFN5wGD1TQC9KbcN1XZqJ0QrOIY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by DM4PR12MB5819.namprd12.prod.outlook.com (2603:10b6:8:63::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Thu, 22 Sep 2022 14:31:16 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::c175:4c:c0d:1396]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::c175:4c:c0d:1396%4]) with mapi id 15.20.5654.019; Thu, 22 Sep 2022 14:31:16 +0000 Message-ID: Date: Thu, 22 Sep 2022 09:31:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory Content-Language: en-US To: Dionna Amalie Glaze , "Kirill A. Shutemov" Cc: Dave Hansen , Mel Gorman , Vlastimil Babka , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , 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 , Mike Rapoport References: <20220614120231.48165-3-kirill.shutemov@linux.intel.com> <8cf143e7-2b62-1a1e-de84-e3dcc6c027a4@suse.cz> <20220810141959.ictqchz7josyd7pt@techsingularity.net> <2981e25e-9cda-518a-9750-b8694f2356b5@amd.com> <984e07ed-914f-93ca-a141-3fc8677878e0@intel.com> From: Tom Lendacky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA0PR11CA0048.namprd11.prod.outlook.com (2603:10b6:806:d0::23) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|DM4PR12MB5819:EE_ X-MS-Office365-Filtering-Correlation-Id: 5864a4ec-a94b-4eda-15e3-08da9ca71b93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dKxAsqRKmFJQ0hEUTQw3lNz0hi2W1Tq3hnrtD6K+1hQWD3PT6uRyRWpK6dc2MQ5hnEScKvoNBdsgRz2X8HDkAaXQrHTD4WL0vC2XJ6euDmPKZ4UDjPxTnBwQ/kuAMIqE23zzuw7jZ9C9kJKBbvUnux6YfIlRHVG2fjfi/azOpPBwaZmGgZ51oYQEokbKmxh5nZsQ2v6dJwkbNlQGohes48p+XdFaVqj2O2OUNPStZiliixYGSZkFAaaMWAerm8nzVlGn63FIaf9ooQwUizWrXTovEH137fiK0IbxSHTLg1qGrDGJBbpMaLCznnTz82NudfGjKpQhXd5g3QEhRDo1tityJz7a2/9pYr9bCXS9oyaAef/XREQReJj6jR8PUbF3Rs3EFsx6VcAZczDtG+KXwrHwt/KJXwxqSym5ZJ/SeqGmKbEyZzb5OIfZoMUmySVGioQnsj/1Ke3TqdHBYWId/Ill8gahBoFBABqUT9grFS65q8lMGKBz8gtthN61t/wsXI+tQ5WBNJpi0QDcJ/udIO/EUM0FupqbRAPboi5tzYE44PtC6wf2kk7Zsgag816b/UcgnYTs+64VrjGzJrAX3RRZ2eX4SzgIPgCcXHlCyrcYwXgX59E6xBGVGQ7hXSq2u8C/tNNA/8cxS9sK7RbngU/HBEFKISaMyVLHRYKFpfoDNvH495lM9auS1gdt+alrIaEGFD80UI1oieWgOVkKXuQqyzUD0DOg+tXFED5pO4Krl4LZhHw7qpSsgcEQ+PfA0acP0mKextdJ3/46I1jfbVVeMIp4SQn1Bln6XSBGtXc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(366004)(376002)(396003)(451199015)(86362001)(41300700001)(66556008)(5660300002)(54906003)(38100700002)(31696002)(8676002)(316002)(110136005)(7406005)(8936002)(66476007)(36756003)(4326008)(2906002)(66946007)(7416002)(6512007)(26005)(53546011)(6666004)(6506007)(2616005)(31686004)(83380400001)(6486002)(478600001)(186003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Szhzc2I1MmdiZi9Rd29GaHRqRDI0K2xTMzNQV1MxODFLTWVub1ZWVTFSdnFY?= =?utf-8?B?TmdtemEycjlqMmhhcXJDa3UwWEYwWEFONmM2c3lWb1F2OVVPWnlpYXZFTXhV?= =?utf-8?B?NjhXcnQySStHSGFrQmF6QmZQOGRrcENBY3pRL0VYV1h6VzAxSkhUVlFDek1s?= =?utf-8?B?UHZuNm9QNlhVSTMzcVl6Qj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GRFVpRWNvbXFidTVLQXFCbElnL3hjNlYveUpub29oSlJOUmRhS2tv?= =?utf-8?B?c2pwM280N2F5RzVvS3RjcHkyY1RmUzA4eW9kZUVpK0RyTlhuWE1zN1liMnlo?= =?utf-8?Q?DrI+c/pwQtgkSa8AD+5i1LcrA?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5864a4ec-a94b-4eda-15e3-08da9ca71b93 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 14:31:16.4629 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gH71Y7hMTqHifGHJMVppPsihNEBh3/lm+LYljJ2sTXpL/Jxfrnjk12mSCMrhg9sQ/QfFOZnWX88Hj5sjx6hEMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5819 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 9/8/22 14:28, Mike Rapoport wrote: > On Thu, Sep 08, 2022 at 09:23:07AM -0700, Dionna Amalie Glaze wrote: >>> >>> Looks like the first access to the memory map fails, although I think >>> it's not in INIT_LIST_HEAD() but rather in init_page_count(). >>> >>> I'd start with making sure that page_alloc::memmap_alloc() actually returns >>> accepted memory. If you build kernel with CONFIG_DEBUG_VM=y the memory map >>> will poisoned in this function, so my guess is it'd crash there. >>> >> >> That's a wonderful hint, thank you! I did not run this test >> CONFIG_DEBUG_VM set, but you think it's possible it could still be >> here? > > It depends on how you configured your kernel. Say, defconfig does not set > it. > I also hit the issue at 256GB. My config is using CONFIG_SPARSEMEM_VMEMMAP and fails in memmap_init_range() when attempting to add the first PFN. It looks like the underlying page that is backing the vmemmap has not been accepted (I receive a #VC 0x404 => page not validated). Kirill, is this a path that you've looked at? It would appear that somewhere in the vmemmap_populate_hugepages() path, some memory acceptance needs to be done for the pages that are used to back vmemmap. I'm not very familiar with this code, so I'm not sure why everything works for a guest with 255GB of memory, but then fails for a guest with 256GB of memory. Thanks, Tom