Message ID | 167351440417.4906.2133498085196807325.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3779797wrt; Thu, 12 Jan 2023 01:15:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXvT8o/S3EieFpKBxrpUadBDNFfbiswxeWwMFpuRZZomavyR5YinZXtgtyiP/TYIxZhIlA0w X-Received: by 2002:a05:6402:551b:b0:46a:732e:fd29 with SMTP id fi27-20020a056402551b00b0046a732efd29mr67115083edb.42.1673514944399; Thu, 12 Jan 2023 01:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673514944; cv=none; d=google.com; s=arc-20160816; b=GU9e8PUG5KSWJ867E29ZSesHgWRVJub85V99TIPiR6nRCq0kLmGQvtCrxTvO18YQ79 dOlgzMcIxZjK1aXib3Sws2UyCZIMmBGFC+uA/Lue45pZnyKz5GgjCc4hBqKUgch+nvqt D/tPnRjb7pv21/Qr31cblYu3L8RPEDubCF/QUmTHMn5vn/gkjrffZaf1MOPMPTqLjSDX uXVa2cZgoSJo+f2nXHlTs+UUgabOgHCUOioNnZlBNG6chkXmgrYwYuN8M/GiU6+kNAW0 oKbyHW8xY/T/zvAZxAsIH9v7sebIKBE+AVIlh99UxxaWMO0tppXa3p1rf4Za34ehq83s R09A== 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=IL5ZIP9DYWv2XGsGuDCylsAv4oLuc8Ydy6IeN3eeYd4=; b=QTfVUhLhMD4OGafS1zOKDf5MHi1RV9534BC9pR0MSxIVN1CpxTlvoEPtpkWnwxeNGR TVdYYPz/ul7DJ264I8R9bbgiH3zWk9HdntHX+Od1EAoBIKPcdorMHjpdyy0f2q3p62Bx fdS8dVNyNLmqwVmvRpMg9KIMImjpXOoaswYSPCNDqUOzw0fZPPbDBbPRzP476YP4MBNO b5E30kejZPQoX2H6xc9vr3hKMok0QUr9SMZzESYqEiEw7+ixlJACvHbVpIlfld3VOie5 5NK9RrOSQdQ//vf8v9HRWbZU+7Wp1zOioWGlOuaqJ1x68kue/DIvu4z442fMhvT8r/rz kckA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gMBriOPk; 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 y20-20020a056402441400b0048ea97eec14si22419744eda.609.2023.01.12.01.15.21; Thu, 12 Jan 2023 01:15:44 -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=gMBriOPk; 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 S239983AbjALJMt (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Thu, 12 Jan 2023 04:12:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239952AbjALJKj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Jan 2023 04:10:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D895AE48; Thu, 12 Jan 2023 01:06:46 -0800 (PST) Date: Thu, 12 Jan 2023 09:06:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673514405; 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=IL5ZIP9DYWv2XGsGuDCylsAv4oLuc8Ydy6IeN3eeYd4=; b=gMBriOPkAjWzM9xfLa3A64Yd5U4lcLMC6VczYi2ZjqqZYkEBXE3sPgQtkvi/N7O2tH19yP sJJSaHpdLvFutSM33EimXj9jtprToVStt7CTkF23zTrFHxMpLk3dmpJvpDiwjRSqk5YLdg qP3fQsSWCDfF3nohundfiOeP+OS7e+xyng1CBYjRLDkTI90r878h0sw1pKjKbDwhF3xgv7 LBFF8xnDN/6HgPljCm7VcWTdMe5RLPL2qPgN8YqCY9DvPsf1soY9aFLkSvDoZzHpgsLt1e E9L5tBSi8JZcGrhy3dqAOWkd3CfK8hdNWyOBhloe/3d/fO1XTwvf4Ns6YYdRPQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673514405; 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=IL5ZIP9DYWv2XGsGuDCylsAv4oLuc8Ydy6IeN3eeYd4=; b=6Ithw1n9crRy+7vgHkI2hSAbatOvGxTYOQlxN9Qvf71fFnacFl2sJukVIW/ib45gdbUQfP OJwXYT6mmX9m+KDA== From: "tip-bot2 for Juergen Gross" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/mm: fix poking_init() for Xen PV guests Cc: Juergen Gross <jgross@suse.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230109150922.10578-1-jgross@suse.com> References: <20230109150922.10578-1-jgross@suse.com> MIME-Version: 1.0 Message-ID: <167351440417.4906.2133498085196807325.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754558272956461860?= X-GMAIL-MSGID: =?utf-8?q?1754807606076270560?= |
Series |
[tip:,x86/urgent] x86/mm: fix poking_init() for Xen PV guests
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Jan. 12, 2023, 9:06 a.m. UTC
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 8a6b240fef388e9c2c40dcb72d142ee781f6432a Gitweb: https://git.kernel.org/tip/8a6b240fef388e9c2c40dcb72d142ee781f6432a Author: Juergen Gross <jgross@suse.com> AuthorDate: Mon, 09 Jan 2023 16:09:22 +01:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Thu, 12 Jan 2023 09:48:02 +01:00 x86/mm: fix poking_init() for Xen PV guests Commit 3f4c8211d982 ("x86/mm: Use mm_alloc() in poking_init()") broke the kernel for running as Xen PV guest. It seems as if the new address space is never activated before being used, resulting in Xen rejecting to accept the new CR3 value (the PGD isn't pinned). Fix that by adding the now missing call of paravirt_arch_dup_mmap() to poking_init(). That call was previously done by dup_mm()->dup_mmap() and it is a NOP for all cases but for Xen PV, where it is just doing the pinning of the PGD. Fixes: 3f4c8211d982 ("x86/mm: Use mm_alloc() in poking_init()") Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20230109150922.10578-1-jgross@suse.com --- arch/x86/mm/init.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index d398735..5f8ba53 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -804,6 +804,9 @@ void __init poking_init(void) poking_mm = mm_alloc(); BUG_ON(!poking_mm); + /* Xen PV guests need the PGD to be pinned. */ + paravirt_arch_dup_mmap(NULL, poking_mm); + /* * Randomize the poking address, but make sure that the following page * will be mapped at the same PMD. We need 2 pages, so find space for 3,