From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v8 01/21] xen/x86: add bitmap of enabled emulated devices Date: Mon, 16 Nov 2015 18:33:12 +0000 Message-ID: <564A2168.7050402@citrix.com> References: <1446825955-11842-1-git-send-email-roger.pau@citrix.com> <1446825955-11842-2-git-send-email-roger.pau@citrix.com> <5649D78C02000078000B535D@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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyOad-00032B-MN for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 18:33:19 +0000 In-Reply-To: <5649D78C02000078000B535D@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 , Roger Pau Monne Cc: Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 16/11/15 12:18, Jan Beulich wrote: >>>> On 06.11.15 at 17:05, wrote: >> --- a/xen/include/public/arch-x86/xen.h >> +++ b/xen/include/public/arch-x86/xen.h >> @@ -265,7 +265,31 @@ typedef struct arch_shared_info arch_shared_info_t; >> * XEN_DOMCTL_INTERFACE_VERSION. >> */ >> struct xen_arch_domainconfig { >> - char dummy; >> +#define _XEN_X86_EMU_LAPIC 0 >> +#define XEN_X86_EMU_LAPIC (1U<<_XEN_X86_EMU_LAPIC) >> +#define _XEN_X86_EMU_HPET 1 >> +#define XEN_X86_EMU_HPET (1U<<_XEN_X86_EMU_HPET) >> +#define _XEN_X86_EMU_PM 2 >> +#define XEN_X86_EMU_PM (1U<<_XEN_X86_EMU_PM) >> +#define _XEN_X86_EMU_RTC 3 >> +#define XEN_X86_EMU_RTC (1U<<_XEN_X86_EMU_RTC) >> +#define _XEN_X86_EMU_IOAPIC 4 >> +#define XEN_X86_EMU_IOAPIC (1U<<_XEN_X86_EMU_IOAPIC) >> +#define _XEN_X86_EMU_PIC 5 >> +#define XEN_X86_EMU_PIC (1U<<_XEN_X86_EMU_PIC) >> +#define _XEN_X86_EMU_VGA 6 >> +#define XEN_X86_EMU_VGA (1U<<_XEN_X86_EMU_VGA) >> +#define _XEN_X86_EMU_IOMMU 7 >> +#define XEN_X86_EMU_IOMMU (1U<<_XEN_X86_EMU_IOMMU) >> +#define _XEN_X86_EMU_PIT 8 >> +#define XEN_X86_EMU_PIT (1U<<_XEN_X86_EMU_PIT) > While only used for a domctl (so far), I still think we should aim at > making this a complete set (i.e. preempt future additions to the > set if at all possible). I say this because - having looked again - I'm > missing things like MTRR, PAT, and 8254 here. Use (or not) of MTRR and PAT should be controlled exclusively via the guests cpuid policy. Unlike the above bits, they are architectural components of the CPU itself, rather than external devices on the motherboard. ~Andrew