From: "Jan Beulich" Subject: Re: [PATCH RFC v12 08/21] pvh: vmx-specific changes Date: Wed, 18 Sep 2013 15:25:28 +0100 Message-ID: <5239D3F802000078000F46A3@nat28.tlf.novell.com> References: <1379089521-25720-1-git-send-email-george.dunlap@eu.citrix.com> <1379089521-25720-9-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: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VMIhC-0000sj-Dx for xen-devel@lists.xenproject.org; Wed, 18 Sep 2013 14:25:34 +0000 In-Reply-To: <1379089521-25720-9-git-send-email-george.dunlap@eu.citrix.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: George Dunlap Cc: xen-devel , Keir Fraser , Eddie Dong , Jun Nakajima , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 13.09.13 at 18:25, George Dunlap wrote: > +static int pvh_check_requirements(struct vcpu *v) > +{ > + u64 required, tmpval = real_cr4_to_pv_guest_cr4(mmu_cr4_features); > + > + if ( !paging_mode_hap(v->domain) ) > + { > + printk(XENLOG_G_INFO "HAP is required for PVH guest.\n"); > + return -EINVAL; > + } > + if ( !cpu_has_vmx_ept ) > + { > + printk(XENLOG_G_INFO "PVH: CPU does not have EPT support\n"); > + return -ENOSYS; While I realize that this was that was perhaps in what you took from Mukesh, I think this and similar uses of -ENOSYS are misguided; -EOPNOTSUPP would seem more appropriate. > + /* PVH: I don't think these are necessary */ > + v->arch.hvm_vmx.exec_control &= ~CPU_BASED_VIRTUAL_NMI_PENDING; > + vmentry_ctl &= ~VM_ENTRY_LOAD_GUEST_EFER; Particularly these two would be nice to be confirmed by our VMX maintainers, who you should have Cc-ed. Jan