From patchwork Tue Nov 22 18:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 24500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2362893wrr; Tue, 22 Nov 2022 10:07:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf7yTcNjHO3ZGSOj2kHA0l0cr7XNSklmsG7EGhvK+WAkYYEqwImNrx9oAv8kleyF7/cKzh2y X-Received: by 2002:a17:90a:f82:b0:218:a672:79b9 with SMTP id 2-20020a17090a0f8200b00218a67279b9mr13730521pjz.175.1669140449087; Tue, 22 Nov 2022 10:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669140449; cv=none; d=google.com; s=arc-20160816; b=d6oT/esSs7mHoKcwJY4KFTxIlhzb8Da5gX+qf8z0YfiMhsyRKe3zu9OLqBXEhG+mv2 xtdpXiNe8TH84rfFaahhtIC+7QPE1Qb3pGcJgPgm/289W7Pl9a9FXIyuBZn9piKYZLk/ mtX3ACILu1zNvpOdEQuomrxnUGOXeoMZlgd6u7IOi4ReNzdPEi1O7bPnoFrETaT+TM4R yEVCJWz4wRG9/h9z3KbhaSFB/+EQJ1avUJmkmuAAk9lEz0bgtGzaVzSSewzz2x8ShVh1 9KRfBQHh1RGBD/Ef+T2k4jJP7PRBpi9ePFwoMV7LDcwfX7XNUISGCBdpChEM5xEwat/e xjaQ== 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=+xfy9x2NW4FMPCaywwSS54j1bx8NtMfowq9pHAUhqUc=; b=cGXTRFeYCW7C/7/Xl0epe1xG0GNef14wd60v2ophDWu5dV+cEBsEpQXTFOxDET1P6O g4rVlCtJqeuHi99FZ4kdOD/DUmNgnBGI2wIZ5yk6ciQN9EjCocvn4ieJ9F9oKnunvDsJ AzuKBaM/NLwrpin8CTyyvfG4WF7/F/4PSS8oNz4XiwWvT5aGSbKES4WoIrYr4d3zy+b3 IZP+ylIK7lAtZQNNh5mijY7wR+7dVioEM1EVj/TzwLOYBnwifnYWJ++qhbDIpMSlnRwT JvFHdis1N1eMV6nr9e7Zhz/9Ob7sAHvMcadJVkkZc7paQffQgkkUUlwcmkquYmMNOol5 tI4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EQFY1DBh; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170902740c00b00186ba56bda8si14013489pll.61.2022.11.22.10.07.12; Tue, 22 Nov 2022 10:07:29 -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=EQFY1DBh; 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 S234134AbiKVSEz (ORCPT + 99 others); Tue, 22 Nov 2022 13:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbiKVSEv (ORCPT ); Tue, 22 Nov 2022 13:04:51 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF1CE6A680; Tue, 22 Nov 2022 10:04:50 -0800 (PST) Date: Tue, 22 Nov 2022 18:04:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669140289; 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=+xfy9x2NW4FMPCaywwSS54j1bx8NtMfowq9pHAUhqUc=; b=EQFY1DBhD559hIuZyDuW6KjwM0AGmDAI80qJa5m4RoMzUaWUhI2hBEufkUOwc69Q1KFS3V HT10SCcvxjC/A3qVR8F8YyRDGKzt0LdQ2VrpmbsqzuAsgH6wSH+q2Md1mZk1a9MleAGdut sWhkLEenX3xm3z1mKDluOVCBUrK0NHgMlX3BYU3Svnc/VAEDLwIkDIlVCjU5iosWJGDlxe miEaa0OxFlpECvESP23nS7FOfPbessSH2rxm7hAtRvVHZ/sO3/w/PhNk+Bou7RiTPybGza 7L+rMBoQ+i9G6iQZzcHuGZIHSxNkeONKXDu4gek2EISZwzuEwmgeALHJBj7Vsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669140289; 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=+xfy9x2NW4FMPCaywwSS54j1bx8NtMfowq9pHAUhqUc=; b=eaiNgzGpdbwl9oK43RhrYbtZFWRb13c5iDsTqojrjHDiISvAHfq6URbdpHqUx3JE++8kFc cUL0FAtS7CtS3aAA== 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: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area() Cc: Juergen Gross , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221104072701.20283-5-jgross@suse.com> References: <20221104072701.20283-5-jgross@suse.com> MIME-Version: 1.0 Message-ID: <166914028791.4906.13888521355469411255.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750220615411856368?= X-GMAIL-MSGID: =?utf-8?q?1750220615411856368?= The following commit has been merged into the x86/cpu branch of tip: Commit-ID: d76c4f7a610ac56c5b06e34258859945e77d190c Gitweb: https://git.kernel.org/tip/d76c4f7a610ac56c5b06e34258859945e77d190c Author: Juergen Gross AuthorDate: Fri, 04 Nov 2022 08:27:00 +01:00 Committer: Borislav Petkov CommitterDate: Tue, 22 Nov 2022 16:16:25 +01:00 x86/cpu: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area() Testing of X86_FEATURE_XENPV in setup_cpu_entry_area() can be removed, as this code path is 32-bit only, and Xen PV guests are 64-bit only. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-5-jgross@suse.com --- arch/x86/mm/cpu_entry_area.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c index 6c2f1b7..42cd96e 100644 --- a/arch/x86/mm/cpu_entry_area.c +++ b/arch/x86/mm/cpu_entry_area.c @@ -138,17 +138,13 @@ static void __init setup_cpu_entry_area(unsigned int cpu) pgprot_t tss_prot = PAGE_KERNEL_RO; #else /* - * On native 32-bit systems, the GDT cannot be read-only because + * On 32-bit systems, the GDT cannot be read-only because * our double fault handler uses a task gate, and entering through * a task gate needs to change an available TSS to busy. If the * GDT is read-only, that will triple fault. The TSS cannot be * read-only because the CPU writes to it on task switches. - * - * On Xen PV, the GDT must be read-only because the hypervisor - * requires it. */ - pgprot_t gdt_prot = boot_cpu_has(X86_FEATURE_XENPV) ? - PAGE_KERNEL_RO : PAGE_KERNEL; + pgprot_t gdt_prot = PAGE_KERNEL; pgprot_t tss_prot = PAGE_KERNEL; #endif