Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3334214rwe; Mon, 29 Aug 2022 09:39:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR7OXdPrjZW0MeRLQyvU9rejEcDRBkVgrcNq0/Np7QgGLnnlhNnlUJ9XBc2RnaQehEDoH85D X-Received: by 2002:a17:902:ba8e:b0:172:ddb9:fe45 with SMTP id k14-20020a170902ba8e00b00172ddb9fe45mr16723717pls.86.1661791167702; Mon, 29 Aug 2022 09:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661791167; cv=none; d=google.com; s=arc-20160816; b=Y7l8JurbD7CYOM7xDik6vxLvrFL5mzfgVd57gjRTRevNcRW1zsUtG8puo41lWqg+x2 C1HyEFAmgue+s36H+SAdljGFqTLCcn1tRbd8+qM0NLW42BISpUtZLJXf9TvNL6mbOpvA RhZ7jf6NPckB2n9TnGuWq53VaT2Ci4aGZ+ceIg257UtYogi/hxaoJYizzRXuQ2u+DccZ 1lmuCUPAhhgZRh+hju/v5SDC8yV6m2jPlnOrR33pUFtW4RlxeK36CSnP053rpl1efGfc NwomhodomNRN00RtzIDFpAYap5d/A07KNh5m7TO8wHbBn1oGHmgQkQBnM1fRbaDDEJEG +OCA== 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=8Usi9Hh1KvrJmXEusctcdOFszMM7+qvg9UBwUxClRh0=; b=snSyP4Loh9TQ5AohRG4RMZDRVjrlGbqJ5gmvCU150XChV7urw9jysPPbfZrIeFcTrm DQ51id8fAneL4uPJamVeNOvk7ZDbJv5Tkaz2ENRhVcfEYbtNr2c37l0GE8hhgJT5/dTN rA7GT2MX/EJ7NAicgcTCiEpM9hPafdmrlVICqRTZCgGUtfKQP87NSMUSWrO9m00Zr01N o4pvLuKCnbwSMThhQ3Gf+jDJHuvLEjf4EG2UMXel5/Ja4aZcNajOlP/1gd8lLauBqtpp RRkNZ8pZXlJg1ymRhGWXAf17GwXhZg9NNiZD748ATbbnDcaG9tX8THLEyJkPycTzZGPc 7XPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="P63R/tJ1"; 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 kb12-20020a17090ae7cc00b001fb541989c6si11766838pjb.168.2022.08.29.09.39.15; Mon, 29 Aug 2022 09:39:27 -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="P63R/tJ1"; 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 S229981AbiH2QDA (ORCPT + 99 others); Mon, 29 Aug 2022 12:03:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiH2QC5 (ORCPT ); Mon, 29 Aug 2022 12:02:57 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2A1589925 for ; Mon, 29 Aug 2022 09:02:55 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-32a09b909f6so207991607b3.0 for ; Mon, 29 Aug 2022 09:02:55 -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=8Usi9Hh1KvrJmXEusctcdOFszMM7+qvg9UBwUxClRh0=; b=P63R/tJ1/yc2xe/SYPTrGdLCylhF8Yq/+kzrso3A2VDilTv0adUYIPWvD/PV8NImJF rvP+8ZABp8nUF1fbgcAf4+5O5JPVD7egARXdeRN7M8thmFgzEEcGdam2RaoZaz7SHCPi Ws92dnROdr+EUTrMzw6dPkZFbmHzFWZP6l+r1gQDVO3qkwLPGfevPjuOb+We6iXKTDYl tNpS+apxMlkRoa1XuSVaEByTnXLeRgx4OwVpM1JcBEi/X1wA0qYpX2cVMjcn39Q+NLDe OQeCLFZ+h7GW6hFG2icL9huyDGj4Dzmm6aqgWJYXAz1DCtPWiMwXFxvyVjtCuC4p+lge NjuA== 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=8Usi9Hh1KvrJmXEusctcdOFszMM7+qvg9UBwUxClRh0=; b=rc+PCJOm+HZXvCfUoBwU6EokzHvLUycIEC2UkFBb+bm3RlBnBpAh9dSYok/EwPWnER utv4MtcpC8WMUHDl61SpA32y6cD6Web4sESsnfyV9drRplv476xlmjt3koi8lWFps8Ra N1C1mZOmWHcu/DBHpU9PnmtjkO6cIjJAmhkrnaVaGcn1pWmXj3H3Tw5k9AlqgAKJi9Lp 1WHzpZPpoj6ScAAE6ftazVH2ChA0cnky5Iz0RtNjAj4czkrdkdRa15IS1faaS/W+OkKl KLjioO6OXQnvkS2wKQyEV5vGsc7akSAhHzYFGzVYV8auR7zUKhvnQcUuPhZ5bxup72ic 7BjA== X-Gm-Message-State: ACgBeo24rCa8bnulfIfPbckYqNB3i/g4oblcAuE27Dznpvlvp66bDE/m Gomaho8fyVlUrdfHrq+pd95afuGyqeGfEw+Qun+IZQ== X-Received: by 2002:a0d:da41:0:b0:329:91e7:fd06 with SMTP id c62-20020a0dda41000000b0032991e7fd06mr10477748ywe.436.1661788974863; Mon, 29 Aug 2022 09:02:54 -0700 (PDT) MIME-Version: 1.0 References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <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> In-Reply-To: <2981e25e-9cda-518a-9750-b8694f2356b5@amd.com> From: Dionna Amalie Glaze Date: Mon, 29 Aug 2022 09:02:43 -0700 Message-ID: Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory To: Tom Lendacky Cc: Mel Gorman , Vlastimil Babka , "Kirill A. Shutemov" , 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 , 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 , Mike Rapoport 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 > > The stack track is in mm/page_alloc.c. I've done a little > > investigation, but I can't account for why there's a hard cutoff of > > correctness at 256GB > > > > [ 0.065563] RIP: 0010:memmap_init_range+0x108/0x173 > > [ 0.066309] Code: 77 16 f6 42 10 02 74 10 48 03 42 08 48 c1 e8 0c > > 48 89 c3 e9 3a ff ff ff 48 89 df 48 c1 e7 06 48 03 3d d9 a2 66 ff 48 > > 8d 47 08 47 34 01 00 00 00 48 c7 47 38 00 00 00 00 c7 47 30 ff ff > > ff ff > > [ 0.069108] RSP: 0000:ffffffffad603dc8 EFLAGS: 00010082 ORIG_RAX: > > 0000000000000404 > > [ 0.070193] RAX: ffffdba740000048 RBX: 0000000000000001 RCX: 0000000000000000 > > [ 0.071170] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffdba740000040 > > [ 0.072224] RBP: 0000000000000000 R08: 0000000000001000 R09: 0000000000000000 > > [ 0.073283] R10: 0000000000000001 R11: ffffffffad645c60 R12: 0000000000000000 > > [ 0.074304] R13: 00000000000000a0 R14: 0000000000000000 R15: 0000000000000000 > > [ 0.075285] FS: 0000000000000000(0000) GS:ffffffffadd6c000(0000) > > knlGS:0000000000000000 > > [ 0.076365] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > [ 0.077194] CR2: ffffdba740000074 CR3: 0008001ee3a0c000 CR4: 00000000000606b0 > > [ 0.078209] Call Trace: > > [ 0.078524] > > [ 0.078887] ? free_area_init+0x5c1/0x66c > > [ 0.079417] ? zone_sizes_init+0x52/0x6c > > [ 0.079934] ? setup_arch+0xa55/0xb6d > > [ 0.080417] ? start_kernel+0x64/0x65a > > [ 0.080897] ? secondary_startup_64_no_verify+0xd6/0xdb > > [ 0.081620] > > Note that there is a bug in Brijesh's version of the patch and it will > almost exclusively use the MSR protocol. Please try the version of the > patch that I recently sent up based on the current unaccepted memory tree > from Kirill. > I've now tested this patch set with Tom's new patch set, and it appears to be that the problem with 256GB is more likely to be due to this unaccepted memory patch set rather than something AMD-specific. Kirill, do you see any problems with 256GB on TDX? It seems there is some unaccepted memory getting touched in memmap_init_range when the VM's memory size is at least 256GB -- -Dionna Glaze, PhD (she/her)