From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757795AbdLRLuY (ORCPT ); Mon, 18 Dec 2017 06:50:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:40495 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495AbdLRLuW (ORCPT ); Mon, 18 Dec 2017 06:50:22 -0500 Subject: Re: [PATCH v2] x86-64/Xen: eliminate W+X mappings To: Jan Beulich , Boris Ostrovsky Cc: mingo@elte.hu, tglx@linutronix.de, xen-devel , linux-kernel@vger.kernel.org, hpa@zytor.com References: <5A2FAEB802000055000F9D66@suse.com> <5A2FBE540200007800196B52@suse.com> <5A37B0770200007800198130@suse.com> From: Juergen Gross Message-ID: <903b2ec7-8338-658f-665b-41719e82387b@suse.com> Date: Mon, 18 Dec 2017 12:50:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A37B0770200007800198130@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/12/17 12:11, Jan Beulich wrote: > A few thousand such pages are usually left around due to the re-use of > L1 tables having been provided by the hypervisor (Dom0) or tool stack > (DomU). Set NX in the direct map variant, which needs to be done in L2 > due to the dual use of the re-used L1s. > > For x86_configure_nx() to actually do what it is supposed to do, call > get_cpu_cap() first. This was broken by commit 4763ed4d45 ("x86, mm: > Clean up and simplify NX enablement") when switching away from the > direct EFER read. > > Signed-off-by: Jan Beulich > --- > v2: Adjust comment style and indentation. > --- > While I certainly dislike the added header inclusion to obtain the > prototype for get_cpu_cap(), I couldn't find a better alternative. I'm > open to suggestions. Move the prototype to arch/x86/include/asm/cpu.h ? With that fixed (or without it in case the x86 maintainers don't like the prototype to be moved): Reviewed-by: Juergen Gross Juergen