Message ID | 20240111-delay-verw-v5-3-a3b234933ea6@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1315011dyi; Thu, 11 Jan 2024 00:59:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJjleol+stbi9+wx1Bu/FznSWAjb21kkmx6P8sYPp67DpS0DusKkx5ZnwpUTIU7KTWy7T8 X-Received: by 2002:a17:90b:1014:b0:28c:16bb:712d with SMTP id gm20-20020a17090b101400b0028c16bb712dmr513266pjb.48.1704963588097; Thu, 11 Jan 2024 00:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704963588; cv=none; d=google.com; s=arc-20160816; b=Npa1YYKF2eBkk2fGeTuP5ul257rIpub9W/5zExW6L8htFXGVFvES8fQ2xTZtxnv+Y3 pReCgSb9/S2jzij8+dasB3aLtP+y1bkPuKQr4IuRLpkz0oHC7b58YFQX0z8/13My1rW4 3TzK2EPzMmbzzZVC2tW7vzBgmMJ2ZQ9v5/W1RKhICypMu9Xr9HOdDAsqaCIVzgCALTia k0UQQQA7EVvH8uC8SrHpQvpg9dN997PxIArCnEa2j4CyCk4JnEOBBC+jDTbZwOJkSzk1 SbGG8ETgs1rUxYIFdUkICtTVDRzsDlQMJYGTGTRCwby1aD6OxOfmwyHm8X6rqtlM5zpp EDOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rzZbi2kNM6RYCVjIUYiVz1/256dCuMd9sPMX2hlHtQM=; fh=ER2H6g+88FnZd3JyhT6ewHH56pdK2QWfWr77z0IHoNE=; b=XZwWgH3NiqmxfJX+vOZkIe2sa/xD5oEW3a/wVNF4nHH1Eb8m13Zb6sipNlQcb36dMJ NsyfE/wa1VwS0JCNk7CwjkXgaDJFtph/g7rQ3UIQx742FQL76m7QqskAPoX40G93gWKg yWUMU7WE1KgS3MmE6qect1FaZjlHR023TSlP5hEkRpPqOyqQ1YeNoROHIwU+WDNYzWWd nmJtL3bILMSUdMvMypjpsRO2suELPZNguZl9RlR/ZYkGAMlrZbaRXk+yiAuCVL73oln8 CX8VX4Y9kuxUS0AkalPYh/QuewYBCUcv9MZrNN0au1twHPiIDXNudxtQiHsNLS0E8691 SgSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DP8agTYy; spf=pass (google.com: domain of linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mm4-20020a17090b358400b0028bfce45881si3230130pjb.101.2024.01.11.00.59.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 00:59:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DP8agTYy; spf=pass (google.com: domain of linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 28BF0287BB6 for <ouuuleilei@gmail.com>; Thu, 11 Jan 2024 08:59:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AF921641A; Thu, 11 Jan 2024 08:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DP8agTYy" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E2BD15E9B; Thu, 11 Jan 2024 08:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704963398; x=1736499398; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SvyQgb7E1GjbbhEZauDFduuMMCCNLr60ulcJzDeIqyo=; b=DP8agTYy0b5+FhTki9djPAUS+/vamp2KB8DIxtDRqMpktfXwTKgzbxeh ol2Q9CHdXn8+W9rnIfU7+0Hm8WxgpPhjG3FgbqudzDGO5m1gTJX8Nvlfd S3TBATBzVImTM9KmdEE4TABSLI3bul4DoE5G560+sX+yNAMs96mRsI2TV /iiW8QiV7V8z/g+8+Bzj94m8nzEO7xEoOck3flZWJ3xuHr1I1m6K+XmBc cx5Jv10HfQVrhwrGIn6mJgKtneMC/P511tyj/rCYlyCEY/mrchADfh18o 1nq6Nd7GHb1NLsygLgLOJUPq6uoLRlrNsgkmki0/STpT6gcteg6UPeAPk w==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="6144925" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="6144925" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 00:56:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="905877668" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="905877668" Received: from ericwong-mobl2.amr.corp.intel.com (HELO desk) ([10.209.43.169]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 00:56:36 -0800 Date: Thu, 11 Jan 2024 00:56:36 -0800 From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <peterz@infradead.org>, Josh Poimboeuf <jpoimboe@kernel.org>, Andy Lutomirski <luto@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com>, tony.luck@intel.com, ak@linux.intel.com, tim.c.chen@linux.intel.com, Andrew Cooper <andrew.cooper3@citrix.com>, Nikolay Borisov <nik.borisov@suse.com> Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Alyssa Milburn <alyssa.milburn@linux.intel.com>, Daniel Sneddon <daniel.sneddon@linux.intel.com>, antonio.gomez.iglesias@linux.intel.com, Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Subject: [PATCH v5 3/6] x86/entry_32: Add VERW just before userspace transition Message-ID: <20240111-delay-verw-v5-3-a3b234933ea6@linux.intel.com> X-Mailer: b4 0.12.3 References: <20240111-delay-verw-v5-0-a3b234933ea6@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240111-delay-verw-v5-0-a3b234933ea6@linux.intel.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787783898999136821 X-GMAIL-MSGID: 1787783898999136821 |
Series |
Delay VERW
|
|
Commit Message
Pawan Gupta
Jan. 11, 2024, 8:56 a.m. UTC
As done for entry_64, add support for executing VERW late in exit to
user path for 32-bit mode.
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
arch/x86/entry/entry_32.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index c73047bf9f4b..fba427646805 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -885,6 +885,7 @@ SYM_FUNC_START(entry_SYSENTER_32) BUG_IF_WRONG_CR3 no_user_check=1 popfl popl %eax + CLEAR_CPU_BUFFERS /* * Return back to the vDSO, which will pop ecx and edx. @@ -954,6 +955,7 @@ restore_all_switch_stack: /* Restore user state */ RESTORE_REGS pop=4 # skip orig_eax/error_code + CLEAR_CPU_BUFFERS .Lirq_return: /* * ARCH_HAS_MEMBARRIER_SYNC_CORE rely on IRET core serialization @@ -1146,6 +1148,7 @@ SYM_CODE_START(asm_exc_nmi) /* Not on SYSENTER stack. */ call exc_nmi + CLEAR_CPU_BUFFERS jmp .Lnmi_return .Lnmi_from_sysenter_stack: