From patchwork Thu Apr 7 00:06:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8767571 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5ED559F372 for ; Thu, 7 Apr 2016 00:09:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66D0A201E4 for ; Thu, 7 Apr 2016 00:09:06 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2067C20204 for ; Thu, 7 Apr 2016 00:09:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anxTV-0002gq-9R; Thu, 07 Apr 2016 00:07:05 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anxTV-0002fq-1S for xen-devel@lists.xensource.com; Thu, 07 Apr 2016 00:07:05 +0000 Received: from [193.109.254.147] by server-3.bemta-14.messagelabs.com id 0B/03-03304-8A4A5075; Thu, 07 Apr 2016 00:07:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh+7yJaz hBh13dCzuTXnP7sDosb1vF3sAYxRrZl5SfkUCa8aFXXkFs/kqNl66zdLAOIWni5GLQ0hgKqPE 0znNLBDODCaJk0s3s3UxcnCwCehK3Lwt0cXIySEikCBx9+k3ZpAaZoFvTBK7Tz9jBkkIC3hI3 L93lQ3EZhFQlWjYvw8szivgIDFlzRGwuISAnETLj92sIDangKPE8lNTwWwhoJrGpUsYIWoyJO b1zGGFsL0kFt24BGWrSVw9t4l5AiPfAkaGVYwaxalFZalFuoameklFmekZJbmJmTm6hoYmerm pxcWJ6ak5iUnFesn5uZsYgWFSz8DAuIPx72nPQ4ySHExKoryulazhQnxJ+SmVGYnFGfFFpTmp xYcYZTg4lCR4jy0GygkWpaanVqRl5gADFiYtwcGjJMK7AiTNW1yQmFucmQ6ROsWoKCXOOxEkI QCSyCjNg2uDRcklRlkpYV5GBgYGIZ6C1KLczBJU+VeM4hyMSsK890Cm8GTmlcBNfwW0mAlocb 0wE8jikkSElFQD47Tbs1sTDSY2bHKQXZ47/ePpVXe7+E+tEDh+tfN1rVNq2H2uwz3rDL1dxTa 8/nPpTAIrw9c64QtBX1SaYvfG3DRh2DvV+Jxvm9pkXZkdM5a8FZ3laaE+d92/qDuK199s5OyJ SjWrs4gOdXCXPvFuxud/y6q0Iznj5lXnr+5akO59IlpWJIl5tRJLcUaioRZzUXEiAOJ0DCSNA gAA X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-13.tower-27.messagelabs.com!1459987622!36090804!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30669 invoked from network); 7 Apr 2016 00:07:03 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-13.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 7 Apr 2016 00:07:03 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92AA320256; Thu, 7 Apr 2016 00:07:01 +0000 (UTC) Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 415152025B; Thu, 7 Apr 2016 00:07:00 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Wed, 6 Apr 2016 17:06:26 -0700 Message-Id: <1459987594-5434-7-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459987594-5434-1-git-send-email-mcgrof@kernel.org> References: <1459987594-5434-1-git-send-email-mcgrof@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: xen-devel@lists.xensource.com, matt@codeblueprint.co.uk, andrew.cooper3@citrix.com, x86@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, jlee@suse.com, "Luis R. Rodriguez" , lguest@lists.ozlabs.org, glin@suse.com, david.vrabel@citrix.com, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com Subject: [Xen-devel] [PATCH v4 06/14] x86/init: use a platform legacy quirk for ebda X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This replaces the paravirt_enabled() check with a proper x86 legacy platform quirk. Signed-off-by: Luis R. Rodriguez --- arch/x86/include/asm/x86_init.h | 3 +++ arch/x86/kernel/head.c | 2 +- arch/x86/kernel/platform-quirks.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 27d5c3fe5198..f3f81122ae3b 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -145,9 +145,12 @@ struct timespec; * struct x86_legacy_features - legacy x86 features * * @rtc: this device has a CMOS real-time clock present + * @ebda_search: it's safe to search for the EBDA signature in the hardware's + * low RAM */ struct x86_legacy_features { int rtc; + int ebda_search; }; /** diff --git a/arch/x86/kernel/head.c b/arch/x86/kernel/head.c index 992f442ca155..afe65dffee80 100644 --- a/arch/x86/kernel/head.c +++ b/arch/x86/kernel/head.c @@ -38,7 +38,7 @@ void __init reserve_ebda_region(void) * that the paravirt case can handle memory setup * correctly, without our help. */ - if (paravirt_enabled()) + if (!x86_platform.legacy.ebda_search) return; /* end of low (conventional) memory */ diff --git a/arch/x86/kernel/platform-quirks.c b/arch/x86/kernel/platform-quirks.c index 1b114ac5996f..a871b6b0e35f 100644 --- a/arch/x86/kernel/platform-quirks.c +++ b/arch/x86/kernel/platform-quirks.c @@ -7,8 +7,12 @@ void __init x86_early_init_platform_quirks(void) { x86_platform.legacy.rtc = 1; + x86_platform.legacy.ebda_search = 0; switch (boot_params.hdr.hardware_subarch) { + case X86_SUBARCH_PC: + x86_platform.legacy.ebda_search = 1; + break; case X86_SUBARCH_XEN: case X86_SUBARCH_LGUEST: case X86_SUBARCH_INTEL_MID: