From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752010AbdCHPMx (ORCPT ); Wed, 8 Mar 2017 10:12:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:46445 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751805AbdCHPMs (ORCPT ); Wed, 8 Mar 2017 10:12:48 -0500 Subject: Re: [PATCH v2 03/21] x86/xen: add CONFIG_XEN_PV to Kconfig To: Vitaly Kuznetsov , xen-devel@lists.xenproject.org References: <20170302175357.8222-1-vkuznets@redhat.com> <20170302175357.8222-4-vkuznets@redhat.com> Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Boris Ostrovsky , Andrew Jones From: Juergen Gross Message-ID: <6d7f439c-417c-4ca3-35e5-4c725a2f2d8c@suse.com> Date: Wed, 8 Mar 2017 16:12:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170302175357.8222-4-vkuznets@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/03/17 18:53, Vitaly Kuznetsov wrote: > All code to supprot Xen PV will get under this new option. For the s/supprot/support/ > beginning, check for it in the common code. > > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kernel/cpu/hypervisor.c | 4 +++- > arch/x86/kernel/process_64.c | 2 +- > arch/x86/xen/Kconfig | 23 ++++++++++++++++++----- > 3 files changed, 22 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c > index a77f18d..ce6fcc3 100644 > --- a/arch/x86/kernel/cpu/hypervisor.c > +++ b/arch/x86/kernel/cpu/hypervisor.c > @@ -28,8 +28,10 @@ > > static const __initconst struct hypervisor_x86 * const hypervisors[] = > { > -#ifdef CONFIG_XEN > +#ifdef CONFIG_XEN_PV > &x86_hyper_xen_pv, > +#endif > +#ifdef CONFIG_XEN_PVHVM > &x86_hyper_xen_hvm, > #endif > &x86_hyper_vmware, > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > index a61e141..5e8d129 100644 > --- a/arch/x86/kernel/process_64.c > +++ b/arch/x86/kernel/process_64.c > @@ -438,7 +438,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) > task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV)) > __switch_to_xtra(prev_p, next_p, tss); > > -#ifdef CONFIG_XEN > +#ifdef CONFIG_XEN_PV > /* > * On Xen PV, IOPL bits in pt_regs->flags have no effect, and > * current_pt_regs()->flags may not match the current task's > diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig > index 76b6dbd..c387560 100644 > --- a/arch/x86/xen/Kconfig > +++ b/arch/x86/xen/Kconfig > @@ -6,7 +6,6 @@ config XEN > bool "Xen guest support" > depends on PARAVIRT > select PARAVIRT_CLOCK > - select XEN_HAVE_PVMMU > select XEN_HAVE_VPMU > depends on X86_64 || (X86_32 && X86_PAE) > depends on X86_LOCAL_APIC && X86_TSC > @@ -15,18 +14,32 @@ config XEN > kernel to boot in a paravirtualized environment under the > Xen hypervisor. > > +config XEN_PV > + bool "Xen PV guest support" > + default y > + depends on XEN select XEN_HAVE_PVMMU is missing ... > + help > + Support running as a Xen PV guest. > + > config XEN_DOM0 > - def_bool y > - depends on XEN && PCI_XEN && SWIOTLB_XEN > + bool "Xen PV Dom0 support" > + default y > + depends on XEN_PV && PCI_XEN && SWIOTLB_XEN > depends on X86_IO_APIC && ACPI && PCI > + select XEN_HAVE_PVMMU ... and can be dropped here Juergen