xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/12] arm: align some register bit definitions
  2012-01-20 12:03 [PATCH 00/12] " Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
  0 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Probably got de-hard-tabbed at some point.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/processor.h |   80 +++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 1f85d31..ec6fb48 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -17,12 +17,12 @@
 #define PSR_MODE_UND 0x1b
 #define PSR_MODE_SYS 0x1f
 
-#define PSR_THUMB        (1<<5)        /* Thumb Mode enable */
-#define PSR_FIQ_MASK        (1<<6)        /* Fast Interrupt mask */
-#define PSR_IRQ_MASK        (1<<7)        /* Interrupt mask */
-#define PSR_ABT_MASK         (1<<8)        /* Asynchronous Abort mask */
-#define PSR_BIG_ENDIAN        (1<<9)        /* Big Endian Mode */
-#define PSR_JAZELLE        (1<<24)        /* Jazelle Mode */
+#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
+#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
+#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
+#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
+#define PSR_BIG_ENDIAN  (1<<9)        /* Big Endian Mode */
+#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
 
 /* TTBCR Translation Table Base Control Register */
 #define TTBCR_N_MASK 0x07
@@ -35,56 +35,56 @@
 /* SCTLR System Control Register. */
 /* HSCTLR is a subset of this. */
 #define SCTLR_TE        (1<<30)
-#define SCTLR_AFE        (1<<29)
-#define SCTLR_TRE        (1<<28)
-#define SCTLR_NMFI        (1<<27)
+#define SCTLR_AFE       (1<<29)
+#define SCTLR_TRE       (1<<28)
+#define SCTLR_NMFI      (1<<27)
 #define SCTLR_EE        (1<<25)
 #define SCTLR_VE        (1<<24)
-#define SCTLR_U                (1<<22)
+#define SCTLR_U         (1<<22)
 #define SCTLR_FI        (1<<21)
-#define SCTLR_WXN        (1<<19)
+#define SCTLR_WXN       (1<<19)
 #define SCTLR_HA        (1<<17)
 #define SCTLR_RR        (1<<14)
-#define SCTLR_V                (1<<13)
-#define SCTLR_I                (1<<12)
-#define SCTLR_Z                (1<<11)
+#define SCTLR_V         (1<<13)
+#define SCTLR_I         (1<<12)
+#define SCTLR_Z         (1<<11)
 #define SCTLR_SW        (1<<10)
-#define SCTLR_B                (1<<7)
-#define SCTLR_C                (1<<2)
-#define SCTLR_A                (1<<1)
-#define SCTLR_M                (1<<0)
+#define SCTLR_B         (1<<7)
+#define SCTLR_C         (1<<2)
+#define SCTLR_A         (1<<1)
+#define SCTLR_M         (1<<0)
 
 #define SCTLR_BASE        0x00c50078
-#define HSCTLR_BASE        0x30c51878
+#define HSCTLR_BASE       0x30c51878
 
 /* HCR Hyp Configuration Register */
-#define HCR_TGE                (1<<27)
-#define HCR_TVM                (1<<26)
+#define HCR_TGE         (1<<27)
+#define HCR_TVM         (1<<26)
 #define HCR_TTLB        (1<<25)
-#define HCR_TPU                (1<<24)
-#define HCR_TPC                (1<<23)
-#define HCR_TSW                (1<<22)
-#define HCR_TAC                (1<<21)
-#define HCR_TIDCP        (1<<20)
-#define HCR_TSC                (1<<19)
+#define HCR_TPU         (1<<24)
+#define HCR_TPC         (1<<23)
+#define HCR_TSW         (1<<22)
+#define HCR_TAC         (1<<21)
+#define HCR_TIDCP       (1<<20)
+#define HCR_TSC         (1<<19)
 #define HCR_TID3        (1<<18)
 #define HCR_TID2        (1<<17)
 #define HCR_TID1        (1<<16)
 #define HCR_TID0        (1<<15)
-#define HCR_TWE                (1<<14)
-#define HCR_TWI                (1<<13)
-#define HCR_DC                (1<<12)
-#define HCR_BSU_MASK        (3<<10)
-#define HCR_FB                (1<<9)
-#define HCR_VA                (1<<8)
-#define HCR_VI                (1<<7)
-#define HCR_VF                (1<<6)
-#define HCR_AMO                (1<<5)
-#define HCR_IMO                (1<<4)
-#define HCR_FMO                (1<<3)
-#define HCR_PTW                (1<<2)
+#define HCR_TWE         (1<<14)
+#define HCR_TWI         (1<<13)
+#define HCR_DC          (1<<12)
+#define HCR_BSU_MASK    (3<<10)
+#define HCR_FB          (1<<9)
+#define HCR_VA          (1<<8)
+#define HCR_VI          (1<<7)
+#define HCR_VF          (1<<6)
+#define HCR_AMO         (1<<5)
+#define HCR_IMO         (1<<4)
+#define HCR_FMO         (1<<3)
+#define HCR_PTW         (1<<2)
 #define HCR_SWIO        (1<<1)
-#define HCR_VM                (1<<0)
+#define HCR_VM          (1<<0)
 
 #define HSR_EC_WFI_WFE              0x01
 #define HSR_EC_CP15_32              0x03
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 00/12 v2] ARM: Slim down dummy.S
@ 2012-02-14 14:43 Ian Campbell
  2012-02-14 14:43 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Keir Fraser

Defines a few stubs and disables some as yet unsupported core features.

Early on there's a couple of unrelated cleanups.

Patch against current unstable. #6 and #9 touch common code.

Changes since v1:
 - make PoD stubs proper functions instead of #defines
 - define need_iommu as 0 instead of littering common code with #if
 - stub donate_page but leave tmem enabled.
 - rebased against latest unstable tree

Ian.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 01/12] arm: add a missing local-vars comment
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/kernel.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index f2339fa..71a204d 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -194,3 +194,12 @@ void kernel_load(struct kernel_info *info)
 {
     info->load(info);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 02/12] arm: define some more cp15 registers
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
  2012-02-14 14:43 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Complete the set of cache flush and add processor feature registers. Print the
latter on boot for debug.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/setup.c         |   17 +++++++++++++++++
 xen/include/asm-arm/cpregs.h |   18 ++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index de7d5f2..ddc2392 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -64,6 +64,20 @@ static void __init init_idle_domain(void)
         /* TODO: setup_idle_pagetable(); */
 }
 
+static void processor_id(void)
+{
+    printk("Processor Features: %08x %08x\n",
+           READ_CP32(ID_PFR0), READ_CP32(ID_PFR0));
+    printk("Debug Features: %08x\n", READ_CP32(ID_DFR0));
+    printk("Auxiliary Features: %08x\n", READ_CP32(ID_AFR0));
+    printk("Memory Model Features: %08x %08x %08x %08x\n",
+           READ_CP32(ID_MMFR0), READ_CP32(ID_MMFR1),
+           READ_CP32(ID_MMFR2), READ_CP32(ID_MMFR3));
+    printk("ISA Features: %08x %08x %08x %08x %08x %08x\n",
+           READ_CP32(ID_ISAR0), READ_CP32(ID_ISAR1), READ_CP32(ID_ISAR2),
+           READ_CP32(ID_ISAR3), READ_CP32(ID_ISAR4), READ_CP32(ID_ISAR5));
+}
+
 static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 {
     paddr_t ram_start;
@@ -185,7 +199,10 @@ void __init start_xen(unsigned long boot_phys_offset,
      */
     WRITE_CP32(0x80002558, VTCR); isb();
 
+    processor_id();
+
     softirq_init();
+
     tasklet_subsys_init();
 
     init_IRQ();
diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index 3a4028d..d61ea88 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -93,6 +93,18 @@
 /* CP15 CR0: CPUID and Cache Type Registers */
 #define ID_PFR0         p15,0,c0,c1,0   /* Processor Feature Register 0 */
 #define ID_PFR1         p15,0,c0,c1,1   /* Processor Feature Register 1 */
+#define ID_DFR0         p15,0,c0,c1,2   /* Debug Feature Register 0 */
+#define ID_AFR0         p15,0,c0,c1,3   /* Auxiliary Feature Register 0 */
+#define ID_MMFR0        p15,0,c0,c1,4   /* Memory Model Feature Register 0 */
+#define ID_MMFR1        p15,0,c0,c1,5   /* Memory Model Feature Register 1 */
+#define ID_MMFR2        p15,0,c0,c1,6   /* Memory Model Feature Register 2 */
+#define ID_MMFR3        p15,0,c0,c1,7   /* Memory Model Feature Register 3 */
+#define ID_ISAR0        p15,0,c0,c2,0   /* ISA Feature Register 0 */
+#define ID_ISAR1        p15,0,c0,c2,1   /* ISA Feature Register 1 */
+#define ID_ISAR2        p15,0,c0,c2,2   /* ISA Feature Register 2 */
+#define ID_ISAR3        p15,0,c0,c2,3   /* ISA Feature Register 3 */
+#define ID_ISAR4        p15,0,c0,c2,4   /* ISA Feature Register 4 */
+#define ID_ISAR5        p15,0,c0,c2,5   /* ISA Feature Register 5 */
 #define CCSIDR          p15,1,c0,c0,0   /* Cache Size ID Registers */
 #define CLIDR           p15,1,c0,c0,1   /* Cache Level ID Register */
 #define CSSELR          p15,2,c0,c0,0   /* Cache Size Selection Register */
@@ -134,7 +146,11 @@
 #define ICIALLUIS       p15,0,c7,c1,0   /* Invalidate all instruction caches to PoU inner shareable */
 #define BPIALLIS        p15,0,c7,c1,6   /* Invalidate entire branch predictor array inner shareable */
 #define ICIALLU         p15,0,c7,c5,0   /* Invalidate all instruction caches to PoU */
+#define ICIMVAU         p15,0,c7,c5,1   /* Invalidate instruction caches by MVA to PoU */
 #define BPIALL          p15,0,c7,c5,6   /* Invalidate entire branch predictor array */
+#define BPIMVA          p15,0,c7,c5,7   /* Invalidate MVA from branch predictor array */
+#define DCIMVAC         p15,0,c7,c6,1   /* Invalidate data cache line by MVA to PoC */
+#define DCISW           p15,0,c7,c2,1   /* Invalidate data cache line by set/way */
 #define ATS1CPR         p15,0,c7,c8,0   /* Address Translation Stage 1. Non-Secure Kernel Read */
 #define ATS1CPW         p15,0,c7,c8,1   /* Address Translation Stage 1. Non-Secure Kernel Write */
 #define ATS1CUR         p15,0,c7,c8,2   /* Address Translation Stage 1. Non-Secure User Read */
@@ -144,6 +160,8 @@
 #define ATS12NSOUR      p15,0,c7,c8,6   /* Address Translation Stage 1+2 Non-Secure User Read */
 #define ATS12NSOUW      p15,0,c7,c8,7   /* Address Translation Stage 1+2 Non-Secure User Write */
 #define DCCMVAC         p15,0,c7,c10,1  /* Clean data or unified cache line by MVA to PoC */
+#define DCCSW           p15,0,c7,c10,2  /* Clean data cache line by set/way */
+#define DCCMVAU         p15,0,c7,c11,1  /* Clean data cache line by MVA to PoU */
 #define DCCISW          p15,0,c7,c14,2  /* Clean and invalidate data cache line by set/way */
 #define ATS1HR          p15,4,c7,c8,0   /* Address Translation Stage 1 Hyp. Read */
 #define ATS1HW          p15,4,c7,c8,1   /* Address Translation Stage 1 Hyp. Write */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 03/12] arm: align some register bit definitions
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
  2012-02-14 14:43 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
  2012-02-14 14:43 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Probably got de-hard-tabbed at some point.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/processor.h |   80 +++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 1f85d31..ec6fb48 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -17,12 +17,12 @@
 #define PSR_MODE_UND 0x1b
 #define PSR_MODE_SYS 0x1f
 
-#define PSR_THUMB        (1<<5)        /* Thumb Mode enable */
-#define PSR_FIQ_MASK        (1<<6)        /* Fast Interrupt mask */
-#define PSR_IRQ_MASK        (1<<7)        /* Interrupt mask */
-#define PSR_ABT_MASK         (1<<8)        /* Asynchronous Abort mask */
-#define PSR_BIG_ENDIAN        (1<<9)        /* Big Endian Mode */
-#define PSR_JAZELLE        (1<<24)        /* Jazelle Mode */
+#define PSR_THUMB       (1<<5)        /* Thumb Mode enable */
+#define PSR_FIQ_MASK    (1<<6)        /* Fast Interrupt mask */
+#define PSR_IRQ_MASK    (1<<7)        /* Interrupt mask */
+#define PSR_ABT_MASK    (1<<8)        /* Asynchronous Abort mask */
+#define PSR_BIG_ENDIAN  (1<<9)        /* Big Endian Mode */
+#define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
 
 /* TTBCR Translation Table Base Control Register */
 #define TTBCR_N_MASK 0x07
@@ -35,56 +35,56 @@
 /* SCTLR System Control Register. */
 /* HSCTLR is a subset of this. */
 #define SCTLR_TE        (1<<30)
-#define SCTLR_AFE        (1<<29)
-#define SCTLR_TRE        (1<<28)
-#define SCTLR_NMFI        (1<<27)
+#define SCTLR_AFE       (1<<29)
+#define SCTLR_TRE       (1<<28)
+#define SCTLR_NMFI      (1<<27)
 #define SCTLR_EE        (1<<25)
 #define SCTLR_VE        (1<<24)
-#define SCTLR_U                (1<<22)
+#define SCTLR_U         (1<<22)
 #define SCTLR_FI        (1<<21)
-#define SCTLR_WXN        (1<<19)
+#define SCTLR_WXN       (1<<19)
 #define SCTLR_HA        (1<<17)
 #define SCTLR_RR        (1<<14)
-#define SCTLR_V                (1<<13)
-#define SCTLR_I                (1<<12)
-#define SCTLR_Z                (1<<11)
+#define SCTLR_V         (1<<13)
+#define SCTLR_I         (1<<12)
+#define SCTLR_Z         (1<<11)
 #define SCTLR_SW        (1<<10)
-#define SCTLR_B                (1<<7)
-#define SCTLR_C                (1<<2)
-#define SCTLR_A                (1<<1)
-#define SCTLR_M                (1<<0)
+#define SCTLR_B         (1<<7)
+#define SCTLR_C         (1<<2)
+#define SCTLR_A         (1<<1)
+#define SCTLR_M         (1<<0)
 
 #define SCTLR_BASE        0x00c50078
-#define HSCTLR_BASE        0x30c51878
+#define HSCTLR_BASE       0x30c51878
 
 /* HCR Hyp Configuration Register */
-#define HCR_TGE                (1<<27)
-#define HCR_TVM                (1<<26)
+#define HCR_TGE         (1<<27)
+#define HCR_TVM         (1<<26)
 #define HCR_TTLB        (1<<25)
-#define HCR_TPU                (1<<24)
-#define HCR_TPC                (1<<23)
-#define HCR_TSW                (1<<22)
-#define HCR_TAC                (1<<21)
-#define HCR_TIDCP        (1<<20)
-#define HCR_TSC                (1<<19)
+#define HCR_TPU         (1<<24)
+#define HCR_TPC         (1<<23)
+#define HCR_TSW         (1<<22)
+#define HCR_TAC         (1<<21)
+#define HCR_TIDCP       (1<<20)
+#define HCR_TSC         (1<<19)
 #define HCR_TID3        (1<<18)
 #define HCR_TID2        (1<<17)
 #define HCR_TID1        (1<<16)
 #define HCR_TID0        (1<<15)
-#define HCR_TWE                (1<<14)
-#define HCR_TWI                (1<<13)
-#define HCR_DC                (1<<12)
-#define HCR_BSU_MASK        (3<<10)
-#define HCR_FB                (1<<9)
-#define HCR_VA                (1<<8)
-#define HCR_VI                (1<<7)
-#define HCR_VF                (1<<6)
-#define HCR_AMO                (1<<5)
-#define HCR_IMO                (1<<4)
-#define HCR_FMO                (1<<3)
-#define HCR_PTW                (1<<2)
+#define HCR_TWE         (1<<14)
+#define HCR_TWI         (1<<13)
+#define HCR_DC          (1<<12)
+#define HCR_BSU_MASK    (3<<10)
+#define HCR_FB          (1<<9)
+#define HCR_VA          (1<<8)
+#define HCR_VI          (1<<7)
+#define HCR_VF          (1<<6)
+#define HCR_AMO         (1<<5)
+#define HCR_IMO         (1<<4)
+#define HCR_FMO         (1<<3)
+#define HCR_PTW         (1<<2)
 #define HCR_SWIO        (1<<1)
-#define HCR_VM                (1<<0)
+#define HCR_VM          (1<<0)
 
 #define HSR_EC_WFI_WFE              0x01
 #define HSR_EC_CP15_32              0x03
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (2 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Correct the comment on the DUMMY macro.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 5bc4f21..fff7d7e 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -1,8 +1,6 @@
-/* Nothing is mapped at 1G, for the moment */
 #define DUMMY(x) \
 	.globl x; \
-x:	.word 0xe7f000f0
-/* x:	mov r0, #0x40000000 ; str r0, [r0]; b x */
+x:	.word 0xe7f000f0 /* Undefined instruction */
 
 #define  NOP(x) \
 	.globl x; \
@@ -35,15 +33,11 @@ DUMMY(get_page);
 DUMMY(get_page_type);
 DUMMY(gmfn_to_mfn);
 DUMMY(gnttab_clear_flag);
-DUMMY(gnttab_host_mapping_get_page_type);
 DUMMY(gnttab_mark_dirty);
 DUMMY(hypercall_create_continuation);
 DUMMY(iommu_map_page);
 DUMMY(iommu_unmap_page);
 DUMMY(is_iomem_page);
-DUMMY(local_event_delivery_enable);
-DUMMY(local_events_need_delivery);
-DUMMY(machine_to_phys_mapping_valid);
 DUMMY(max_page);
 DUMMY(node_online_map);
 DUMMY(nr_irqs_gsi);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 05/12] arm: Add stub functions instead of using DUMMY
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (3 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Adds stubs for arch domctl and sysctl plus vcpu_op and memory_op.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/Makefile |    2 ++
 xen/arch/arm/domain.c |    5 +++++
 xen/arch/arm/domctl.c |   27 +++++++++++++++++++++++++++
 xen/arch/arm/dummy.S  |    4 ----
 xen/arch/arm/mm.c     |    5 +++++
 xen/arch/arm/sysctl.c |   29 +++++++++++++++++++++++++++++
 6 files changed, 68 insertions(+), 4 deletions(-)
 create mode 100644 xen/arch/arm/domctl.c
 create mode 100644 xen/arch/arm/sysctl.c

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 168716e..49b64fe 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -4,6 +4,8 @@ obj-y += dummy.o
 obj-y += early_printk.o
 obj-y += entry.o
 obj-y += domain.o
+obj-y += domctl.o
+obj-y += sysctl.o
 obj-y += domain_build.o
 obj-y += gic.o
 obj-y += io.o
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index ada89af..5fe370b 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -255,6 +255,11 @@ void arch_dump_domain_info(struct domain *d)
 {
 }
 
+long arch_do_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg)
+{
+    return -ENOSYS;
+}
+
 void arch_dump_vcpu_info(struct vcpu *v)
 {
 }
diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
new file mode 100644
index 0000000..d957f21
--- /dev/null
+++ b/xen/arch/arm/domctl.c
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * Arch-specific domctl.c
+ *
+ * Copyright (c) 2012, Citrix Systems
+ */
+
+#include <xen/config.h>
+#include <xen/types.h>
+#include <xen/lib.h>
+#include <xen/errno.h>
+#include <public/domctl.h>
+
+long arch_do_domctl(struct xen_domctl *domctl,
+                    XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
+{
+	return -ENOSYS;
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index fff7d7e..1287e0b 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -8,12 +8,8 @@ x:	mov pc, lr
 	
 DUMMY(alloc_pirq_struct);
 DUMMY(alloc_vcpu_guest_context);
-DUMMY(arch_do_domctl);
-DUMMY(arch_do_sysctl);
-DUMMY(arch_do_vcpu_op);
 DUMMY(arch_get_info_guest);
 DUMMY(arch_get_xen_caps);
-DUMMY(arch_memory_op);
 DUMMY(arch_set_info_guest);
 DUMMY(arch_vcpu_reset);
 DUMMY(create_grant_host_mapping);
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 0d6c0ca..fcab567 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -320,6 +320,11 @@ void arch_dump_shared_mem_info(void)
 {
 }
 
+long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
+{
+    return -ENOSYS;
+}
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/arch/arm/sysctl.c b/xen/arch/arm/sysctl.c
new file mode 100644
index 0000000..50101c7
--- /dev/null
+++ b/xen/arch/arm/sysctl.c
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * Arch-specific sysctl.c
+ *
+ * System management operations. For use by node control stack.
+ *
+ * Copyright (c) 2012, Citrix Systems
+ */
+
+#include <xen/config.h>
+#include <xen/types.h>
+#include <xen/lib.h>
+#include <xen/errno.h>
+#include <public/sysctl.h>
+
+long arch_do_sysctl(struct xen_sysctl *sysctl,
+		    XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
+{
+	return -ENOSYS;
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (4 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 18:32   ` Keir Fraser
  2012-02-14 14:43 ` [PATCH 07/12] arm: provide dummy version of steal_page for tmem Ian Campbell
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: keir, Ian Campbell

These hypercalls are currently ACPI specific and implemented in
xen/drivers/acpi which is not implemented on ARM.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: keir@xen.org
---
 xen/Rules.mk         |    1 +
 xen/arch/arm/dummy.S |    2 --
 xen/common/sysctl.c  |    2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 507e9ab..ee54179 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -50,6 +50,7 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
+CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
 ifneq ($(max_phys_cpus),)
diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 1287e0b..3bf5226 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -16,13 +16,11 @@ DUMMY(create_grant_host_mapping);
 DUMMY(__cpu_die);
 DUMMY(__cpu_disable);
 DUMMY(__cpu_up);
-DUMMY(do_get_pm_info);
 DUMMY(domain_get_maximum_gpfn);
 DUMMY(domain_relinquish_resources);
 DUMMY(domain_set_time_offset);
 DUMMY(dom_cow);
 DUMMY(donate_page);
-DUMMY(do_pm_op);
 DUMMY(flush_tlb_mask);
 DUMMY(free_vcpu_guest_context);
 DUMMY(get_page);
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index f8f7cf8..fef0589 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -224,6 +224,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
     }
     break;
 
+#ifdef HAS_ACPI
     case XEN_SYSCTL_get_pmstat:
     {
         ret = xsm_get_pmstat();
@@ -259,6 +260,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
         }
     }
     break;
+#endif
 
     case XEN_SYSCTL_page_offline_op:
     {
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 07/12] arm: provide dummy version of steal_page for tmem.
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (5 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

This is how IA64 does it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |    1 -
 xen/arch/arm/mm.c    |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 3bf5226..da0b906 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -20,7 +20,6 @@ DUMMY(domain_get_maximum_gpfn);
 DUMMY(domain_relinquish_resources);
 DUMMY(domain_set_time_offset);
 DUMMY(dom_cow);
-DUMMY(donate_page);
 DUMMY(flush_tlb_mask);
 DUMMY(free_vcpu_guest_context);
 DUMMY(get_page);
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index fcab567..2c905ed 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -325,6 +325,12 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
     return -ENOSYS;
 }
 
+int donate_page(struct domain *d, struct page_info *page, unsigned int memflags)
+{
+    ASSERT(0);
+    return -ENOSYS;
+}
+
 /*
  * Local variables:
  * mode: C
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 08/12] arm: Implement arch_get_xen_caps
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (6 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 07/12] arm: provide dummy version of steal_page for tmem Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:43 ` [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH Ian Campbell
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

TBD: correct arch name for this string. Should be "xen-" / "hvm-" or something
else given the hybrid model we are using on ARM?

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |    1 -
 xen/arch/arm/mm.c    |    1 +
 xen/arch/arm/setup.c |   12 ++++++++++++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index da0b906..5010619 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -9,7 +9,6 @@ x:	mov pc, lr
 DUMMY(alloc_pirq_struct);
 DUMMY(alloc_vcpu_guest_context);
 DUMMY(arch_get_info_guest);
-DUMMY(arch_get_xen_caps);
 DUMMY(arch_set_info_guest);
 DUMMY(arch_vcpu_reset);
 DUMMY(create_grant_host_mapping);
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 2c905ed..0cff726 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -24,6 +24,7 @@
 #include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/preempt.h>
+#include <xen/errno.h>
 #include <asm/page.h>
 #include <asm/current.h>
 
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index ddc2392..7762166 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -271,6 +271,18 @@ void __init start_xen(unsigned long boot_phys_offset,
     reset_stack_and_jump(init_done);
 }
 
+void arch_get_xen_caps(xen_capabilities_info_t *info)
+{
+    /* Interface name is always xen-3.0-* for Xen-3.x. */
+    int major = 3, minor = 0;
+    char s[32];
+
+    (*info)[0] = '\0';
+
+    snprintf(s, sizeof(s), "xen-%d.%d-armv7l ", major, minor);
+    safe_strcat(*info, s);
+}
+
 /*
  * Local variables:
  * mode: C
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (7 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 18:33   ` Keir Fraser
  2012-02-14 14:43 ` [PATCH 10/12] arm: stub out PoD related p2m functions Ian Campbell
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: keir, Ian Campbell

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: keir@xen.org
---
 xen/Rules.mk            |    1 +
 xen/arch/arm/dummy.S    |    2 --
 xen/include/xen/sched.h |    6 ++++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index ee54179..6123835 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -51,6 +51,7 @@ CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
 CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
+CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
 ifneq ($(max_phys_cpus),)
diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 5010619..e858613 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -27,8 +27,6 @@ DUMMY(gmfn_to_mfn);
 DUMMY(gnttab_clear_flag);
 DUMMY(gnttab_mark_dirty);
 DUMMY(hypercall_create_continuation);
-DUMMY(iommu_map_page);
-DUMMY(iommu_unmap_page);
 DUMMY(is_iomem_page);
 DUMMY(max_page);
 DUMMY(node_online_map);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 567cd36..3699929 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -266,8 +266,10 @@ struct domain
 
     /* Is this an HVM guest? */
     bool_t           is_hvm;
+#ifdef HAS_PASSTHROUGH
     /* Does this guest need iommu mappings? */
     bool_t           need_iommu;
+#endif
     /* Is this guest fully privileged (aka dom0)? */
     bool_t           is_privileged;
     /* Which guest this guest has privileges on */
@@ -687,7 +689,11 @@ void watchdog_domain_destroy(struct domain *d);
 #define is_hvm_vcpu(v)   (is_hvm_domain(v->domain))
 #define is_pinned_vcpu(v) ((v)->domain->is_pinned || \
                            cpumask_weight((v)->cpu_affinity) == 1)
+#ifdef HAS_PASSTHROUGH
 #define need_iommu(d)    ((d)->need_iommu)
+#else
+#define need_iommu(d)    (0)
+#endif
 
 void set_vcpu_migration_delay(unsigned int delay);
 unsigned int get_vcpu_migration_delay(void);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 10/12] arm: stub out PoD related p2m functions
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (8 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH Ian Campbell
@ 2012-02-14 14:43 ` Ian Campbell
  2012-02-14 14:44 ` [PATCH 11/12] arm: define max_page Ian Campbell
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |    2 --
 xen/arch/arm/p2m.c   |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index e858613..67edb35 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -31,8 +31,6 @@ DUMMY(is_iomem_page);
 DUMMY(max_page);
 DUMMY(node_online_map);
 DUMMY(nr_irqs_gsi);
-DUMMY(p2m_pod_decrease_reservation);
-DUMMY(guest_physmap_mark_populate_on_demand);
 DUMMY(page_get_owner_and_reference);
 DUMMY(page_is_ram_type);
 DUMMY(per_cpu__cpu_core_mask);
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index a1d026d..14614fd 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -18,6 +18,20 @@ void p2m_load_VTTBR(struct domain *d)
     isb(); /* Ensure update is visible */
 }
 
+int guest_physmap_mark_populate_on_demand(struct domain *d,
+                                          unsigned long gfn,
+                                          unsigned int order)
+{
+    return -ENOSYS;
+}
+
+int p2m_pod_decrease_reservation(struct domain *d,
+                                 xen_pfn_t gpfn,
+                                 unsigned int order)
+{
+    return -ENOSYS;
+}
+
 static int p2m_create_entry(struct domain *d,
                             lpae_t *entry)
 {
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 11/12] arm: define max_page
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (9 preceding siblings ...)
  2012-02-14 14:43 ` [PATCH 10/12] arm: stub out PoD related p2m functions Ian Campbell
@ 2012-02-14 14:44 ` Ian Campbell
  2012-02-14 14:44 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:44 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |    1 -
 xen/arch/arm/mm.c    |    2 ++
 xen/arch/arm/setup.c |    2 ++
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 67edb35..295938e 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -28,7 +28,6 @@ DUMMY(gnttab_clear_flag);
 DUMMY(gnttab_mark_dirty);
 DUMMY(hypercall_create_continuation);
 DUMMY(is_iomem_page);
-DUMMY(max_page);
 DUMMY(node_online_map);
 DUMMY(nr_irqs_gsi);
 DUMMY(page_get_owner_and_reference);
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 0cff726..a0f39eb 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -43,6 +43,8 @@ unsigned long xenheap_virt_end;
 unsigned long frametable_base_mfn;
 unsigned long frametable_virt_end;
 
+unsigned long max_page;
+
 /* Map a 4k page in a fixmap entry */
 void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
 {
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 7762166..4c1d89c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -32,6 +32,7 @@
 #include <xen/softirq.h>
 #include <xen/keyhandler.h>
 #include <xen/cpu.h>
+#include <xen/pfn.h>
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
@@ -141,6 +142,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
                     pfn_to_paddr(xenheap_mfn_start + xenheap_pages + domheap_pages));
 
     setup_frametable_mappings(ram_start, ram_end);
+    max_page = PFN_DOWN(ram_end);
 
     /* Add xenheap memory that was not already added to the boot
        allocator. */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (10 preceding siblings ...)
  2012-02-14 14:44 ` [PATCH 11/12] arm: define max_page Ian Campbell
@ 2012-02-14 14:44 ` Ian Campbell
  2012-02-14 15:06 ` [PATCH 00/12 v2] ARM: Slim down dummy.S Tim Deegan
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-14 14:44 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Makes it easier to see what needs to be done.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S |   69 +++++++++++++++++++++++++++++--------------------
 1 files changed, 41 insertions(+), 28 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 295938e..3f2cc4b 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -6,48 +6,61 @@ x:	.word 0xe7f000f0 /* Undefined instruction */
 	.globl x; \
 x:	mov pc, lr
 	
+/* SMP support */
+DUMMY(__cpu_die);
+DUMMY(__cpu_disable);
+DUMMY(__cpu_up);
+DUMMY(per_cpu__cpu_core_mask);
+DUMMY(per_cpu__cpu_sibling_mask);
+DUMMY(node_online_map);
+DUMMY(smp_send_state_dump);
+DUMMY(__per_cpu_offset);
+
+/* PIRQ support */
 DUMMY(alloc_pirq_struct);
+DUMMY(nr_irqs_gsi);
+DUMMY(pirq_guest_bind);
+DUMMY(pirq_guest_unbind);
+DUMMY(pirq_set_affinity);
+
+/* VCPU */
 DUMMY(alloc_vcpu_guest_context);
 DUMMY(arch_get_info_guest);
 DUMMY(arch_set_info_guest);
 DUMMY(arch_vcpu_reset);
+DUMMY(free_vcpu_guest_context);
+DUMMY(sync_vcpu_execstate);
+NOP(update_vcpu_system_time);
+DUMMY(vcpu_mark_events_pending);
+DUMMY(vcpu_show_execution_state);
+
+/* Page Reference & Type Maintenance */
+DUMMY(get_page);
+DUMMY(get_page_type);
+DUMMY(page_get_owner_and_reference);
+DUMMY(put_page);
+DUMMY(put_page_type);
+
+/* Grant Tables */
 DUMMY(create_grant_host_mapping);
-DUMMY(__cpu_die);
-DUMMY(__cpu_disable);
-DUMMY(__cpu_up);
+DUMMY(gnttab_clear_flag);
+DUMMY(gnttab_mark_dirty);
+DUMMY(is_iomem_page);
+DUMMY(replace_grant_host_mapping);
+DUMMY(steal_page);
+
+/* Page Offlining */
+DUMMY(page_is_ram_type);
+
+/* Other */
 DUMMY(domain_get_maximum_gpfn);
 DUMMY(domain_relinquish_resources);
 DUMMY(domain_set_time_offset);
 DUMMY(dom_cow);
 DUMMY(flush_tlb_mask);
-DUMMY(free_vcpu_guest_context);
-DUMMY(get_page);
-DUMMY(get_page_type);
 DUMMY(gmfn_to_mfn);
-DUMMY(gnttab_clear_flag);
-DUMMY(gnttab_mark_dirty);
 DUMMY(hypercall_create_continuation);
-DUMMY(is_iomem_page);
-DUMMY(node_online_map);
-DUMMY(nr_irqs_gsi);
-DUMMY(page_get_owner_and_reference);
-DUMMY(page_is_ram_type);
-DUMMY(per_cpu__cpu_core_mask);
-DUMMY(per_cpu__cpu_sibling_mask);
-DUMMY(__per_cpu_offset);
-DUMMY(pirq_guest_bind);
-DUMMY(pirq_guest_unbind);
-DUMMY(pirq_set_affinity);
-DUMMY(put_page);
-DUMMY(put_page_type);
-DUMMY(replace_grant_host_mapping);
 DUMMY(send_timer_event);
 DUMMY(share_xen_page_with_privileged_guests);
-DUMMY(smp_send_state_dump);
-DUMMY(steal_page);
-DUMMY(sync_vcpu_execstate);
 DUMMY(__udelay);
-NOP(update_vcpu_system_time);
-DUMMY(vcpu_mark_events_pending);
-DUMMY(vcpu_show_execution_state);
 DUMMY(wallclock_time);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/12 v2] ARM: Slim down dummy.S
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (11 preceding siblings ...)
  2012-02-14 14:44 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
@ 2012-02-14 15:06 ` Tim Deegan
  2012-02-14 16:04 ` Stefano Stabellini
  2012-02-15 12:25 ` Ian Campbell
  14 siblings, 0 replies; 19+ messages in thread
From: Tim Deegan @ 2012-02-14 15:06 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Keir Fraser

At 14:43 +0000 on 14 Feb (1329230611), Ian Campbell wrote:
> Defines a few stubs and disables some as yet unsupported core features.
> 
> Early on there's a couple of unrelated cleanups.
> 
> Patch against current unstable. #6 and #9 touch common code.

For the ARM parts: Acked-by: Tim Deegan <tim@xen.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/12 v2] ARM: Slim down dummy.S
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (12 preceding siblings ...)
  2012-02-14 15:06 ` [PATCH 00/12 v2] ARM: Slim down dummy.S Tim Deegan
@ 2012-02-14 16:04 ` Stefano Stabellini
  2012-02-15 12:25 ` Ian Campbell
  14 siblings, 0 replies; 19+ messages in thread
From: Stefano Stabellini @ 2012-02-14 16:04 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Keir (Xen.org)

On Tue, 14 Feb 2012, Ian Campbell wrote:
> Defines a few stubs and disables some as yet unsupported core features.
> 
> Early on there's a couple of unrelated cleanups.
> 
> Patch against current unstable. #6 and #9 touch common code.
> 
> Changes since v1:
>  - make PoD stubs proper functions instead of #defines
>  - define need_iommu as 0 instead of littering common code with #if
>  - stub donate_page but leave tmem enabled.
>  - rebased against latest unstable tree

ack

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI
  2012-02-14 14:43 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
@ 2012-02-14 18:32   ` Keir Fraser
  0 siblings, 0 replies; 19+ messages in thread
From: Keir Fraser @ 2012-02-14 18:32 UTC (permalink / raw)
  To: Ian Campbell, xen-devel

On 14/02/2012 14:43, "Ian Campbell" <ian.campbell@citrix.com> wrote:

> These hypercalls are currently ACPI specific and implemented in
> xen/drivers/acpi which is not implemented on ARM.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Keir Fraser <keir@xen.org>

> Cc: keir@xen.org
> ---
>  xen/Rules.mk         |    1 +
>  xen/arch/arm/dummy.S |    2 --
>  xen/common/sysctl.c  |    2 ++
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index 507e9ab..ee54179 100644
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -50,6 +50,7 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
>  CFLAGS-$(perfc)         += -DPERF_COUNTERS
>  CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
>  CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
> +CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
>  CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
>  
>  ifneq ($(max_phys_cpus),)
> diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
> index 1287e0b..3bf5226 100644
> --- a/xen/arch/arm/dummy.S
> +++ b/xen/arch/arm/dummy.S
> @@ -16,13 +16,11 @@ DUMMY(create_grant_host_mapping);
>  DUMMY(__cpu_die);
>  DUMMY(__cpu_disable);
>  DUMMY(__cpu_up);
> -DUMMY(do_get_pm_info);
>  DUMMY(domain_get_maximum_gpfn);
>  DUMMY(domain_relinquish_resources);
>  DUMMY(domain_set_time_offset);
>  DUMMY(dom_cow);
>  DUMMY(donate_page);
> -DUMMY(do_pm_op);
>  DUMMY(flush_tlb_mask);
>  DUMMY(free_vcpu_guest_context);
>  DUMMY(get_page);
> diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
> index f8f7cf8..fef0589 100644
> --- a/xen/common/sysctl.c
> +++ b/xen/common/sysctl.c
> @@ -224,6 +224,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
>      }
>      break;
>  
> +#ifdef HAS_ACPI
>      case XEN_SYSCTL_get_pmstat:
>      {
>          ret = xsm_get_pmstat();
> @@ -259,6 +260,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
>          }
>      }
>      break;
> +#endif
>  
>      case XEN_SYSCTL_page_offline_op:
>      {

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH
  2012-02-14 14:43 ` [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH Ian Campbell
@ 2012-02-14 18:33   ` Keir Fraser
  0 siblings, 0 replies; 19+ messages in thread
From: Keir Fraser @ 2012-02-14 18:33 UTC (permalink / raw)
  To: Ian Campbell, xen-devel

On 14/02/2012 14:43, "Ian Campbell" <ian.campbell@citrix.com> wrote:

> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Keir Fraser <keir@xen.org>

> Cc: keir@xen.org
> ---
>  xen/Rules.mk            |    1 +
>  xen/arch/arm/dummy.S    |    2 --
>  xen/include/xen/sched.h |    6 ++++++
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index ee54179..6123835 100644
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -51,6 +51,7 @@ CFLAGS-$(perfc)         += -DPERF_COUNTERS
>  CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
>  CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
>  CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
> +CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH
>  CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
>  
>  ifneq ($(max_phys_cpus),)
> diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
> index 5010619..e858613 100644
> --- a/xen/arch/arm/dummy.S
> +++ b/xen/arch/arm/dummy.S
> @@ -27,8 +27,6 @@ DUMMY(gmfn_to_mfn);
>  DUMMY(gnttab_clear_flag);
>  DUMMY(gnttab_mark_dirty);
>  DUMMY(hypercall_create_continuation);
> -DUMMY(iommu_map_page);
> -DUMMY(iommu_unmap_page);
>  DUMMY(is_iomem_page);
>  DUMMY(max_page);
>  DUMMY(node_online_map);
> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
> index 567cd36..3699929 100644
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -266,8 +266,10 @@ struct domain
>  
>      /* Is this an HVM guest? */
>      bool_t           is_hvm;
> +#ifdef HAS_PASSTHROUGH
>      /* Does this guest need iommu mappings? */
>      bool_t           need_iommu;
> +#endif
>      /* Is this guest fully privileged (aka dom0)? */
>      bool_t           is_privileged;
>      /* Which guest this guest has privileges on */
> @@ -687,7 +689,11 @@ void watchdog_domain_destroy(struct domain *d);
>  #define is_hvm_vcpu(v)   (is_hvm_domain(v->domain))
>  #define is_pinned_vcpu(v) ((v)->domain->is_pinned || \
>                             cpumask_weight((v)->cpu_affinity) == 1)
> +#ifdef HAS_PASSTHROUGH
>  #define need_iommu(d)    ((d)->need_iommu)
> +#else
> +#define need_iommu(d)    (0)
> +#endif
>  
>  void set_vcpu_migration_delay(unsigned int delay);
>  unsigned int get_vcpu_migration_delay(void);

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/12 v2] ARM: Slim down dummy.S
  2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
                   ` (13 preceding siblings ...)
  2012-02-14 16:04 ` Stefano Stabellini
@ 2012-02-15 12:25 ` Ian Campbell
  14 siblings, 0 replies; 19+ messages in thread
From: Ian Campbell @ 2012-02-15 12:25 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Keir (Xen.org)

On Tue, 2012-02-14 at 14:43 +0000, Ian Campbell wrote:
> Defines a few stubs and disables some as yet unsupported core features.
> 
> Early on there's a couple of unrelated cleanups.
> 
> Patch against current unstable. #6 and #9 touch common code.
> 
> Changes since v1:
>  - make PoD stubs proper functions instead of #defines
>  - define need_iommu as 0 instead of littering common code with #if
>  - stub donate_page but leave tmem enabled.
>  - rebased against latest unstable tree

Committed with Acks from Tim & Stefano dfor the ARM bits and Keir for
the non-ARM bits.

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-02-15 12:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 14:43 [PATCH 00/12 v2] ARM: Slim down dummy.S Ian Campbell
2012-02-14 14:43 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
2012-02-14 14:43 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
2012-02-14 14:43 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
2012-02-14 14:43 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
2012-02-14 14:43 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
2012-02-14 14:43 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
2012-02-14 18:32   ` Keir Fraser
2012-02-14 14:43 ` [PATCH 07/12] arm: provide dummy version of steal_page for tmem Ian Campbell
2012-02-14 14:43 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
2012-02-14 14:43 ` [PATCH 09/12] xen: make need_iommu == 0 if !HAS_PASSTHROUGH Ian Campbell
2012-02-14 18:33   ` Keir Fraser
2012-02-14 14:43 ` [PATCH 10/12] arm: stub out PoD related p2m functions Ian Campbell
2012-02-14 14:44 ` [PATCH 11/12] arm: define max_page Ian Campbell
2012-02-14 14:44 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
2012-02-14 15:06 ` [PATCH 00/12 v2] ARM: Slim down dummy.S Tim Deegan
2012-02-14 16:04 ` Stefano Stabellini
2012-02-15 12:25 ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2012-01-20 12:03 [PATCH 00/12] " Ian Campbell
2012-01-20 12:06 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).