From patchwork Wed Feb 17 20:49:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 8343261 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 042119F372 for ; Wed, 17 Feb 2016 20:52:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 262C020268 for ; Wed, 17 Feb 2016 20:52:26 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AA9C20259 for ; Wed, 17 Feb 2016 20:52:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aW92w-0006GG-N8; Wed, 17 Feb 2016 20:50:02 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aW92v-0006GB-Jc for xen-devel@lists.xensource.com; Wed, 17 Feb 2016 20:50:01 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 63/3F-29293-8FCD4C65; Wed, 17 Feb 2016 20:50:00 +0000 X-Env-Sender: bp@alien8.de X-Msg-Ref: server-14.tower-206.messagelabs.com!1455742200!22832090!1 X-Originating-IP: [78.46.96.112] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13684 invoked from network); 17 Feb 2016 20:50:00 -0000 Received: from mail.skyhub.de (HELO mail.skyhub.de) (78.46.96.112) by server-14.tower-206.messagelabs.com with SMTP; 17 Feb 2016 20:50:00 -0000 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DeQvev6cVaIC; Wed, 17 Feb 2016 21:49:59 +0100 (CET) Received: from pd.tnic (p200300454B53E7000A606EFFFE5584DC.dip0.t-ipconnect.de [IPv6:2003:45:4b53:e700:a60:6eff:fe55:84dc]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 42735244943; Wed, 17 Feb 2016 21:49:59 +0100 (CET) Received: by pd.tnic (Postfix, from userid 1000) id 2374216162F; Wed, 17 Feb 2016 21:49:55 +0100 (CET) Date: Wed, 17 Feb 2016 21:49:55 +0100 From: Borislav Petkov To: "Luis R. Rodriguez" Message-ID: <20160217204954.GO2023@pd.tnic> References: <1454733014-15237-1-git-send-email-mcgrof@kernel.org> <1454733014-15237-4-git-send-email-mcgrof@kernel.org> <20160206085930.GF25240@wotan.suse.de> <56B8B4D8.7050208@oracle.com> <20160209070629.GK25240@wotan.suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Cc: X86 ML , david.e.box@intel.com, Andrey Ryabinin , Lv Zheng , Jan Beulich , "H. Peter Anvin" , qiuxishi@huawei.com, Boris Ostrovsky , Mauro Carvalho Chehab , Xen Devel , Joerg Roedel , "Rafael J. Wysocki" , Robert Moore , Ingo Molnar , Andrey Ryabinin , Rusty Russell , Thomas Gleixner , Michael Brown , Juergen Gross , Andrew Cooper , "linux-kernel@vger.kernel.org" , Andy Lutomirski , David Vrabel , long.wanglong@huawei.com, Fengguang Wu Subject: Re: [Xen-devel] [PATCH v2 3/3] paravirt: rename paravirt_enabled to paravirt_legacy X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.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 On Wed, Feb 17, 2016 at 12:07:13PM -0800, Luis R. Rodriguez wrote: > OK so here's a wiki to keep track of progress of the difference uses: > > http://kernelnewbies.org/KernelProjects/remove-paravirt-enabled > > It seems we have a resolution one way or another for all except for > the use on arch/x86/mm/dump_pagetables.c, is that right? Why not? I think we should simply check the range as ffff800000000000 - ffff87ffffffffff is practically an ABI and nothing should be mapped there anyway. No need for paravirt_enabled() there either. diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 4a6f1d9b5106..de1ee3a40250 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c @@ -358,20 +358,20 @@ static void walk_pud_level(struct seq_file *m, struct pg_state *st, pgd_t addr, #define pgd_none(a) pud_none(__pud(pgd_val(a))) #endif -#ifdef CONFIG_X86_64 static inline bool is_hypervisor_range(int idx) { +#ifdef CONFIG_X86_64 + /* * ffff800000000000 - ffff87ffffffffff is reserved for * the hypervisor. */ - return paravirt_enabled() && - (idx >= pgd_index(__PAGE_OFFSET) - 16) && + return (idx >= pgd_index(__PAGE_OFFSET) - 16) && (idx < pgd_index(__PAGE_OFFSET)); -} #else -static inline bool is_hypervisor_range(int idx) { return false; } + return false; #endif +} static void ptdump_walk_pgd_level_core(struct seq_file *m, pgd_t *pgd, bool checkwx)