Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6731977rwl; Mon, 9 Jan 2023 12:15:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXuMd2nj91XrI2FjJ+kKEEkiHBm9Sx+U/pg4aFdOZa+vyCJeNgpXPOYjO5MFzkA2nNSmvbxI X-Received: by 2002:a17:906:430a:b0:7c1:54b9:c688 with SMTP id j10-20020a170906430a00b007c154b9c688mr54916500ejm.60.1673295321516; Mon, 09 Jan 2023 12:15:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673295321; cv=pass; d=google.com; s=arc-20160816; b=AadKv5Yzcfr3Czh+38UmVG7piSCLE7C72fWH2g9LOKwUFYO+kFhdYDChPR4T48p27y m12j2zSaZZjRVT2uUCgIRHckStRtAZfDDGKCUqBO43oHfnkRI3V/A9VVFdJSFamhaoVh Oz24ZqXBwahGhNYdoQ+1G4ZHf6HvhXQ7+tSn51NgXAiSKUZhnxxTebr4MvNeJrR/fqiN SJo1OB4wofOprbUWmRugnePrnwoUZCBDb2TXxxsQNXSdQab3WPybd6kko0XRgvOPuZgm eudIBGH6cQhq1957+hX7NmUyuMj1kNC8Xl+3LQF7HACKBY6Kmzic23eQcYmzAuLLH7dV +CAw== 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:dkim-signature; bh=uW1xdrK03J+7dublP83aQGfxKGgRGvD9Q+PQ6PGQ6+M=; b=yj45ByZMc1rsoOR9NIxAemEKZ9Ha+1nVzZ44JrKya1iV28fV/Y+wm1mugFX6c2jerx 8giBwRv71TOEBHiOxuPssq7Hw5azJ7sL7ifguKUm93HKCgwltj46GMAx12CxmFHjDByU CzD6ZPV1V2eakYZ3MWmytEQPn6phHMxLd4FLIzL5SO03Am9yYPx+wOpPZbRP3sjQzOlq 8DpIMgmJV65LB85cPpwCER57jIapljxl9FO/2ZEt93gMLe0C1jOnMya2OKAcw/vSYQr8 a+fS9q3WvP7trPSX8pgA0N41Lfu8KT+do3VJhVZYZwwhQNYTrD6XLrm+EAf/ADVZfTY9 tH3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=tp73gFhc; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qhJXIZq0; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb2-20020a170907960200b0077f3a9c58e2si10312353ejc.6.2023.01.09.12.15.08; Mon, 09 Jan 2023 12:15:21 -0800 (PST) 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=@oracle.com header.s=corp-2022-7-12 header.b=tp73gFhc; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qhJXIZq0; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235359AbjAITpd (ORCPT + 53 others); Mon, 9 Jan 2023 14:45:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237339AbjAITop (ORCPT ); Mon, 9 Jan 2023 14:44:45 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 262757CDCD for ; Mon, 9 Jan 2023 11:44:18 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 309JfQEu018835; Mon, 9 Jan 2023 19:43:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=uW1xdrK03J+7dublP83aQGfxKGgRGvD9Q+PQ6PGQ6+M=; b=tp73gFhcpk4/AnKzKCb2uXNnwKJB0BPISPc3gNwSquyuzRFphhYqJtnEtz8d9MsNJuEc JlFtEKFtD3uwNurg/KnbtE4NcvF3PMxE0Gz9pzy2zKbEqMLeA6lWjWnC2chf59yO9WPB dwKygkHOSkdK1ydrwRAWos4NKkbpnlDIoK75T1f+7+b+Jd1xCr3nSY98B1GatjEfY8ug YL4aBFNtNqHdSII8C85KNs17fKwH4xAvBN2A9zK/9ZolOJnYbe2XlVvBiwL1K8QaW3rJ y0zx1otndRBz/MD0MZgEX8jQMCQSH3/hEAim6PAhGeSBS/NRjBlk0vl4ledUZJlANwbs 9Q== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n0r47r72h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 09 Jan 2023 19:43:50 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 309IFxZB004399; Mon, 9 Jan 2023 19:43:48 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2048.outbound.protection.outlook.com [104.47.73.48]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3mxy6afe8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 09 Jan 2023 19:43:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZvGSIYUWX0lQXR91QWZoxhjrLdCPykeRafKrxtl5OIy7SRGMciNkZ8pjlBxfAcl59Oc7QcdrLXENPMCpl4t4foy6jPMOujNePWFf8/zfXTgbvIrPJdF+Whdn/KpQsbbbRFBBqphco9r+gQEk9Xgzqh4Vm9bTKPS3MdMbyGjus6Rh83uozcSq6Ncp3rmAYz5LSmb1iosO6fxSCwJoCmd90/NGNZV6red7BUNoA0qECTnB7K5KtK9H1TGQ2hLuuq1uLYccmSgv7pUuySkmjDS+6cJwVw94rX5gsQ3xO4ft+LTXVS/cmUm+yR9IQCe3VedCocb3304cyYn/OTK198RU7A== 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=uW1xdrK03J+7dublP83aQGfxKGgRGvD9Q+PQ6PGQ6+M=; b=bok9kStP+nmlBDGnJ6GZ3DZ0HnbafXGxf7KoRrYNTopbKa30mmHKIX7uvqPphOTWrXVSQpqRRFk0eiOH/zmYk1ZCfO3RmFZ1a5/od8VajZIRtusUTObhBLM+ayWG0eeDNNO4L1jpJnko7zZ3h6lmGXNCeroYpwa4mSVafLZyt1pXD08Djq97MuDkEUqUsG6rqoYm25UyYn6dCj38emVIyGriOLYMgSneLG2pL1nlR9PiD9TLNRaExs7e7phFXY1X9LJkrwkVD17HOEnGT8SYRe+23W3LelybIGxmoRgNyOHJpbwlnHann13narOIsXpBfeYDzn59OKRV4PUpqvhY9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uW1xdrK03J+7dublP83aQGfxKGgRGvD9Q+PQ6PGQ6+M=; b=qhJXIZq04VHGZUzreyL01FKaXL/ZTxx4wXWLFsvem9jrKzIg1RezcVMLPd0DoQf54h2E37pPacdq98+VtaDvmvQt0c36hUEzuY8AyHQFQLFpmMvbRTDO0HjQwgxKqJkX/s6yGapkTbJVmQgaZq4RUkSbRxLPVc4gZP6MLF/syRA= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by DM8PR10MB5397.namprd10.prod.outlook.com (2603:10b6:8:39::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.11; Mon, 9 Jan 2023 19:43:46 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::e301:fde6:85e5:b45a]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::e301:fde6:85e5:b45a%4]) with mapi id 15.20.6002.011; Mon, 9 Jan 2023 19:43:46 +0000 Message-ID: Date: Mon, 9 Jan 2023 13:43:39 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v16 7/7] x86/crash: add x86 crash hotplug support Content-Language: en-US To: Baoquan He Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com References: <20230105151709.1845-1-eric.devolder@oracle.com> <20230105151709.1845-8-eric.devolder@oracle.com> From: Eric DeVolder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:8:2e::24) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|DM8PR10MB5397:EE_ X-MS-Office365-Filtering-Correlation-Id: 160d3282-528c-495c-bfaa-08daf279d229 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: plW+RKS5iTry+5MCF0tdiV/um3T3qzqd5+0Ox/DQiR1gOoH+HBMR4nB+jLKCCE7pul08hLjYyQTgqM2B/dfoPSMOwxECKlPb7aV6nz2RXxfcOWRrY2pUj5+c5ACRS/DNIt5trPVQcwJsBComX44UlQKA/auhjpdBsvHymX0HPNQ4b3sKv+Z6y5aqlUK7GHWoAR9J1YGVW4bCD86UMzalXJ4bQGFAjPghzl2gm/QhMDlob1222HjzOk++q6Cos3t1LFKD0FrVvpfy+D7SA/AiW08W5cpwVvrwCGKmYZIVoCG7znHrOxaJCVNmFHlTK6eK0lJCF0cETlft/3KxVx2gWOl/g2edK0gUaEZudRq970HNSwSB6qYiaH5vra7khW0h3XK4R2e5uYnu6kvKokJm3HPOAnGuqLd+lN1OzTBIrodd1I/2zQl3VhPwHXa3bUHGkrrswI3byVWSQnMu+dLYZmJyb5HaYTgg7uhcwgt4c46LSGsPu07Ftw2Cu+gMvD8fIyh+C7/ViWfMKbJLqk98hoDNmsqx/+HY97ujVzocXlgjPrrXnWrtXCh4tSF1ofmKAsnLFS7C2SYEVHaINNLdE0dnkArb0gWI6AbL/kbDN3RjiXMf5Thw4vo+4PJbWtCAVN4+9U9YAyHcfAkGGOOrnsQqn8dOcvHl/F/BlY614ac06UsXET71tKsZPZYql4+ZPrHX0KK0Bo67zjiow9AtISGtMY+CQ8svlZpxq5xGJnw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4531.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(366004)(376002)(39860400002)(346002)(396003)(451199015)(36756003)(31686004)(86362001)(8676002)(66946007)(66556008)(8936002)(4326008)(2906002)(66476007)(6916009)(5660300002)(7416002)(38100700002)(31696002)(83380400001)(478600001)(316002)(6486002)(41300700001)(53546011)(2616005)(6512007)(186003)(6506007)(6666004)(107886003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eHNscFAxRGY2dDgwbDFJUHdpM2xtZ09xelNXT0dTNXNLNzhuUXJGZkI2TDJw?= =?utf-8?B?bzJBdGs1UGZJcTRWOFJnY3I0QUNaR01xWXBReHJtWTh0ZkYvaGdyVWtaWjNj?= =?utf-8?B?NnpvdlM0VE1ZUEZRWmR4azVyUGorUnV3Y2YxNElabC9QdzFWM21QeW4zNG1K?= =?utf-8?B?dGdDaTB3Z3FTbW8wN21rbGJNZGVMbkdDcC85d1lldzV4ZWFIcWc1QVJqTXZU?= =?utf-8?B?SHgrS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E8ydEZK?= =?utf-8?Q?g1UNYLCkMWgxVoJYOhlIbBRDg=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 160d3282-528c-495c-bfaa-08daf279d229 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2023 19:43:45.9761 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wcJ0dpGavEaKszLI1jpsDSOmPL7+OZKmTulZ02nIKoqKLFPE0FDdMswhTpRWFFUCrFwaIejTfgSL6z29VdvHb88z3hyGXthpwBD49Wa/KQk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR10MB5397 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-09_13,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301090140 X-Proofpoint-GUID: XklVL9FYvLS0w7tEL5m0kSttgRKcSwty X-Proofpoint-ORIG-GUID: XklVL9FYvLS0w7tEL5m0kSttgRKcSwty X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 1/9/23 01:36, Baoquan He wrote: > On 01/05/23 at 10:17am, Eric DeVolder wrote: > ...... >> @@ -394,10 +409,37 @@ int crash_load_segments(struct kimage *image) >> if (ret) >> return ret; >> >> - image->elf_headers = kbuf.buffer; >> - image->elf_headers_sz = kbuf.bufsz; >> + image->elf_headers = kbuf.buffer; >> + image->elf_headers_sz = kbuf.bufsz; >> + kbuf.memsz = kbuf.bufsz; >> + >> + if (IS_ENABLED(CONFIG_CRASH_HOTPLUG)) { >> + /* >> + * Ensure the elfcorehdr segment large enough for hotplug changes. >> + * Start with VMCOREINFO and kernel_map. >> + */ >> + unsigned long pnum = 2; >> + >> + if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) >> + pnum += CONFIG_NR_CPUS_DEFAULT; >> + >> + if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG)) >> + pnum += CRASH_MAX_MEMORY_RANGES; > > Logic of pnum calculating is a little confusing to me. If I only enable > one of CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG, is it OK? Say I > only enable CONFIG_HOTPLUG_CPU and CONFIG_SMP, on x86_64, > CONFIG_NR_CPUS_DEFAULT will be 64. pnum will be 64, is it OK. Am I miss > anything? Ah, your understanding is correct, and the issue you point out I need to fix. Specifically is only one of HOTPLUG_CPU or MEMORY_HOTPLUG is set, then I need to allow a default for the other. Using the example you have above, there would not be room for a single memory region, so I need to allow for a default number of memory regions. Good find! eric > >> + >> + if (pnum < (unsigned long)PN_XNUM) { >> + kbuf.memsz = pnum * sizeof(Elf64_Phdr); >> + kbuf.memsz += sizeof(Elf64_Ehdr); >> + >> + image->elfcorehdr_index = image->nr_segments; >> + image->elfcorehdr_index_valid = true; >> + >> + /* Mark as usable to crash kernel, else crash kernel fails on boot */ >> + image->elf_headers_sz = kbuf.memsz; >> + } else { >> + pr_err("number of Phdrs %lu exceeds max\n", pnum); >> + } >> + } >> >> - kbuf.memsz = kbuf.bufsz; >> kbuf.buf_align = ELF_CORE_HEADER_ALIGN; >> kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; >> ret = kexec_add_buffer(&kbuf); >> @@ -412,3 +454,67 @@ int crash_load_segments(struct kimage *image) >> return ret; >> } >> #endif /* CONFIG_KEXEC_FILE */ >