From: Ian Campbell Subject: [PATCH V2 25/46] xen: arm64: add guest type to domain field. Date: Thu, 14 Feb 2013 16:47:39 +0000 Message-ID: <1360860480-9245-25-git-send-email-ian.campbell@citrix.com> References: <1360860465.20449.472.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360860465.20449.472.camel@zakaz.uk.xensource.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: xen-devel@lists.xen.org Cc: stefano.stabellini@citrix.com, tim@xen.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org Currently 32 bit PV is the only option. Signed-off-by: Ian Campbell v2: Remove nested CONFIG_ARM_64 --- xen/arch/arm/kernel.c | 4 ++++ xen/arch/arm/kernel.h | 4 ++++ xen/include/asm-arm/domain.h | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index c08c230..0c7da54 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -228,6 +228,10 @@ int kernel_prepare(struct kernel_info *info) if (rc < 0) rc = kernel_try_elf_prepare(info, start, size); +#ifdef CONFIG_ARM_64 + info->type = DOMAIN_PV32; /* No 64-bit guest support yet */ +#endif + return rc; } diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h index 49fe9da..7232d34 100644 --- a/xen/arch/arm/kernel.h +++ b/xen/arch/arm/kernel.h @@ -10,6 +10,10 @@ #include struct kernel_info { +#ifdef CONFIG_ARM_64 + enum domain_type type; +#endif + void *fdt; /* flat device tree */ paddr_t unassigned_mem; /* RAM not (yet) assigned to a bank */ struct dt_mem_info mem; diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index 29fe808..e9370a5 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -35,8 +35,24 @@ struct hvm_domain uint64_t params[HVM_NR_PARAMS]; } __cacheline_aligned; +#ifdef CONFIG_ARM_64 +enum domain_type { + DOMAIN_PV32, + DOMAIN_PV64, +}; +#define is_pv32_domain(d) ((d)->arch.type == DOMAIN_PV32) +#define is_pv64_domain(d) ((d)->arch.type == DOMAIN_PV64) +#else +#define is_pv32_domain(d) (1) +#define is_pv64_domain(d) (0) +#endif + struct arch_domain { +#ifdef CONFIG_ARM_64 + enum domain_type type; +#endif + struct p2m_domain p2m; struct hvm_domain hvm_domain; xen_pfn_t *grant_table_gpfn; -- 1.7.2.5