Received: by 10.192.165.148 with SMTP id m20csp833652imm; Fri, 27 Apr 2018 08:13:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpXeBJ7UFUcvYt/Kb3CsKVjPfU5O9okUPHCWpsJHGKPQwbWN5FwNeR8l54Rw8RkWrzXCX/G X-Received: by 2002:a63:6344:: with SMTP id x65-v6mr2504437pgb.34.1524842030528; Fri, 27 Apr 2018 08:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842030; cv=none; d=google.com; s=arc-20160816; b=FTg+f9L85gvridff59j0xFfe8Xu0TrUCBXDhJtsaDHg9Lntidl0AuOfiIXpC7IcHXC Q+oRouwvRMZyMqcJU6Qn7C1FbZF++ItMarKwsGiPrZ81eeLNv0EdgOy+byhKTlJRFFfl adraf12oLCRKobINxNhrUlw3U7A47XZzVSy4/SEFVel0NIKSTWaG1pNqQPTkWzeuCeSc VZB9gmCoenEySYtJE+7S2yKIT7DMUfxncz57XM8IwZbU37KNta2XsBm1ycSspoDvHqfR Os4ooq/stDOTlghFBkpKOucN50ErgR2RGH+Rh/9Ifse9GQ0zsi54e9Smm9i7TUil5fgZ bUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=hegoUGS5MeodR+BV9Ton+EdouzkoB1x6Li0IwW9lh/M=; b=raYbSlOXAi/0FWFDDrShGfa1Guo4AM8OPmdc2gpLsJ2ZWTJFRMsDnJQ99uMfkJgd80 hDyawvpqut38/vMZa2Os58GtLMWH1qOuq64Yh2Nqj346lpEQM/votv5Z6PC42RJnc0mz SrSYcBgjnp/hbqrmtbpKrXp/IUMSJltWR9vdpdA2CAeR4lEMXdM/CeakQEdKCC/JhHri Iti9/F269BsIr2vX32xBZ+CWXpXaZaxKqU1uAz8S6f70rmq3xH+cbAJw2TJHE446lMEg f/VtD4dLmw7u9HBFxHi0qdMbH0rfYIkeSlUpYFpL9H30x+U6k7q4NMo6SKLd6zOgYfD7 7PDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24si191246pfj.231.2018.04.27.08.13.36; Fri, 27 Apr 2018 08:13:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933883AbeD0PMa (ORCPT + 99 others); Fri, 27 Apr 2018 11:12:30 -0400 Received: from terminus.zytor.com ([198.137.202.136]:53515 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933750AbeD0PMQ (ORCPT ); Fri, 27 Apr 2018 11:12:16 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w3RF9k2u2331756; Fri, 27 Apr 2018 08:09:46 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w3RF9i9m2331753; Fri, 27 Apr 2018 08:09:44 -0700 Date: Fri, 27 Apr 2018 08:09:44 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Petr Tesarik Message-ID: Cc: ptesarik@suse.cz, thomas.lendacky@amd.com, boris.ostrovsky@oracle.com, mpatocka@redhat.com, tglx@linutronix.de, jgross@suse.com, luto@kernel.org, ptesarik@suse.com, linux-kernel@vger.kernel.org, douly.fnst@cn.fujitsu.com, mingo@kernel.org, jdelvare@suse.de, hpa@zytor.com, bp@suse.de Reply-To: ptesarik@suse.com, linux-kernel@vger.kernel.org, douly.fnst@cn.fujitsu.com, mingo@kernel.org, jdelvare@suse.de, hpa@zytor.com, bp@suse.de, thomas.lendacky@amd.com, ptesarik@suse.cz, boris.ostrovsky@oracle.com, mpatocka@redhat.com, tglx@linutronix.de, jgross@suse.com, luto@kernel.org In-Reply-To: <20180425120835.23cef60c@ezekiel.suse.cz> References: <20180425120835.23cef60c@ezekiel.suse.cz> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/setup: Do not reserve a crash kernel region if booted on Xen PV Git-Commit-ID: 3db3eb285259ac129f7aec6b814b3e9f6c1b372b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 3db3eb285259ac129f7aec6b814b3e9f6c1b372b Gitweb: https://git.kernel.org/tip/3db3eb285259ac129f7aec6b814b3e9f6c1b372b Author: Petr Tesarik AuthorDate: Wed, 25 Apr 2018 12:08:35 +0200 Committer: Thomas Gleixner CommitDate: Fri, 27 Apr 2018 17:06:28 +0200 x86/setup: Do not reserve a crash kernel region if booted on Xen PV Xen PV domains cannot shut down and start a crash kernel. Instead, the crashing kernel makes a SCHEDOP_shutdown hypercall with the reason code SHUTDOWN_crash, cf. xen_crash_shutdown() machine op in arch/x86/xen/enlighten_pv.c. A crash kernel reservation is merely a waste of RAM in this case. It may also confuse users of kexec_load(2) and/or kexec_file_load(2). When flags include KEXEC_ON_CRASH or KEXEC_FILE_ON_CRASH, respectively, these syscalls return success, which is technically correct, but the crash kexec image will never be actually used. Signed-off-by: Petr Tesarik Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Tom Lendacky Cc: Dou Liyang Cc: Mikulas Patocka Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: xen-devel@lists.xenproject.org Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Jean Delvare Link: https://lkml.kernel.org/r/20180425120835.23cef60c@ezekiel.suse.cz --- arch/x86/kernel/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 6285697b6e56..5c623dfe39d1 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -534,6 +535,11 @@ static void __init reserve_crashkernel(void) high = true; } + if (xen_pv_domain()) { + pr_info("Ignoring crashkernel for a Xen PV domain\n"); + return; + } + /* 0 means: find the address automatically */ if (crash_base <= 0) { /*