Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1917408pxj; Wed, 19 May 2021 17:41:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXTQIpceH2dBQu9AjDbCfywxYEelQlp6yItZANVR54bG2TxTT1JxCnBRDw2+Q0gwvSembi X-Received: by 2002:aa7:dc15:: with SMTP id b21mr1985952edu.350.1621471294711; Wed, 19 May 2021 17:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621471294; cv=none; d=google.com; s=arc-20160816; b=HvTdenL0D4bLQv6tBPoQ2w29uoOZCAnxCftXbX59GEubiQ41kItCJh4OYTo5qN/KWD UfJL5G2oTQLJb/+W8PxamYCMT5HsM95EmPbCOy136gyQIqwj4vIqLlW3f0ihogrXhND1 ktZ9z9GtcNzhgzcAy/ABP/HIHoXsXFd2gzZzgUe9VdNBUOvTW5jlJMq+t5Vcin3xt1CJ tf5zhT8TR9UocpcppeIZSzfh11875aUvOdvJXMA4JJG0EpAh63ELrACOQWq5XVFaW/Wf sT6OLLWkUPxe+EYJuS0+w4i+2daop3crsc/TDqpIcS0ijJBmvf7KmOUuE+Wx1Yrrq/Nn SqXg== 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=C7hdQ08NMXQPE2R8gCfLb3tzaWK6Vw9lVNc9/LC5lL8=; b=IxXeYdLicjaViAVHzR8zDGeOdauNwrhr28u2rcB9FivAVqubXlqMr0EogxEp4SHjbd 4Lr4fKoAys1bzXaYliorC5gSZ+d3Qkb486CP20sDDFXay58NcxgTgsnevk+dBIAlUdNR 0Qxp5k701J9Pa1CInrTy0uDynYwo06I8ve9aZJCuDeuZzL4Hc6KdnjuvSpd7G6DddUaA V/+pgoHBUh+zVWlxMsZfaoTgr4qf+coaUG/5nbeJD1eh9TIaiBQce1FiId9IgWXg2NUz 2HAiW3299MgLDceLM2HqHtD8LxpmLieuMcKtGPI6Nbc9GW2/Xj0v3rbOdrjybcsZFUaM HS2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RjwtgTvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp6si1444781ejc.243.2021.05.19.17.41.09; Wed, 19 May 2021 17:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RjwtgTvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229808AbhETAlh (ORCPT + 99 others); Wed, 19 May 2021 20:41:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhETAlg (ORCPT ); Wed, 19 May 2021 20:41:36 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21201C061574 for ; Wed, 19 May 2021 17:40:16 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id df21so17395450edb.3 for ; Wed, 19 May 2021 17:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C7hdQ08NMXQPE2R8gCfLb3tzaWK6Vw9lVNc9/LC5lL8=; b=RjwtgTvhrA09Rruw+hpBJG27mBkkV5f//9ZMBigPiYsynNoyUh2g0XidITlEwpZKFx QHqKdKfj07TPYtZRABCdupO/PsABGHGCH3jx9UaHbUHFHL5j9x4LrZgYHb9tbR7szF5F 1eAACvNYKh1FfZdJ4BhAvRc5yPDOWnCFhye4KDH3VXkzq//D1pjO7QF7nBRIYFNM9U+a ASOxI94hmxDhgtWi7ye6xiQIQJFcUCxZTtaQwGSrY0sDnj9y1ea9TN1yL80zEJDa96sJ FkDo/l32vPFFMfAUFqqBqdtsRSOkGtr35EXU5GS4Yc8JPgam5tQiqJOQtwzjvv31q6X9 kE6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C7hdQ08NMXQPE2R8gCfLb3tzaWK6Vw9lVNc9/LC5lL8=; b=isLqVEnOxckGvUUc+W0QXfupOkdPQ46in4cJl68Adt2wTLPjrN3eTfdm0ybds0WBsm YBdVvwLTqM3qZhx18Yvj/3VK3f1vASmAB21MevpCBaR6XxQfUGqsWytCV7E2W+4fn8JI Y4FstBYA7KkGq30SzDJgOHtr6o2nTZys1pQli5/Dnn/ZRt/y+cVzcLeSxzSjKVR6Cgx/ 3asYE4T6kvgfPkNkt5a/tAH8orcdObDi/Q8zDNVOyoaz7yCH7aia79fayRgUbURz2Auc A5dzQJChSW0rGbrN0KfAUaKqoq4PgNjmKFSdrnyk+uqUadZf1Y0jFGHKQ45l+F2GNSng eErg== X-Gm-Message-State: AOAM533s9otFAjLIE4xPpxnPEqnD7KbsovrQrBbnxMVN/iQvKja1y/T6 VFxRpstjl3WIPuCUldCliAoRiOqxmENBw3zHAvCy8Q== X-Received: by 2002:a50:ff13:: with SMTP id a19mr1943551edu.300.1621471214054; Wed, 19 May 2021 17:40:14 -0700 (PDT) MIME-Version: 1.0 References: <20210518005404.258660-1-sathyanarayanan.kuppuswamy@linux.intel.com> <861a316c-09f6-5969-6238-e402fca917db@linux.intel.com> In-Reply-To: From: Dan Williams Date: Wed, 19 May 2021 17:40:03 -0700 Message-ID: Subject: Re: [RFC v2-fix 1/1] x86/boot: Add a trampoline for APs booting in 64-bit mode To: "Kuppuswamy, Sathyanarayanan" Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List , Sean Christopherson , Kai Huang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 5:19 PM Kuppuswamy, Sathyanarayanan wrote: > > Hi Dan, > > On 5/17/21 9:08 PM, Dan Williams wrote: > >> SYM_DATA_START_LOCAL(tr_idt) > >> .short 0 > >> .quad 0 > >> SYM_DATA_END(tr_idt) > > This format implies that tr_idt is reserving space for 2 distinct data > > structure attributes of those sizes, can you just put those names here > > as comments? Otherwise the .fill format is more compact. > > Initially its 6 bytes (2 bytes for IDT limit, 4 bytes for 32 bit linear > start address). This patch extends it by another 4 bytes for supporting > 64 bit mode. > > 2 bytes IDT limit (.short) > 8 bytes for 64 bit IDT start address (.quad) > > This info is included in commit log. But I will add comment here as you > have mentioned. Thanks. I only read commit logs when code comments fail. > > Will following comment log do ? > > /* Use 10 bytes for IDT (in 64 bit mode), 8 bytes for IDT start address > 2 bytes for IDT limit size */ I would clarify how the boot code uses this: "When a bootloader hands off to the kernel in 32-bit mode an IDT with a 2-byte limit and 4-byte base is needed. When a boot loader hands off to a kernel 64-bit mode the base address extends to 8-bytes. Reserve enough space for either scenario."