From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v7 12/32] xen/x86: add bitmap of enabled emulated devices Date: Thu, 8 Oct 2015 12:35:03 +0200 Message-ID: <561646D7.2090002@citrix.com> References: <1443800943-17668-1-git-send-email-roger.pau@citrix.com> <1443800943-17668-13-git-send-email-roger.pau@citrix.com> <5616605902000078000A93E8@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zk8XU-0005zd-1V for xen-devel@lists.xenproject.org; Thu, 08 Oct 2015 10:35:08 +0000 In-Reply-To: <5616605902000078000A93E8@prv-mh.provo.novell.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: Jan Beulich Cc: Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Andrew Cooper , Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 08/10/15 a les 12.23, Jan Beulich ha escrit: >>>> On 02.10.15 at 17:48, wrote: >> @@ -517,6 +520,22 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags, >> d->domain_id); >> } >> >> + if ( (config->emulation_flags & ~XEN_X86_EMU_ALL) != 0 ) >> + { >> + printk(XENLOG_G_ERR "d%d: Invalid emulation bitmap: %#x\n", >> + d->domain_id, config->emulation_flags); >> + return -EINVAL; >> + } >> + if ( (is_hvm_domain(d) && config->emulation_flags != XEN_X86_EMU_ALL) || >> + (is_pv_domain(d) && config->emulation_flags != 0) ) > > How about PVH? At this point of the series I'm sure it also needs all flags > clear? In which case this should become > > if ( is_hvm_domain(d) ? (config->emulation_flags != XEN_X86_EMU_ALL) > : (config->emulation_flags != 0) ) Right, PVH domains return false for both is_hvm_domain and is_pv_domain. Roger.