Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6244810rwb; Tue, 22 Nov 2022 10:35:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6AlOA10vfu15qgeGpu4/JgjGqfAJCNC3sE7BY6Fxon7wDd2Pnj9seTR8sjLl4faf7CvAF/ X-Received: by 2002:a05:6402:1107:b0:463:9b53:cbf6 with SMTP id u7-20020a056402110700b004639b53cbf6mr14187473edv.173.1669142109910; Tue, 22 Nov 2022 10:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669142109; cv=none; d=google.com; s=arc-20160816; b=zJubOSRAj8wZGmAOJhNornCOC5boYXqMu1AkWHDt09Yt6kv2y9qjAVRicgEqV3IDpi tErKA0czdvtMwhqSTEgp/5o6aQeRAvhc0LPtFhPOrm0/kaPYyrSDNih6I0s7a7elzcXE kBl0ByHep8uUn6XfPyADMJIBx0eO4ADlsKe7qmzLqoPKZshriyPEykTtYPeUMbF1dPE2 nUPyWHCUknxiLMBuwSq/2cJbptKMZtOjY2/7jhR35KORrK18iCsmJhhw2EC6TCEDdq85 T7vpaa/0wm6+irL12oc47Xtbe7FaslLt3SAWDAcHIh3rEnbeYyRfkUO8BjL1VLcJlSBp B4YA== 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 header.s=2020e header.b=eaiNgzGp; 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 qa35-20020a17090786a300b007771bc8dbb4si13860386ejc.781.2022.11.22.10.34.44; Tue, 22 Nov 2022 10:35:09 -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 header.s=2020e header.b=eaiNgzGp; 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 + 90 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 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: 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