Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1391022rwi; Thu, 3 Nov 2022 04:55:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5HR5IL1sKDPvj3d0o6jT5Zmk9QMJ/tXZlHVTRsIH0h0zJrO9zXvrx6wFEOW8SvGPrryTx7 X-Received: by 2002:a63:5a44:0:b0:431:fa3a:f92c with SMTP id k4-20020a635a44000000b00431fa3af92cmr26687168pgm.471.1667476547287; Thu, 03 Nov 2022 04:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667476547; cv=none; d=google.com; s=arc-20160816; b=TlfIGFdwOigAhZLHSUhJ8QgijUK955rZJuy839/BWS7djLFtGYZjgtBNTK6Qo3xS9o Ftta8zqj0XV3k0wO+HdgU7wn6p1+IWPUKugRqFliEWQI1PNsAAJ/diThhJCLgkdLlUnh 7LHeMcPuQRxOxZo5GTdYMLa2sEGVzgbxgnze6a+Lut387iqiH9S0n79WEjVxlK4oVPMO Z1STgWf3ia/EGp8GqoGrUQOvnOc+eweh/LtW7kHLwKutEl8AX9l07LVmb2pf6KHDrL8J 3HRwgtE2eB9v8yagRg3E+YtX4JDDr7yyDv7/x2aHBVPGZQFKzgnTfixpjrx5ZaNDJIVX 63eQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mK6Yb+HDZYey+MdThM5vOztF2LsAJko2NCXxRRCzJLc=; b=hQStN5SSd8x54Hy69g5TAMLvM7HYLgrcTrvS9yLmbGgkKMGBwMWiwqZv0LSJauAxzv rj72fiEa3G3csltLaPNE91L/P8KQ6STuU1x0vjEdiyqvWvdivoULfn1suBNClyKTtSkO LKaPgFC7dt9Oe73GUuAvFP6eVhP0eV+6qwX8f8nWhNpJnufybaUALnclx0mCROcIlU8K pbxGdGs+XbC7x+72vgCj/k0JpnmKd4RG06/NsElpYz89pHJb6E2aRZxHdW/Lz3QBAPNC gax1y6Go8eNmykmYVq6ZDYy2z2zBQlRxyjTs+6NAtV2OG9NSgP9wzlKtr67GxMS1+fZQ 4NRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=kXqfwiKM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 28-20020a630b1c000000b0046aff3cb64dsi852684pgl.410.2022.11.03.04.55.32; Thu, 03 Nov 2022 04:55:47 -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=@suse.com header.s=susede1 header.b=kXqfwiKM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbiKCLhR (ORCPT + 97 others); Thu, 3 Nov 2022 07:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbiKCLg6 (ORCPT ); Thu, 3 Nov 2022 07:36:58 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFDCF12082 for ; Thu, 3 Nov 2022 04:36:57 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 64E041F385; Thu, 3 Nov 2022 11:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667475416; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mK6Yb+HDZYey+MdThM5vOztF2LsAJko2NCXxRRCzJLc=; b=kXqfwiKMdh9juEVxLq/XwrPXmX7SB2cxef3a31IZCdP9dQWBaNfSqFJxrMjZHT4Z9ML6rG pVIF8wHcHue8M1//i+/XCN0IhieNQ20fbVOJsCKv5zlarDyZcQQnAH0zAxIADInsArD5tT 8T43gbRaTSNsxxlmazfgdFihOv9Swfw= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2225213480; Thu, 3 Nov 2022 11:36:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5ETtBtinY2MEHwAAMHmgww (envelope-from ); Thu, 03 Nov 2022 11:36:56 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 2/4] x86: remove unneeded 64-bit dependency in arch_enter_from_user_mode() Date: Thu, 3 Nov 2022 12:36:34 +0100 Message-Id: <20221103113636.25543-3-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221103113636.25543-1-jgross@suse.com> References: <20221103113636.25543-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 check for 64-bit mode when testing X86_FEATURE_XENPV isn't needed, as Xen PV guests are no longer supported in 32-bit mode. While at it switch from boot_cpu_has() to cpu_feature_enabled(). Signed-off-by: Juergen Gross --- arch/x86/include/asm/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry-common.h index 674ed46d3ced..117903881fe4 100644 --- a/arch/x86/include/asm/entry-common.h +++ b/arch/x86/include/asm/entry-common.h @@ -24,8 +24,8 @@ static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) /* * For !SMAP hardware we patch out CLAC on entry. */ - if (boot_cpu_has(X86_FEATURE_SMAP) || - (IS_ENABLED(CONFIG_64BIT) && boot_cpu_has(X86_FEATURE_XENPV))) + if (cpu_feature_enabled(X86_FEATURE_SMAP) || + cpu_feature_enabled(X86_FEATURE_XENPV)) mask |= X86_EFLAGS_AC; WARN_ON_ONCE(flags & mask); -- 2.35.3