From: Mukesh Rathor Subject: Re: [RFC PATCH 1/8]: PVH: Basic and preparatory changes Date: Mon, 20 Aug 2012 16:42:21 -0700 Message-ID: <20120820164221.3ce8f879@mantra.us.oracle.com> References: <20120815175724.3405043a@mantra.us.oracle.com> <1345192554.30865.93.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1345192554.30865.93.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Fri, 17 Aug 2012 09:35:54 +0100 Ian Campbell wrote: > On Thu, 2012-08-16 at 01:57 +0100, Mukesh Rathor wrote: > > > +void __init xen_arch_setup(void) > > +{ > > + xen_panic_handler_init(); > > + > > + if (!xen_pvh_domain()) > > + xen_non_pvh_arch_setup(); > > The negative in the fn name here strikes me as a bit weird. Can't this > just be xen_pv_arch_setup? Well, PVH is PV, so xen_pv_arch_setup would be confusing. Thus I can't say if (xen_pv_domain()). The negative logic tells the reader right away that the PV code doesn't apply to PVH. I earlier had xen_pure_pv_arch_setup(), but like non_pvh better. > Or even just have: > /* Everything else is specific to PV without hardware support > */ if (xen_pvh_domain()) > return; No, the code following if statement is common to both PV and PVH.