Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4598688imm; Tue, 11 Sep 2018 14:40:45 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbjp4DV7pzhTzc8YWohYQp+igHlGlnqIOanxQHFUdvbokWo/3delmmunilEdMPhV5rrVOr3 X-Received: by 2002:a17:902:4401:: with SMTP id k1-v6mr28418650pld.97.1536702045860; Tue, 11 Sep 2018 14:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536702045; cv=none; d=google.com; s=arc-20160816; b=vo2oon7K7ZbGx5BSFYg9mqrDa/8VjOwgHTSq6CVOF6wBQ1GkZvc7AhPjefy2X/m7Ll 9HZ33QlnR+WOv6eolxgZldLA81iOcRpt0SsGcqq0xFu/GFck2IRKDnHMJqxRtEoXPOxA 0LrdPKG6Pi+f3rL/Qv6njQzof5HtWbrUjEN7QzoyolerPdaJqayxZ/Wvm7jIUPdExEf+ kngUOZnsIfSwdlntPCMHvKRvfNU2Xu4e+mUxbbVFYUMEyEWd7ggS4AlaPZ87XNPSEUnh 5ZRppTynLiv2pTr4oJj4TrCGdiXot0/7w3X8G0VDN3jURgkMShwBgixsnDOGV3W8zKwd 5iUw== 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; bh=jy1O+BRsHUAH+SC8eVw7Inzdo0fcv0uoNdV/u/cXgiI=; b=w0fSJ7jHKCWdsgLSqbecBtmvQ3FmQY5VGl+CZaqnYL2L1EwuslA8oKeB/NystfOK5a yAOdZLVzi3QihPIpJ638EqX1kB+GhNjVF7KQXTlTIpAKtE0/ZDQDD99b2Q0sdxhaRkjy 3jsYQE8aRiX2VvoBiu/zRDYd/6LZI9zXQANt1tuVQB+gZPNA+a05DFgoxqY1Qyww2KKx rJdHDulrY2BH/EaAKSaH5qhrfpIJr5dLwsuKeQ6D3aRojaFTsW6mzfFEECD/Nnn7fIOP YwTGQqkOEdI8Wu0cLJCzDqWAnkh87smGnfc0GD+hZ3ubXI9XTDa454DTN4zVYUdrUY4C tndA== 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 n11-v6si22590031pgr.467.2018.09.11.14.40.29; Tue, 11 Sep 2018 14:40:45 -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 S1728078AbeILClb (ORCPT + 99 others); Tue, 11 Sep 2018 22:41:31 -0400 Received: from terminus.zytor.com ([198.137.202.136]:33573 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726870AbeILClb (ORCPT ); Tue, 11 Sep 2018 22:41:31 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8BLdst52389069 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 11 Sep 2018 14:39:54 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8BLdsvg2389066; Tue, 11 Sep 2018 14:39:54 -0700 Date: Tue, 11 Sep 2018 14:39:54 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Boris Ostrovsky Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, andy@strugglers.net, boris.ostrovsky@oracle.com Reply-To: mingo@kernel.org, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, andy@strugglers.net, hpa@zytor.com, tglx@linutronix.de In-Reply-To: <20180911195538.23289-1-boris.ostrovsky@oracle.com> References: <20180911195538.23289-1-boris.ostrovsky@oracle.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/EISA: Don't probe EISA bus for Xen PV guests Git-Commit-ID: 6a92b11169a65b3f8cc512c75a252cbd0d096ba0 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, DATE_IN_FUTURE_96_Q 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: 6a92b11169a65b3f8cc512c75a252cbd0d096ba0 Gitweb: https://git.kernel.org/tip/6a92b11169a65b3f8cc512c75a252cbd0d096ba0 Author: Boris Ostrovsky AuthorDate: Tue, 11 Sep 2018 15:55:38 -0400 Committer: Thomas Gleixner CommitDate: Tue, 11 Sep 2018 23:36:50 +0200 x86/EISA: Don't probe EISA bus for Xen PV guests For unprivileged Xen PV guests this is normal memory and ioremap will not be able to properly map it. While at it, since ioremap may return NULL, add a test for pointer's validity. Reported-by: Andy Smith Signed-off-by: Boris Ostrovsky Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Cc: xen-devel@lists.xenproject.org Cc: jgross@suse.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180911195538.23289-1-boris.ostrovsky@oracle.com --- arch/x86/kernel/eisa.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/eisa.c b/arch/x86/kernel/eisa.c index f260e452e4f8..e8c8c5d78dbd 100644 --- a/arch/x86/kernel/eisa.c +++ b/arch/x86/kernel/eisa.c @@ -7,11 +7,17 @@ #include #include +#include + static __init int eisa_bus_probe(void) { - void __iomem *p = ioremap(0x0FFFD9, 4); + void __iomem *p; + + if (xen_pv_domain() && !xen_initial_domain()) + return 0; - if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24)) + p = ioremap(0x0FFFD9, 4); + if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24)) EISA_bus = 1; iounmap(p); return 0;