From: "Jan Beulich" Subject: Re: [PATCH 06/18] PVH xen: Introduce PVH guest type and some basic changes. Date: Wed, 26 Jun 2013 09:18:44 +0100 Message-ID: <51CAC00402000078000E09CE@nat28.tlf.novell.com> References: <1372118507-16864-1-git-send-email-mukesh.rathor@oracle.com> <1372118507-16864-7-git-send-email-mukesh.rathor@oracle.com> <51C9788302000078000E0408@nat28.tlf.novell.com> <20130625181418.577b6483@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130625181418.577b6483@mantra.us.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 26.06.13 at 03:14, Mukesh Rathor wrote: > On Tue, 25 Jun 2013 10:01:23 +0100 "Jan Beulich" wrote: >> >>> On 25.06.13 at 02:01, Mukesh Rathor >> > --- a/xen/include/xen/sched.h >> > +++ b/xen/include/xen/sched.h >> > @@ -238,6 +238,14 @@ struct mem_event_per_domain >> > struct mem_event_domain access; >> > }; >> > >> > +/* >> > + * PVH is a PV guest running in an HVM container. While is_hvm_* >> > checks are >> > + * false for it, it uses many of the HVM data structs. >> > + */ >> > +enum guest_type { >> > + is_pv, is_pvh, is_hvm >> >> Pretty odd names for enumerators - it's more conventional for them >> to have a prefix identifying their enumeration type in some way. > > Ok, which is better: > > guest_is_pv, guest_is_pvh, guest_is_hvm > or > guest_type_is_pv, guest_type_is_pvh, guest_type_is_hvm > or > dom_is_pv, dom_is_pvh, dom_is_hvm (change enum to domain_type) guest_type_pv, guest_type_pvh, guest_type_hvm or dom_pv, dom_pvh, dom_hvm (change enum to domain_type) Are both fine with me - I mainly dislike the "is" in the names, as to me that's only a sensible prefix or infix for a function or macro testing a property. Jan