arm: implement the functions which are required to create the dom0.
PATCH 7/14 arm: implement the functions which are required to create the dom0.
arm: implement the functions which are required to create the dom0.
xen/arch/arm/xen/Makefile | 1 + xen/arch/arm/xen/arch_domain.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- xen/arch/arm/xen/armv7.S | 19 ++++++++ xen/arch/arm/xen/domain_build.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- xen/arch/arm/xen/mm.c | 2 - xen/include/asm-arm/current.h | 23 ++++++++++ xen/include/asm-arm/domain.h | 39 +---------------- 7 files changed, 356 insertions(+), 61 deletions(-)
Signed-off-by Jaemin Ryu <[email protected]>
xen/arch/arm/xen/Makefile +1 -0
@@ -21,3 +21,4 @@ obj-y += crash.o obj-y += p2m.o obj-y += perfmon.o obj-y += pci.o +obj-y += armv7.o
xen/arch/arm/xen/arch_domain.c +124 -20
244 lines not on this page · raw message
xen/arch/arm/xen/armv7.S new file +19 -0
@@ -0,0 +1,19 @@ +#include <asm/page.h> +#include <asm/cpu-ops.h> +#include <asm/system.h> +#include <asm/asm-macros.h> +#include <asm/asm-offsets.h> +#include <public/arch-arm.h> + + .text +ENTRY(cpu_idle) + dsb + wfi + mov pc, lr + +ENTRY(cpu_halt) + mov pc, lr + +ENTRY(cpu_reset) + mov pc, lr +
xen/arch/arm/xen/domain_build.c +187 -2
201 lines not on this page · raw message
xen/arch/arm/xen/mm.c +0 -2
@@ -217,8 +217,6 @@ unsigned long alloc_page_tables(l1e_t *lreturn 0 ; } -// cache_clean_range(page, page + PAGE_SIZE, 0); -wire_page_tables (l1e, page);return page;
xen/include/asm-arm/current.h +23 -0
@@ -27,6 +27,29 @@ #ifndef __ASSEMBLY__ struct vcpu; +struct cpu_ctx { + unsigned long r0; + unsigned long r1; + unsigned long r2; + unsigned long r3; + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long usp; + unsigned long ulr; + unsigned long ssp; + unsigned long slr; + unsigned long pc; + unsigned long spsr; +}; + + struct cpu_info { struct vcpu *vcpu; unsigned long vspsr;
xen/include/asm-arm/domain.h +2 -37
@@ -8,42 +8,8 @@#include <asm/iommu.h> #include <public/arch-arm.h> -#if 0 -#define MAPHASH_ENTRIES 8 -#define MAPHASH_HASHFN (pfn) ((pfn) & (MAPHASH_ENTRIES-1)) -#define MAPHASHENT_NOTINUSE ((u16)~0U) - -struct vcpu_maphash { -struct vcpu_maphash_entry { -unsigned long pfn; -uint16_t idx; -uint16_t refcnt; - } hash[MAPHASH_ENTRIES ]; -}__cacheline_aligned; - - -#define MAPCACHE_ORDER 8 -#define MAPCACHE_ENTRIES (1 << MAPCACHE_ORDER) - -struct mapcache { -/* The PTEs that provide the mappings, and a cursor into the array. */ -l2e_t *table; -unsigned int cursor; - -/* Protects map_domain_page(). */ -spinlock_t lock; - -/* Which mappings are in use, and which are garbage to reap next epoch? */ -unsigned long inuse[BITS_TO_LONGS (MAPCACHE_ENTRIES )]; -unsigned long garbage[BITS_TO_LONGS (MAPCACHE_ENTRIES )]; - -/* Lock-free per-VCPU hash of recently-used mappings. */ -struct vcpu_maphash vcpu_maphash[MAX_VIRT_CPUS ]; -}__cacheline_aligned; -#endif struct arch_domain { -#if 0 /* I/O-port admin-specified access capabilities. */ struct rangeset *ioport_caps;
@@ -51,8 +17,7 @@ struct arch_domainint *pirq_irq;unsigned long *pirq_eoi_map; -unsigned long pirq_eoi_map_mfn; -#endif +struct page_list_head relmem_list; };
@@ -61,7 +26,7 @@ struct arch_vcpustruct vcpu_guest_context ctx; } __cacheline_aligned; -//#define VCPU_REG(v, reg) v->arch.ctx.reg +#define VCPU_REG (v, reg) v->arch.ctx.reg#define return_reg (v) ((v)->arch.ctx.r0)
arm: implement the functions which are required to create the dom0.
xen/arch/arm/xen/Makefile | 1 + xen/arch/arm/xen/arch_domain.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- xen/arch/arm/xen/armv7.S | 19 ++++++++ xen/arch/arm/xen/domain_build.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- xen/arch/arm/xen/mm.c | 2 - xen/include/asm-arm/current.h | 23 ++++++++++ xen/include/asm-arm/domain.h | 39 +---------------- 7 files changed, 356 insertions(+), 61 deletions(-)
Signed-off-by Jaemin Ryu <[email protected]>
xen/arch/arm/xen/Makefile +1 -0
@@ -21,3 +21,4 @@ obj-y += crash.o obj-y += p2m.o obj-y += perfmon.o obj-y += pci.o +obj-y += armv7.o
xen/arch/arm/xen/arch_domain.c +124 -20
244 lines not on this page · raw message
xen/arch/arm/xen/armv7.S new file +19 -0
@@ -0,0 +1,19 @@ +#include <asm/page.h> +#include <asm/cpu-ops.h> +#include <asm/system.h> +#include <asm/asm-macros.h> +#include <asm/asm-offsets.h> +#include <public/arch-arm.h> + + .text +ENTRY(cpu_idle) + dsb + wfi + mov pc, lr + +ENTRY(cpu_halt) + mov pc, lr + +ENTRY(cpu_reset) + mov pc, lr +
xen/arch/arm/xen/domain_build.c +187 -2
201 lines not on this page · raw message
xen/arch/arm/xen/mm.c +0 -2
@@ -217,8 +217,6 @@ unsigned long alloc_page_tables(l1e_t *lreturn 0 ; } -// cache_clean_range(page, page + PAGE_SIZE, 0); -wire_page_tables (l1e, page);return page;
xen/include/asm-arm/current.h +23 -0
@@ -27,6 +27,29 @@ #ifndef __ASSEMBLY__ struct vcpu; +struct cpu_ctx { + unsigned long r0; + unsigned long r1; + unsigned long r2; + unsigned long r3; + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long usp; + unsigned long ulr; + unsigned long ssp; + unsigned long slr; + unsigned long pc; + unsigned long spsr; +}; + + struct cpu_info { struct vcpu *vcpu; unsigned long vspsr;
xen/include/asm-arm/domain.h +2 -37
@@ -8,42 +8,8 @@#include <asm/iommu.h> #include <public/arch-arm.h> -#if 0 -#define MAPHASH_ENTRIES 8 -#define MAPHASH_HASHFN (pfn) ((pfn) & (MAPHASH_ENTRIES-1)) -#define MAPHASHENT_NOTINUSE ((u16)~0U) - -struct vcpu_maphash { -struct vcpu_maphash_entry { -unsigned long pfn; -uint16_t idx; -uint16_t refcnt; - } hash[MAPHASH_ENTRIES ]; -}__cacheline_aligned; - - -#define MAPCACHE_ORDER 8 -#define MAPCACHE_ENTRIES (1 << MAPCACHE_ORDER) - -struct mapcache { -/* The PTEs that provide the mappings, and a cursor into the array. */ -l2e_t *table; -unsigned int cursor; - -/* Protects map_domain_page(). */ -spinlock_t lock; - -/* Which mappings are in use, and which are garbage to reap next epoch? */ -unsigned long inuse[BITS_TO_LONGS (MAPCACHE_ENTRIES )]; -unsigned long garbage[BITS_TO_LONGS (MAPCACHE_ENTRIES )]; - -/* Lock-free per-VCPU hash of recently-used mappings. */ -struct vcpu_maphash vcpu_maphash[MAX_VIRT_CPUS ]; -}__cacheline_aligned; -#endif struct arch_domain { -#if 0 /* I/O-port admin-specified access capabilities. */ struct rangeset *ioport_caps;
@@ -51,8 +17,7 @@ struct arch_domainint *pirq_irq;unsigned long *pirq_eoi_map; -unsigned long pirq_eoi_map_mfn; -#endif +struct page_list_head relmem_list; };
@@ -61,7 +26,7 @@ struct arch_vcpustruct vcpu_guest_context ctx; } __cacheline_aligned; -//#define VCPU_REG(v, reg) v->arch.ctx.reg +#define VCPU_REG (v, reg) v->arch.ctx.reg#define return_reg (v) ((v)->arch.ctx.r0)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel