From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8B45C7EE45 for ; Thu, 8 Jun 2023 23:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235523AbjFHXgR (ORCPT ); Thu, 8 Jun 2023 19:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjFHXgQ (ORCPT ); Thu, 8 Jun 2023 19:36:16 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A1930D5; Thu, 8 Jun 2023 16:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686267340; x=1717803340; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=sN7dvQMQ+/TpXG6CIcwf0XKyIcjODwPRfKZrLnuiPSY=; b=UXqehFPuabB/RcoG8sNH/tX04ZZ+qGwLovbZb9OkWoz/EE3a13PqPnaO jkVtAYuGFcj//7Ykm1zbTe71ntQ+tcukP5B41OhyE/dTk4qfLsYcu8MOU 7Bpsn0enkAnhqDb5Xjxp/MHdOY3GtpfdCIpTSZCW5MkGHK2jEYCeyALiK cI1vBIG3ngxiWQkgw4Dpy8AZ+iN8+lotACEPj0gA7jLxg2lneR+UHLTAo vOD1qUx8kW/pGF2B5ZXwhpvwVRU6YLcCUJMpFDi9T7mLA82YztW5UduqE FZoPwn2u3E/LXGKJ+8Wgz2Nsrby98mhlyLoPQ9HZf7zYp1wNv+Rsfpsqn w==; X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="337097733" X-IronPort-AV: E=Sophos;i="6.00,227,1681196400"; d="scan'208";a="337097733" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 16:34:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="822822455" X-IronPort-AV: E=Sophos;i="6.00,227,1681196400"; d="scan'208";a="822822455" Received: from yjiang5-mobl.amr.corp.intel.com (HELO localhost) ([10.144.161.97]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 16:34:03 -0700 Date: Thu, 8 Jun 2023 16:34:02 -0700 From: Yunhong Jiang To: Thomas Gleixner Cc: "Kirill A. Shutemov" , LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , 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 , "Michael Kelley (LINUX)" , Dave Hansen Subject: Re: [patch] x86/realmode: Make stack lock work in trampoline_compat() Message-ID: <20230608233402.GA3430@yjiang5-mobl.amr.corp.intel.com> References: <20230508181633.089804905@linutronix.de> <20230508185218.962208640@linutronix.de> <20230524204818.3tjlwah2euncxzmh@box.shutemov.name> <87y1lbl7r6.ffs@tglx> <87sfbhlwp9.ffs@tglx> <20230529023939.mc2akptpxcg3eh2f@box.shutemov.name> <87bki3kkfi.ffs@tglx> <20230529203129.sthnhzgds7ynddxd@box.shutemov.name> <87h6rujdvl.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h6rujdvl.ffs@tglx> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Tue, May 30, 2023 at 12:46:22PM +0200, Thomas Gleixner wrote: > The stack locking and stack assignment macro LOAD_REALMODE_ESP fails to > work when invoked from the 64bit trampoline entry point: > > trampoline_start64 > trampoline_compat > LOAD_REALMODE_ESP <- lock One possibly dumb question and hope get some hints. The LOAD_REALMODE_ESP is defined under .code16 directive and will be used by 32-bit mode caller also. Is it ok because the instructions there will be same for both 16-bit and 32-bit? I checked https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_16.html#SEC205 and don't find much information there.