Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6271554rwb; Tue, 22 Nov 2022 10:59:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf7oSIbbcud4gUVi6D0GgCzGjkkDWhW4i/p+CJ3l778zq0ysAuSvTOsN1Hzm26GvkUFT5Fby X-Received: by 2002:a17:90a:4fc1:b0:213:16b5:f45e with SMTP id q59-20020a17090a4fc100b0021316b5f45emr32312579pjh.170.1669143570255; Tue, 22 Nov 2022 10:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669143570; cv=none; d=google.com; s=arc-20160816; b=Q25PjkteuqgQF/iJpS6jYq1cqgJAv3FVZELybUQMrr9f5CqYcj4seZTr+1760yeM4B xn5h0Sw1GNjxcZRf47U7oFFAZSg6Lq9M7WrFKN5mgBFAtrt/hEyU34jUR/eYeT0014vq 7IS7saca1hYrJ/Y+acojhmyK3RkqGlmjJ35cH2U2sAJPvwC5SRPNXRbMm56fzitRK4ko pX/U8Ha1jPOOdd+x47DAlzdBfyQAv2DR2bqf13bPsWqa+dwYORS+96k7Q9a+oRkvKPMs iP04I1ojqS3NnfvDqTdGOCsUjXwMGP44mtZQrut8Ux4/xHB5WqGtWg7XdvJVwK4YoHZx CG/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=jV+Vu5nExTKWPYOeBZhl4AtcbxNOQy4jUkV4cFJwyCk=; b=LIZOB3OZ1vFA/en1CQr+t/vE1yctOpSK8fkXnnA7Fddvijhq+SzbbDURNze9C4kbYc qNK1KYsoknJQohPY4hQdcMlkICM+LFrSDaRDmsygmOWfYIHwI7/wLlie7pmfnFzpnO89 cdnppjfaWhJwNje/YT20BTIVHljFfgbKVq/l001vhTUuuazyZoxLY3MMR5QprXT7Q70x 4zBohbzYHtyw32Jl+WWtOhzQ48Rbj354guFDBzruIRifjpVAf2hcMXCF1+uTDk6TZutT 1MGUgcK98kNwP7dlyCMTsmd4DXGlZDayVTGrv3iTDjZ7MWwQfc/uDfMy1hqwicL4eyP1 MLWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JGYnRvQB; 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 pi16-20020a17090b1e5000b00212d79c548bsi16612275pjb.82.2022.11.22.10.59.17; Tue, 22 Nov 2022 10:59:30 -0800 (PST) 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=JGYnRvQB; 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 S234201AbiKVSE7 (ORCPT + 90 others); Tue, 22 Nov 2022 13:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234070AbiKVSEw (ORCPT ); Tue, 22 Nov 2022 13:04:52 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD3B16A6BD; Tue, 22 Nov 2022 10:04:51 -0800 (PST) Date: Tue, 22 Nov 2022 18:04:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669140290; h=from:from:sender:sender:reply-to: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=jV+Vu5nExTKWPYOeBZhl4AtcbxNOQy4jUkV4cFJwyCk=; b=JGYnRvQBJAZmRl0wXCdCqaEx+94V6gBRQx9N1vRdRJE8mg4LM1vaJsNuXdJA4DcVjZ+hdb 06OqbC1KlMGS2Pf011Cs5nd7hcvQGAOoAjVsQ74omelnaBEm484I8SWtMuUYteUqfuGG2m CF/979fqPKA7OxJ9XkWfPJYzQFAMcK6m9+nkNMtJ7wT2ebZY445YB9H03CmOtL7Zn29zlN bOxkZQX41cjdXpOtoibdUsvthqBVk2gxjdl/Jkc6csJSiTVoh2uFjA5GSzUSxEP8abl6t0 Kr1sf3lhv0JdFbJuUVGe8OJuKheAQtMCnFsFpj3kJVWmYCXDHYnpCHscToNGaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669140290; h=from:from:sender:sender:reply-to: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=jV+Vu5nExTKWPYOeBZhl4AtcbxNOQy4jUkV4cFJwyCk=; b=599Fus7PCHoxiMmnuulpUUu59Q2nMRpG7wYqHdgUT88HEcj/lM62GH8JscHA7nXAu6QGyl TVJNE1MPjnUd6UBg== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack() Cc: Juergen Gross , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221104072701.20283-4-jgross@suse.com> References: <20221104072701.20283-4-jgross@suse.com> MIME-Version: 1.0 Message-ID: <166914028910.4906.12824058487983110591.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 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 The following commit has been merged into the x86/cpu branch of tip: Commit-ID: dfbd9e4059c4edad4d92ef7f3deb4954f76e4ba0 Gitweb: https://git.kernel.org/tip/dfbd9e4059c4edad4d92ef7f3deb4954f76e4ba0 Author: Juergen Gross AuthorDate: Fri, 04 Nov 2022 08:26:59 +01:00 Committer: Borislav Petkov CommitterDate: Tue, 22 Nov 2022 16:14:15 +01:00 x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack() Testing for Xen PV guest mode in a 32-bit only code section can be dropped, as Xen PV guests are supported in 64-bit mode only. While at it, switch from boot_cpu_has() to cpu_feature_enabled() in the 64-bit part of the code. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-4-jgross@suse.com --- arch/x86/include/asm/switch_to.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm/switch_to.h index c08eb0f..5c91305 100644 --- a/arch/x86/include/asm/switch_to.h +++ b/arch/x86/include/asm/switch_to.h @@ -66,13 +66,10 @@ static inline void update_task_stack(struct task_struct *task) { /* sp0 always points to the entry trampoline stack, which is constant: */ #ifdef CONFIG_X86_32 - if (static_cpu_has(X86_FEATURE_XENPV)) - load_sp0(task->thread.sp0); - else - this_cpu_write(cpu_tss_rw.x86_tss.sp1, task->thread.sp0); + this_cpu_write(cpu_tss_rw.x86_tss.sp1, task->thread.sp0); #else /* Xen PV enters the kernel on the thread stack. */ - if (static_cpu_has(X86_FEATURE_XENPV)) + if (cpu_feature_enabled(X86_FEATURE_XENPV)) load_sp0(task_top_of_stack(task)); #endif }