Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1762427rwb; Fri, 23 Sep 2022 18:53:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FC5tu9Ciq9BQgU8YgDYG1q6qx9QxuqW8IVqtDGE5s3vOmlaEVHOyRr8V6uHgS5TFzUa8J X-Received: by 2002:a62:1b8f:0:b0:54b:8114:e762 with SMTP id b137-20020a621b8f000000b0054b8114e762mr12084283pfb.7.1663984387174; Fri, 23 Sep 2022 18:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663984387; cv=none; d=google.com; s=arc-20160816; b=DZ7Aem9VXv7qjC+4zgwTrqradZ85Lp3lXSNn9TWSIFOqOhZnJyvwtDbPOkeRmJtoEe vn83VQfLoxK2xgmXWOdwuXF2JZLbvJ/uWH24iLCpx2isSWnkwhUCGlHdckDjk8SOK2nl ad35sCZq+zlYYU1GQoRPG/PpxxF/+XPVj95zN5b2qJLCWOyg+C745uKDUc78XMP+HGVu eD7Cy/ZUIFPM3kpqHHejv21Y7RscNkPtbqLmx/nXKebvRKH1JXAcRvOl9pJJHn1PpW8L ZFEb5C8j9+AJjPTxZo5obS5a/w9oA+tWhjVuVwIk+D2ABVhSlYtFpYjGnu3HMwc+eScN ZdIQ== 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=ERlYUTFsGGbF32his8Sdm42kgbDyZEWHSO3kDITKOZY=; b=YStkCCFmNdO9BmTrmqpE9P+gShfvpaPDQwUEFbebYNlND1KcywCLcyOKiFxui8xhly HrRuCBaCJEuozSIKBVMo9BI8uqWks3qsN6SMA5KtAlqYcxSE0nLIqUes+pLaNpyYmRh/ hOY9J85NXd0Aj+9u4nWItEv3PmumOe5r7FlyC6uWUTjyyDGhkVp97Iuni425qS2pFQ// pn6NZ1oiTU+RFsPj5Ym25r9bhoKMAff3CNnqmATXWWUE4GhcWN2jGEEyyZ443Z4eojuf 6qT6dP2BH8XPATIDg4020S1f6t77SXMnVSMOI4Dxe+pqLXcoYX3S235wFPZz6I9er05D K/0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IaK6lJuB; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a170902ccc100b001714853e501si4385628ple.76.2022.09.23.18.52.35; Fri, 23 Sep 2022 18:53:07 -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=@intel.com header.s=Intel header.b=IaK6lJuB; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232553AbiIXBDQ (ORCPT + 99 others); Fri, 23 Sep 2022 21:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbiIXBDN (ORCPT ); Fri, 23 Sep 2022 21:03:13 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6EA124C0B; Fri, 23 Sep 2022 18:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663981392; x=1695517392; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OBLqHu4HrfxZrshSMCaixAcofJF9yzq0ARl2qAoeSc8=; b=IaK6lJuBlyv1yFE6WKSNewwcNklMZOU+dDbn+dyJsIze8u33GW0q3cnt 44yGqHSrd2FlotsJ8glsAE1aFPzAmMH7PijkOXC+4VH9EUtiXQe2FHFJi d7NitaJ4nkDzv8yfTQxAOBatp3Ek1oIIJietz8qtIY2tbBS+2arZJM1cB TnNpN9syFusVk9SlZZicvUNU5p5U5DZpr6oHleX6xq23ywyX/P7RjH1q0 HeLIOxIqB205ycw4zwYTu/8flQgiN82Y6y8jrlGqMNRT9wIScuARTqBKD A/PFCIGx5XYOI++QxU/sjcdcInC6Ut9IiWmMGLnu8xHhHtCrB8iqsEc7B Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="301620728" X-IronPort-AV: E=Sophos;i="5.93,340,1654585200"; d="scan'208";a="301620728" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 18:03:11 -0700 X-IronPort-AV: E=Sophos;i="5.93,340,1654585200"; d="scan'208";a="724350159" Received: from pameiner-mobl2.amr.corp.intel.com (HELO box.shutemov.name) ([10.252.58.236]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 18:03:05 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id D7FE51028F1; Sat, 24 Sep 2022 04:03:02 +0300 (+03) Date: Sat, 24 Sep 2022 04:03:02 +0300 From: "Kirill A. Shutemov" To: Tom Lendacky Cc: Dionna Amalie Glaze , 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 Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory Message-ID: <20220924010302.bwas4zbro37rrxai@box.shutemov.name> References: <20220810141959.ictqchz7josyd7pt@techsingularity.net> <2981e25e-9cda-518a-9750-b8694f2356b5@amd.com> <984e07ed-914f-93ca-a141-3fc8677878e0@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Thu, Sep 22, 2022 at 09:31:12AM -0500, Tom Lendacky wrote: > 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. Hm. I don't have machine that large at hands at the moment. And I have not looked at the codepath before. I will try to look into the issue. -- Kiryl Shutsemau / Kirill A. Shutemov