Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1350062rwd; Thu, 8 Jun 2023 16:59:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CHSinGIUmOqZH+F1EPlp8S+3dEG3owq+jHL98So1aRnb+zzg4p5x3SSjDw83Cy7OVf5Wm X-Received: by 2002:a17:90a:d148:b0:253:37a9:178 with SMTP id t8-20020a17090ad14800b0025337a90178mr6584022pjw.45.1686268798473; Thu, 08 Jun 2023 16:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686268798; cv=none; d=google.com; s=arc-20160816; b=y4szkfTqtJGfCOrpSLKniyGVm6WxoLkGnttC1u2S3g2a/2daFEMrtYWO3WNOZ/OYLK XYaLhyXpL/kESuNrLV8fMgRVy0aS+hQEh1asP41w5b91Gg8UU2XmnjDGNdaW+zNh+U17 jTHBdshUJmxhYiYnjvbWYMZP8B1qCw7QpJvm8HptCU7TAY2XMfeUoeMNX/n9Sh5sfDUG ArOLYfSdcmzKVzYEBqZd0+V2m8FLLMnhKMl6SMhom/s/VWjvol+Q4bMtNdxu++dg4xJW DXi6NsbmOxDamuiOkwkYyf7+3NUSb8NdWpENPFdoOCWdpDpAUmRWqLb7AAvYvnBmRsTG RnfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YjX32bPMeMpGNIKwuhbkXU/mOYSr82WC3wKoQswI8Ng=; b=tU4VtmF9szxM1t47/eo0h03AYt9SZmbiJuIYR2EjAc9zrKe/802OKfzVF24vDU5pUM gn6Vk4/YjkMj6PULtjOQrNeEfZ9AOxY/hYlKkp4ST+CuxJ35O1QU41AkKDh8p/vo5pKr 7UfBc1wZOajKpVFMKV4BouDa/1Cdacm5uOFkhAbmWDj0TiTDsHfIg16quvKulvBN9KCE ajyPVro6FKFmox1LOnfgX3NM5Lp953M+cawp6AYLWbbfmPZ5nwqprDgzhjss16UuiG1R jxnAhxUNUt4EXq/dEWWtEo3NTkGuMEp47V/ePubwdFVcCWaGL45STAgQ62sPbi4mKnIb v0tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UXqehFPu; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a17090332c300b001b2565271d0si1813155plr.463.2023.06.08.16.59.46; Thu, 08 Jun 2023 16:59:58 -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=@intel.com header.s=Intel header.b=UXqehFPu; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236588AbjFHXgS (ORCPT + 99 others); Thu, 8 Jun 2023 19:36:18 -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> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SCC_BODY_URI_ONLY,SPF_HELO_PASS,SPF_NONE,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 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.