From: Tim Deegan Subject: Re: [PATCH v14 05/17] pvh: Introduce PVH guest type Date: Thu, 7 Nov 2013 00:28:10 +0100 Message-ID: <20131106232810.GB32964@deinos.phlegethon.org> References: <1383567306-6636-1-git-send-email-george.dunlap@eu.citrix.com> <1383567306-6636-6-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1383567306-6636-6-git-send-email-george.dunlap@eu.citrix.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: George Dunlap Cc: Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 12:14 +0000 on 04 Nov (1383563694), George Dunlap wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -239,6 +239,17 @@ struct domain *domain_create( > > if ( domcr_flags & DOMCRF_hvm ) > d->guest_type = guest_type_hvm; > + else if ( domcr_flags & DOMCRF_pvh ) > + { > + if ( !(domcr_flags & DOMCRF_hap) ) > + { > + err = -EOPNOTSUPP; > + printk(XENLOG_INFO "PVH guest must have HAP on\n"); > + goto fail; > + } > + d->guest_type = guest_type_pvh; > + printk("Creating PVH guest d%d\n", d->domain_id); > + } This check seems like it should be in arch-specific code. If it were in arch_domain_create(), it would also correctly handle the case where the tools asked for PVH+HAP but HAP wasn't available. Tim.