Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5940353rwr; Mon, 24 Apr 2023 11:05:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/5WonslZWECdDoDDeKFUCH9/Sc8hL3oYbN+OdtvYAmU3f66M4BiWqiX0u9+Oktel/8TGo X-Received: by 2002:a17:902:da8f:b0:19d:138b:7c4a with SMTP id j15-20020a170902da8f00b0019d138b7c4amr18438552plx.3.1682359549169; Mon, 24 Apr 2023 11:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682359549; cv=none; d=google.com; s=arc-20160816; b=QDotODwbvMk3qaq9ljjJ6iRxec5V2+DFUi0H/h/y+MwoTJvMmeBjfwSYOo6flK6usd TYOFLtp9gSZ2CLQ5aJ8I57pzy5nfZUSWuIt8KV1rZN9AwdaYuaUGmPyWxPxXFeMkuZZN BNnWMkhE8IaXPqZa8C0IiZ0cNJ4r3S9pjc371mqq17PqA9lyn2WHVXcw6VoiNdteCAGW VYLDea0xJngW/mbsPL3y3IxPijA7Hwvs6tH//kr7iyI+AX1u8WN6AAuyFd9f9Ncz5AzV 2jWeeln9i/7b4Arual+vVMplNxgmqPAcf9GrgAWeoSpGWJM+D1VkqHe2IKfj/vw4tTgC m71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=/B8ViPkT84zF77YJVg/Vg+DuX3x6sDAhKrSrx63B0t8=; b=nm1ZTxUyRkpm2Gkiji6fZcTIfeENRWlyKO9HLZB8cb6lm9BG4XJ0mijlRLfH38BPB/ ftByIHhX7dtQIKygNcMx+QyNm4FDMhtiJuknNCw2LIQB/8n1KxRjHZPhbtSkXvyE2KMJ mxSobIyYPooUv+8O8b6pUiM2cNEsrPR0UPu4Rib5d+DHWerLmI2bxYL1kscMat1huvmD eV9XRXhdbrSm+RBdLAq6KujUxjfJIaTfdygq0a/mE6TElMiMZ6NDXorfs7UIuxEYGNpg fg4FT7f92oqeuQ/4vNL9VGiB8ZhfNJavqZDHTtZRM/PIGb7ZK16uf0Ny8JLHF3adndT5 wvHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zNVUbHm8; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a17090a868a00b002369d39671fsi11599603pjn.160.2023.04.24.11.05.35; Mon, 24 Apr 2023 11:05:49 -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=@linutronix.de header.s=2020 header.b=zNVUbHm8; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232213AbjDXR6o (ORCPT + 99 others); Mon, 24 Apr 2023 13:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjDXR6l (ORCPT ); Mon, 24 Apr 2023 13:58:41 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E48E6A42; Mon, 24 Apr 2023 10:58:40 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682359118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/B8ViPkT84zF77YJVg/Vg+DuX3x6sDAhKrSrx63B0t8=; b=zNVUbHm89L6WRj2i94+vPyVn3/KO1LB2C60TWY+kKf2/e8X9/9XtdKbM639oCyDfzo+kF6 y7T/sJmhL5ytO4DUh414kpf+vt4CvUe/YodEpDD02hfzlBINbTEIvI3SsdLqezsCo+5tFW AvbLWyv3qGi42txG7eIeRdoNoCDf86KN/QgJXAPPGmhTl1TqeCcHqSPF7eM9+ujvoD5z/m AjrKuWx0mKwm8kHTyjPIB1SSadCZzqxSWvKRYA61NK+fA/i4N78zaZprmbihpUvGoCep3s 2RQE5w5ABRrYdGBrSZjZPmPvtUXxeogAae/i/g9/9f8KekX5LyUd6mtLrTj6qw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682359118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/B8ViPkT84zF77YJVg/Vg+DuX3x6sDAhKrSrx63B0t8=; b=ZaMRZ/Y/wVrPL6Kd1U5Zo8HZlUCLMRTrTHQ/7Xvf+abFcSRFeSo9Dw3jXKeMeUtXfr3+up aT9nxD885g2bqnAA== To: Brian Gerst Cc: LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , David Woodhouse , Usama Arif , Juergen Gross , Boris Ostrovsky , xen-devel@lists.xenproject.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Guo Ren , linux-csky@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Mark Rutland , Sabin Rapan Subject: Re: [patch 35/37] x86/smpboot: Support parallel startup of secondary CPUs In-Reply-To: <87mt38yhwh.ffs@tglx> References: <20230414225551.858160935@linutronix.de> <20230414232311.379210081@linutronix.de> <87mt38yhwh.ffs@tglx> Date: Mon, 24 Apr 2023 19:58:36 +0200 Message-ID: <878reh17sj.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sat, Apr 15 2023 at 23:06, Thomas Gleixner wrote: > On Sat, Apr 15 2023 at 09:22, Brian Gerst wrote: >> On Fri, Apr 14, 2023 at 7:45=E2=80=AFPM Thomas Gleixner wrote: >>> @@ -248,10 +311,20 @@ SYM_INNER_LABEL(secondary_startup_64_no_ >>> * >>> * RDX contains the per-cpu offset >>> */ >>> - movq pcpu_hot + X86_current_task(%rdx), %rax >>> - movq TASK_threadsp(%rax), %rsp >>> + movq pcpu_hot + X86_top_of_stack(%rdx), %rsp >> >> Switching to using pcpu_hot.top_of_stack is ok, but it's not >> completely equivalent. top_of_stack points to the end of the pt_regs >> structure, while the kernel stack starts below pt_regs even for kernel >> threads. So you need to subtract PTREGS_SIZE from the stack pointer >> after this. >> >> This change should also be a separate patch. > > You're right on both counts. Actually no. We can't do that as this breaks suspend/resume (again). /me drops it.