xen: arm64: add guest type to domain field.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 08:58:04 +0000 (08:58 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 12:14:53 +0000 (12:14 +0000)
Currently 32 bit PV is the only option.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/arm/kernel.c
xen/arch/arm/kernel.h
xen/include/asm-arm/domain.h

index f6947474f300b759e8a036435aa36f467eb9b63f..8f4a60d74ef518aae7ab0e792959bf48e8da1d3e 100644 (file)
@@ -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;
 }
 
index 58e942b91be28515736da1678ef6d95b89a2d3e5..1776a4d94d7fd2bd406c5880695eeb8a4c9a6b48 100644 (file)
 #include <xen/device_tree.h>
 
 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;
index 3732ac80454e98dc6f1416fe81e80e86d1cc0ce7..4e9d38d2f7c3089586ff57fe06be01dcbb4eab49 100644 (file)
@@ -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;