From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v6 11/29] xen/x86: add bitmap of enabled emulated devices Date: Wed, 23 Sep 2015 13:43:54 +0200 Message-ID: <5602907A.6050200@citrix.com> References: <1441368548-43465-1-git-send-email-roger.pau@citrix.com> <1441368548-43465-12-git-send-email-roger.pau@citrix.com> <20150904122537.GC27133@zion.uk.xensource.com> <55E9A1D5.7080302@citrix.com> <55E9BEE6020000780009FC4A@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 1ZeiSu-0005SQ-UE for xen-devel@lists.xenproject.org; Wed, 23 Sep 2015 11:44:01 +0000 In-Reply-To: <55E9BEE6020000780009FC4A@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 , Wei Liu Cc: Andrew Cooper , xen-devel@lists.xenproject.org, Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org El 04/09/15 a les 15.55, Jan Beulich ha escrit: >>>> On 04.09.15 at 15:51, wrote: >> El 04/09/15 a les 14.25, Wei Liu ha escrit: >>> On Fri, Sep 04, 2015 at 02:08:50PM +0200, Roger Pau Monne wrote: >>>> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c >>>> index 045f6ff..fe9504f 100644 >>>> --- a/xen/arch/x86/domain.c >>>> +++ b/xen/arch/x86/domain.c >>>> @@ -555,6 +555,29 @@ int arch_domain_create(struct domain *d, unsigned int >> domcr_flags, >>>> d->domain_id); >>>> } >>>> >>>> + if ( is_hvm_domain(d) ) >>>> + { >>>> + uint32_t emulation_mask = (XEN_X86_EMU_LAPIC | XEN_X86_EMU_HPET | >>>> + XEN_X86_EMU_PMTIMER | XEN_X86_EMU_RTC | >>>> + XEN_X86_EMU_IOAPIC | XEN_X86_EMU_PIC | >>>> + XEN_X86_EMU_PMU | XEN_X86_EMU_VGA | >>>> + XEN_X86_EMU_IOMMU); >>> >>> This is repetitive. Could you consolidate all these to >>> >>> #define XEN_X86_EMU_ALL ... >>> >>> ? >> >> That sounds fine, I would place it in the public header where all the >> XEN_X86_EMU_* are defined. I will wait for Andrew's opinion, since he >> already acked this patch. > > This doesn't belong in the public ABI, so if at all it should be added > there inside #ifdef __XEN__. Alternatively (and perhaps preferably) > this would go into another (internal) header. The definitions of XEN_X86_EMU_* and xen_arch_domainconfig are already protected with: #if defined(__XEN__) || defined(__XEN_TOOLS__) I don't mind putting them in a different header, but I think this needs to live in the public headers, and IMHO public/arch-x86/xen.h is probably the best place, specially taking into account that xen_arch_domainconfig is also defined there. Unless someone objects and provides a more suitable location I'm going to define XEN_X86_EMU_ALL there also. Roger.