From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH v1 4/8]: PVH setup changes... Date: Mon, 24 Sep 2012 15:48:34 -0700 Message-ID: <20120924154834.434dce06@mantra.us.oracle.com> References: <20120921121752.5fa80b35@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "Xen-devel@lists.xensource.com" , Ian Campbell , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Mon, 24 Sep 2012 13:14:45 +0100 Stefano Stabellini wrote: > On Fri, 21 Sep 2012, Mukesh Rathor wrote: > > @@ -500,10 +527,9 @@ void __cpuinit xen_enable_syscall(void) > > #endif /* CONFIG_X86_64 */ > > } > > > > -void __init xen_arch_setup(void) > > +/* Non auto translated PV domain, ie, it's not PVH. */ > > +static __init void inline xen_non_pvh_arch_setup(void) > > { > > - xen_panic_handler_init(); > > - > > HYPERVISOR_vm_assist(VMASST_CMD_enable, > > VMASST_TYPE_4gb_segments); HYPERVISOR_vm_assist(VMASST_CMD_enable, > > VMASST_TYPE_writable_pagetables); > > @@ -517,6 +543,15 @@ void __init xen_arch_setup(void) > > > > xen_enable_sysenter(); > > xen_enable_syscall(); > > +} > > + > > +/* This function not called for HVM domain */ > > +void __init xen_arch_setup(void) > > +{ > > + xen_panic_handler_init(); > > + > > + if (!xen_feature(XENFEAT_auto_translated_physmap)) > > + xen_non_pvh_arch_setup(); > > > > #ifdef CONFIG_ACPI > > if (!(xen_start_info->flags & SIF_INITDOMAIN)) { > > IMHO having a xen_non_pvh_arch_setup function is less intuitive > than just wrapping all that code around an > > if (!xen_feature(XENFEAT_auto_translated_physmap)) { > Too much indentation. > Or at least you could name the function xen_pvmmu_arch_setup. ok, fine, i'll rename it again.