* [PATCH 00/12] ARM: Slim down dummy.S
@ 2012-01-20 12:03 Ian Campbell
2012-01-20 12:06 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
` (12 more replies)
0 siblings, 13 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:03 UTC (permalink / raw)
To: xen-devel
Defines a few stubs and disables some as yet unsupported core features.
Early on there's a couple of unrelated cleanups.
Patch against v5 posting (Stefano's arm-v5 branch) + David Vrables
zImage series.
Ian.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 01/12] arm: add a missing local-vars comment
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
` (11 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 d4ffa4f..a1bcdbf 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -190,3 +190,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] 30+ messages in thread
* [PATCH 02/12] arm: define some more cp15 registers
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
2012-01-20 12:06 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
` (10 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 51afb31..2433723 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -63,6 +63,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));
+}
+
void __init start_xen(unsigned long boot_phys_offset,
unsigned long arm_type,
unsigned long atag_paddr)
@@ -127,7 +141,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] 30+ messages in thread
* [PATCH 03/12] arm: align some register bit definitions
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
2012-01-20 12:06 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
2012-01-20 12:06 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
` (9 subsequent siblings)
12 siblings, 0 replies; 30+ 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] 30+ messages in thread
* [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (2 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
` (8 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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] 30+ messages in thread
* [PATCH 05/12] arm: Add stub functions instead of using DUMMY
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (3 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
` (7 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 | 3 +++
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, 69 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 9bc2fc8..e6745f4 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -2,7 +2,10 @@ subdir-y += lib
obj-y += dummy.o
obj-y += entry.o
+obj-y += cache.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 613d084..45971cb 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -311,6 +311,11 @@ void __init setup_frametable_mappings(paddr_t ps, paddr_t pe)
frametable_virt_end = FRAMETABLE_VIRT_START + (nr_pages * sizeof(struct page_info));
}
+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..20a16f9
--- /dev/null
+++ b/xen/arch/arm/sysctl.c
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * Arch-specific domctl.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] 30+ messages in thread
* [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (4 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM) Ian Campbell
` (6 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 UTC (permalink / raw)
To: xen-devel; +Cc: 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>
---
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 59c7dd7..b7b54f6 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] 30+ messages in thread
* [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (5 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:19 ` Stefano Stabellini
2012-01-20 12:06 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
` (5 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Campbell
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/Rules.mk | 1 +
xen/arch/arm/dummy.S | 1 -
xen/arch/ia64/Rules.mk | 1 +
xen/arch/x86/Rules.mk | 1 +
xen/common/Makefile | 4 ++--
xen/common/page_alloc.c | 1 +
xen/include/xen/tmem.h | 9 +++++++++
xen/include/xen/tmem_xen.h | 5 +++++
8 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/xen/Rules.mk b/xen/Rules.mk
index b7b54f6..e25e8d4 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_TMEM) += -DHAS_TMEM
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 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/ia64/Rules.mk b/xen/arch/ia64/Rules.mk
index 054b4de..6c8cf69 100644
--- a/xen/arch/ia64/Rules.mk
+++ b/xen/arch/ia64/Rules.mk
@@ -9,6 +9,7 @@ HAS_PCI := y
HAS_PASSTHROUGH := y
HAS_NS16550 := y
HAS_KEXEC := y
+HAS_TMEM := y
xenoprof := y
no_warns ?= n
vti_debug ?= n
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 1e48877..8802a69 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -8,6 +8,7 @@ HAS_PCI := y
HAS_PASSTHROUGH := y
HAS_NS16550 := y
HAS_KEXEC := y
+HAS_TMEM := y
xenoprof := y
#
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 9249845..68a2df1 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -38,8 +38,8 @@ obj-y += vsprintf.o
obj-y += wait.o
obj-y += xmalloc_tlsf.o
obj-y += rcupdate.o
-obj-y += tmem.o
-obj-y += tmem_xen.o
+obj-$(HAS_TMEM) += tmem.o
+obj-$(HAS_TMEM) += tmem_xen.o
obj-y += radix-tree.o
obj-y += rbtree.o
obj-y += lzo.o
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 249bb35..3aac830 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -35,6 +35,7 @@
#include <xen/perfc.h>
#include <xen/numa.h>
#include <xen/nodemask.h>
+#include <xen/errno.h>
#include <xen/tmem.h>
#include <xen/tmem_xen.h>
#include <public/sysctl.h>
diff --git a/xen/include/xen/tmem.h b/xen/include/xen/tmem.h
index 5dbf9d5..2ebffb4 100644
--- a/xen/include/xen/tmem.h
+++ b/xen/include/xen/tmem.h
@@ -9,8 +9,17 @@
#ifndef __XEN_TMEM_H__
#define __XEN_TMEM_H__
+#ifdef HAS_TMEM
extern void tmem_destroy(void *);
extern void *tmem_relinquish_pages(unsigned int, unsigned int);
extern unsigned long tmem_freeable_pages(void);
+#else
+static inline void tmem_destroy(void *v) {}
+static inline void *tmem_relinquish_pages(unsigned int order, unsigned int flags)
+{
+ return NULL;
+}
+static inline unsigned long tmem_freeable_pages(void) { return 0; }
+#endif
#endif /* __XEN_TMEM_H__ */
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index fdbeed1..a6c0672 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -9,6 +9,7 @@
#ifndef __XEN_TMEM_XEN_H__
#define __XEN_TMEM_XEN_H__
+#ifdef HAS_TMEM
#include <xen/config.h>
#include <xen/mm.h> /* heap alloc/free */
#include <xen/pfn.h>
@@ -559,4 +560,8 @@ extern int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, void *tmem_va, pagesize_t
#define RESET_CYC_COUNTER(x) do { } while (0)
#endif
+#else /* HAS_TMEM */
+#define opt_tmem 0
+#endif
+
#endif /* __XEN_TMEM_XEN_H__ */
--
1.7.2.5
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 08/12] arm: Implement arch_get_xen_caps
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (6 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM) Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH Ian Campbell
` (4 subsequent siblings)
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 45971cb..50c3634 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -23,6 +23,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 2433723..2fcde24 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -213,6 +213,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] 30+ messages in thread
* [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (7 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:38 ` Jan Beulich
2012-01-20 12:06 ` [PATCH 10/12] arm: stub out PoD Ian Campbell
` (3 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Campbell
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/Rules.mk | 1 +
xen/arch/arm/dummy.S | 2 --
xen/common/grant_table.c | 6 ++++++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/xen/Rules.mk b/xen/Rules.mk
index e25e8d4..ce88316 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -52,6 +52,7 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
CFLAGS-$(lock_profile) += -DLOCK_PROFILE
CFLAGS-$(HAS_ACPI) += -DHAS_ACPI
CFLAGS-$(HAS_TMEM) += -DHAS_TMEM
+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/common/grant_table.c b/xen/common/grant_table.c
index b024016..1798fcd 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -434,6 +434,7 @@ static int _set_status(unsigned gt_version,
return _set_status_v2(domid, readonly, mapflag, shah, act, status);
}
+#ifdef HAS_PASSTHROUGH
static void mapcount(
struct domain *ld, unsigned long mfn,
unsigned int *wrc, unsigned int *rdc)
@@ -456,6 +457,7 @@ static void mapcount(
rcu_unlock_domain(rd);
}
}
+#endif
/*
* Returns 0 if TLB flush / invalidate required by caller.
@@ -662,6 +664,7 @@ __gnttab_map_grant_ref(
goto undo_out;
}
+#ifdef HAS_PASSTHROUGH
if ( !is_hvm_domain(ld) && need_iommu(ld) )
{
unsigned int wrc, rdc;
@@ -689,6 +692,7 @@ __gnttab_map_grant_ref(
goto undo_out;
}
}
+#endif
TRACE_1D(TRC_MEM_PAGE_GRANT_MAP, op->dom);
@@ -858,6 +862,7 @@ __gnttab_unmap_common(
act->pin -= GNTPIN_hstw_inc;
}
+#ifdef HAS_PASSTHROUGH
if ( !is_hvm_domain(ld) && need_iommu(ld) )
{
unsigned int wrc, rdc;
@@ -874,6 +879,7 @@ __gnttab_unmap_common(
goto unmap_out;
}
}
+#endif
/* If just unmapped a writable mapping, mark as dirtied */
if ( !(op->flags & GNTMAP_readonly) )
--
1.7.2.5
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 10/12] arm: stub out PoD
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (8 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:20 ` Stefano Stabellini
2012-01-20 12:06 ` [PATCH 11/12] arm: define max_page Ian Campbell
` (2 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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/include/asm-arm/mm.h | 8 ++++++--
xen/include/asm-arm/p2m.h | 11 +++++++----
3 files changed, 13 insertions(+), 8 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/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
index f721c54..ebe09cf 100644
--- a/xen/include/asm-arm/mm.h
+++ b/xen/include/asm-arm/mm.h
@@ -294,8 +294,12 @@ extern struct domain *dom_xen, *dom_io, *dom_cow;
#define memguard_guard_stack(_p) ((void)0)
#define memguard_guard_range(_p,_l) ((void)0)
#define memguard_unguard_range(_p,_l) ((void)0)
-int guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
- unsigned int order);
+/*
+ * int guest_physmap_mark_populate_on_demand(struct domain *d,
+ * unsigned long gfn,
+ * unsigned int order)
+ */
+#define guest_physmap_mark_populate_on_demand(d, gfn, order) -ENOSYS /* No PoD on ARM */
extern void put_page_type(struct page_info *page);
static inline void put_page_and_type(struct page_info *page)
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index aec52f7..723518d 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -48,10 +48,13 @@ unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn);
/* Call when decreasing memory reservation to handle PoD entries properly.
* Will return '1' if all entries were handled and nothing more need be done.*/
-int
-p2m_pod_decrease_reservation(struct domain *d,
- xen_pfn_t gpfn,
- unsigned int order);
+ /* No PoD on ARM yet */
+/* int
+ * p2m_pod_decrease_reservation(struct domain *d,
+ * xen_pfn_t gpfn,
+ * unsigned int order);
+ */
+#define p2m_pod_decrease_reservation(d, gpfn, order) -ENOSYS
/* Compatibility function exporting the old untyped interface */
static inline unsigned long get_gfn_untyped(struct domain *d, unsigned long gpfn)
--
1.7.2.5
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 11/12] arm: define max_page
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (9 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 10/12] arm: stub out PoD Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
2012-01-20 12:20 ` [PATCH 00/12] ARM: Slim down dummy.S Stefano Stabellini
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 50c3634..4ec9788 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -41,6 +41,8 @@ unsigned long xenheap_virt_end;
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 2fcde24..b195813 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -31,6 +31,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>
@@ -122,6 +123,7 @@ void __init start_xen(unsigned long boot_phys_offset,
/* TODO Need to find actual memory, for now use 4GB at 512GB */
setup_frametable_mappings(0x8000000000ULL, 0x8100000000UL);
+ max_page = PFN_DOWN(0x8100000000UL);
/* Add xenheap memory */
init_xenheap_pages(pfn_to_paddr(xenheap_mfn_start+1),
--
1.7.2.5
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (10 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 11/12] arm: define max_page Ian Campbell
@ 2012-01-20 12:06 ` Ian Campbell
2012-01-20 12:20 ` [PATCH 00/12] ARM: Slim down dummy.S Stefano Stabellini
12 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:06 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 | 71 +++++++++++++++++++++++++++++--------------------
1 files changed, 42 insertions(+), 29 deletions(-)
diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 295938e..1bf13a3 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -5,49 +5,62 @@ x: .word 0xe7f000f0 /* Undefined instruction */
#define NOP(x) \
.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] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:06 ` [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM) Ian Campbell
@ 2012-01-20 12:19 ` Stefano Stabellini
2012-01-20 12:25 ` Tim Deegan
2012-01-20 12:28 ` Ian Campbell
0 siblings, 2 replies; 30+ messages in thread
From: Stefano Stabellini @ 2012-01-20 12:19 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
Why do we need this?
I though that tmem compiled OK on ARM. Also I don't think there is any
architectural limitation that would prevent tmem from working on ARM,
right?
If the goal is to remove DUMMY(donate_page) maybe it is better to
introduce a stub function instead?
On Fri, 20 Jan 2012, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/Rules.mk | 1 +
> xen/arch/arm/dummy.S | 1 -
> xen/arch/ia64/Rules.mk | 1 +
> xen/arch/x86/Rules.mk | 1 +
> xen/common/Makefile | 4 ++--
> xen/common/page_alloc.c | 1 +
> xen/include/xen/tmem.h | 9 +++++++++
> xen/include/xen/tmem_xen.h | 5 +++++
> 8 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index b7b54f6..e25e8d4 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_TMEM) += -DHAS_TMEM
> 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 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/ia64/Rules.mk b/xen/arch/ia64/Rules.mk
> index 054b4de..6c8cf69 100644
> --- a/xen/arch/ia64/Rules.mk
> +++ b/xen/arch/ia64/Rules.mk
> @@ -9,6 +9,7 @@ HAS_PCI := y
> HAS_PASSTHROUGH := y
> HAS_NS16550 := y
> HAS_KEXEC := y
> +HAS_TMEM := y
> xenoprof := y
> no_warns ?= n
> vti_debug ?= n
> diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
> index 1e48877..8802a69 100644
> --- a/xen/arch/x86/Rules.mk
> +++ b/xen/arch/x86/Rules.mk
> @@ -8,6 +8,7 @@ HAS_PCI := y
> HAS_PASSTHROUGH := y
> HAS_NS16550 := y
> HAS_KEXEC := y
> +HAS_TMEM := y
> xenoprof := y
>
> #
> diff --git a/xen/common/Makefile b/xen/common/Makefile
> index 9249845..68a2df1 100644
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -38,8 +38,8 @@ obj-y += vsprintf.o
> obj-y += wait.o
> obj-y += xmalloc_tlsf.o
> obj-y += rcupdate.o
> -obj-y += tmem.o
> -obj-y += tmem_xen.o
> +obj-$(HAS_TMEM) += tmem.o
> +obj-$(HAS_TMEM) += tmem_xen.o
> obj-y += radix-tree.o
> obj-y += rbtree.o
> obj-y += lzo.o
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index 249bb35..3aac830 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -35,6 +35,7 @@
> #include <xen/perfc.h>
> #include <xen/numa.h>
> #include <xen/nodemask.h>
> +#include <xen/errno.h>
> #include <xen/tmem.h>
> #include <xen/tmem_xen.h>
> #include <public/sysctl.h>
> diff --git a/xen/include/xen/tmem.h b/xen/include/xen/tmem.h
> index 5dbf9d5..2ebffb4 100644
> --- a/xen/include/xen/tmem.h
> +++ b/xen/include/xen/tmem.h
> @@ -9,8 +9,17 @@
> #ifndef __XEN_TMEM_H__
> #define __XEN_TMEM_H__
>
> +#ifdef HAS_TMEM
> extern void tmem_destroy(void *);
> extern void *tmem_relinquish_pages(unsigned int, unsigned int);
> extern unsigned long tmem_freeable_pages(void);
> +#else
> +static inline void tmem_destroy(void *v) {}
> +static inline void *tmem_relinquish_pages(unsigned int order, unsigned int flags)
> +{
> + return NULL;
> +}
> +static inline unsigned long tmem_freeable_pages(void) { return 0; }
> +#endif
>
> #endif /* __XEN_TMEM_H__ */
> diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
> index fdbeed1..a6c0672 100644
> --- a/xen/include/xen/tmem_xen.h
> +++ b/xen/include/xen/tmem_xen.h
> @@ -9,6 +9,7 @@
> #ifndef __XEN_TMEM_XEN_H__
> #define __XEN_TMEM_XEN_H__
>
> +#ifdef HAS_TMEM
> #include <xen/config.h>
> #include <xen/mm.h> /* heap alloc/free */
> #include <xen/pfn.h>
> @@ -559,4 +560,8 @@ extern int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, void *tmem_va, pagesize_t
> #define RESET_CYC_COUNTER(x) do { } while (0)
> #endif
>
> +#else /* HAS_TMEM */
> +#define opt_tmem 0
> +#endif
> +
> #endif /* __XEN_TMEM_XEN_H__ */
> --
> 1.7.2.5
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] arm: stub out PoD
2012-01-20 12:06 ` [PATCH 10/12] arm: stub out PoD Ian Campbell
@ 2012-01-20 12:20 ` Stefano Stabellini
2012-01-20 12:29 ` Ian Campbell
0 siblings, 1 reply; 30+ messages in thread
From: Stefano Stabellini @ 2012-01-20 12:20 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
Could we have a proper stub function or a static inline rather than an
#define?
On Fri, 20 Jan 2012, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/arch/arm/dummy.S | 2 --
> xen/include/asm-arm/mm.h | 8 ++++++--
> xen/include/asm-arm/p2m.h | 11 +++++++----
> 3 files changed, 13 insertions(+), 8 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/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
> index f721c54..ebe09cf 100644
> --- a/xen/include/asm-arm/mm.h
> +++ b/xen/include/asm-arm/mm.h
> @@ -294,8 +294,12 @@ extern struct domain *dom_xen, *dom_io, *dom_cow;
> #define memguard_guard_stack(_p) ((void)0)
> #define memguard_guard_range(_p,_l) ((void)0)
> #define memguard_unguard_range(_p,_l) ((void)0)
> -int guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
> - unsigned int order);
> +/*
> + * int guest_physmap_mark_populate_on_demand(struct domain *d,
> + * unsigned long gfn,
> + * unsigned int order)
> + */
> +#define guest_physmap_mark_populate_on_demand(d, gfn, order) -ENOSYS /* No PoD on ARM */
>
> extern void put_page_type(struct page_info *page);
> static inline void put_page_and_type(struct page_info *page)
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index aec52f7..723518d 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -48,10 +48,13 @@ unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn);
>
> /* Call when decreasing memory reservation to handle PoD entries properly.
> * Will return '1' if all entries were handled and nothing more need be done.*/
> -int
> -p2m_pod_decrease_reservation(struct domain *d,
> - xen_pfn_t gpfn,
> - unsigned int order);
> + /* No PoD on ARM yet */
> +/* int
> + * p2m_pod_decrease_reservation(struct domain *d,
> + * xen_pfn_t gpfn,
> + * unsigned int order);
> + */
> +#define p2m_pod_decrease_reservation(d, gpfn, order) -ENOSYS
>
> /* Compatibility function exporting the old untyped interface */
> static inline unsigned long get_gfn_untyped(struct domain *d, unsigned long gpfn)
> --
> 1.7.2.5
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] ARM: Slim down dummy.S
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
` (11 preceding siblings ...)
2012-01-20 12:06 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
@ 2012-01-20 12:20 ` Stefano Stabellini
12 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2012-01-20 12:20 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
On Fri, 20 Jan 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 v5 posting (Stefano's arm-v5 branch) + David Vrables
> zImage series.
All fine by me but two comments.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:19 ` Stefano Stabellini
@ 2012-01-20 12:25 ` Tim Deegan
2012-01-20 12:34 ` Jan Beulich
2012-01-20 12:28 ` Ian Campbell
1 sibling, 1 reply; 30+ messages in thread
From: Tim Deegan @ 2012-01-20 12:25 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel@lists.xensource.com, Ian Campbell
At 12:19 +0000 on 20 Jan (1327061942), Stefano Stabellini wrote:
> Why do we need this?
> I though that tmem compiled OK on ARM. Also I don't think there is any
> architectural limitation that would prevent tmem from working on ARM,
> right?
It may compile but it surely won't work. :) Does tmem work at all for
non-PV guests?
Tim.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:19 ` Stefano Stabellini
2012-01-20 12:25 ` Tim Deegan
@ 2012-01-20 12:28 ` Ian Campbell
2012-01-20 12:36 ` Jan Beulich
1 sibling, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:28 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel@lists.xensource.com
On Fri, 2012-01-20 at 12:19 +0000, Stefano Stabellini wrote:
> Why do we need this?
> I though that tmem compiled OK on ARM.
But it can't possibly work, as evidenced by the missing symbol in
dummy.S! There is no point in compiling something which cannot work.
> Also I don't think there is any
> architectural limitation that would prevent tmem from working on ARM,
> right?
Not really an architectural thing but a "not yet implemented thing".
tmem is quite a long way down the list of things we need to do for ARM
right now. I'd be quite happy to have this patch reverted at some point
in the future but for now there is no point in pretending that tmem
works.
> If the goal is to remove DUMMY(donate_page) maybe it is better to
> introduce a stub function instead?
A stub would be no better than the dummy function in this case. It needs
to actually do things which we cannot do yet on ARM.
dummy.S is a total hack and we should be aiming to remove it ASAP.
Ian.
>
> On Fri, 20 Jan 2012, Ian Campbell wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> > xen/Rules.mk | 1 +
> > xen/arch/arm/dummy.S | 1 -
> > xen/arch/ia64/Rules.mk | 1 +
> > xen/arch/x86/Rules.mk | 1 +
> > xen/common/Makefile | 4 ++--
> > xen/common/page_alloc.c | 1 +
> > xen/include/xen/tmem.h | 9 +++++++++
> > xen/include/xen/tmem_xen.h | 5 +++++
> > 8 files changed, 20 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/Rules.mk b/xen/Rules.mk
> > index b7b54f6..e25e8d4 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_TMEM) += -DHAS_TMEM
> > 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 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/ia64/Rules.mk b/xen/arch/ia64/Rules.mk
> > index 054b4de..6c8cf69 100644
> > --- a/xen/arch/ia64/Rules.mk
> > +++ b/xen/arch/ia64/Rules.mk
> > @@ -9,6 +9,7 @@ HAS_PCI := y
> > HAS_PASSTHROUGH := y
> > HAS_NS16550 := y
> > HAS_KEXEC := y
> > +HAS_TMEM := y
> > xenoprof := y
> > no_warns ?= n
> > vti_debug ?= n
> > diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
> > index 1e48877..8802a69 100644
> > --- a/xen/arch/x86/Rules.mk
> > +++ b/xen/arch/x86/Rules.mk
> > @@ -8,6 +8,7 @@ HAS_PCI := y
> > HAS_PASSTHROUGH := y
> > HAS_NS16550 := y
> > HAS_KEXEC := y
> > +HAS_TMEM := y
> > xenoprof := y
> >
> > #
> > diff --git a/xen/common/Makefile b/xen/common/Makefile
> > index 9249845..68a2df1 100644
> > --- a/xen/common/Makefile
> > +++ b/xen/common/Makefile
> > @@ -38,8 +38,8 @@ obj-y += vsprintf.o
> > obj-y += wait.o
> > obj-y += xmalloc_tlsf.o
> > obj-y += rcupdate.o
> > -obj-y += tmem.o
> > -obj-y += tmem_xen.o
> > +obj-$(HAS_TMEM) += tmem.o
> > +obj-$(HAS_TMEM) += tmem_xen.o
> > obj-y += radix-tree.o
> > obj-y += rbtree.o
> > obj-y += lzo.o
> > diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> > index 249bb35..3aac830 100644
> > --- a/xen/common/page_alloc.c
> > +++ b/xen/common/page_alloc.c
> > @@ -35,6 +35,7 @@
> > #include <xen/perfc.h>
> > #include <xen/numa.h>
> > #include <xen/nodemask.h>
> > +#include <xen/errno.h>
> > #include <xen/tmem.h>
> > #include <xen/tmem_xen.h>
> > #include <public/sysctl.h>
> > diff --git a/xen/include/xen/tmem.h b/xen/include/xen/tmem.h
> > index 5dbf9d5..2ebffb4 100644
> > --- a/xen/include/xen/tmem.h
> > +++ b/xen/include/xen/tmem.h
> > @@ -9,8 +9,17 @@
> > #ifndef __XEN_TMEM_H__
> > #define __XEN_TMEM_H__
> >
> > +#ifdef HAS_TMEM
> > extern void tmem_destroy(void *);
> > extern void *tmem_relinquish_pages(unsigned int, unsigned int);
> > extern unsigned long tmem_freeable_pages(void);
> > +#else
> > +static inline void tmem_destroy(void *v) {}
> > +static inline void *tmem_relinquish_pages(unsigned int order, unsigned int flags)
> > +{
> > + return NULL;
> > +}
> > +static inline unsigned long tmem_freeable_pages(void) { return 0; }
> > +#endif
> >
> > #endif /* __XEN_TMEM_H__ */
> > diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
> > index fdbeed1..a6c0672 100644
> > --- a/xen/include/xen/tmem_xen.h
> > +++ b/xen/include/xen/tmem_xen.h
> > @@ -9,6 +9,7 @@
> > #ifndef __XEN_TMEM_XEN_H__
> > #define __XEN_TMEM_XEN_H__
> >
> > +#ifdef HAS_TMEM
> > #include <xen/config.h>
> > #include <xen/mm.h> /* heap alloc/free */
> > #include <xen/pfn.h>
> > @@ -559,4 +560,8 @@ extern int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, void *tmem_va, pagesize_t
> > #define RESET_CYC_COUNTER(x) do { } while (0)
> > #endif
> >
> > +#else /* HAS_TMEM */
> > +#define opt_tmem 0
> > +#endif
> > +
> > #endif /* __XEN_TMEM_XEN_H__ */
> > --
> > 1.7.2.5
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] arm: stub out PoD
2012-01-20 12:20 ` Stefano Stabellini
@ 2012-01-20 12:29 ` Ian Campbell
2012-01-20 12:35 ` Tim Deegan
0 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:29 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel@lists.xensource.com
On Fri, 2012-01-20 at 12:20 +0000, Stefano Stabellini wrote:
> Could we have a proper stub function or a static inline rather than an
> #define?
I tried that, it would require pulling in more headers etc. This is
really just a stop gap until we implement enough p2m to support pod
properly. I left the real prototypes in the comment for reference.
Ian.
>
>
> On Fri, 20 Jan 2012, Ian Campbell wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> > xen/arch/arm/dummy.S | 2 --
> > xen/include/asm-arm/mm.h | 8 ++++++--
> > xen/include/asm-arm/p2m.h | 11 +++++++----
> > 3 files changed, 13 insertions(+), 8 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/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
> > index f721c54..ebe09cf 100644
> > --- a/xen/include/asm-arm/mm.h
> > +++ b/xen/include/asm-arm/mm.h
> > @@ -294,8 +294,12 @@ extern struct domain *dom_xen, *dom_io, *dom_cow;
> > #define memguard_guard_stack(_p) ((void)0)
> > #define memguard_guard_range(_p,_l) ((void)0)
> > #define memguard_unguard_range(_p,_l) ((void)0)
> > -int guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
> > - unsigned int order);
> > +/*
> > + * int guest_physmap_mark_populate_on_demand(struct domain *d,
> > + * unsigned long gfn,
> > + * unsigned int order)
> > + */
> > +#define guest_physmap_mark_populate_on_demand(d, gfn, order) -ENOSYS /* No PoD on ARM */
> >
> > extern void put_page_type(struct page_info *page);
> > static inline void put_page_and_type(struct page_info *page)
> > diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> > index aec52f7..723518d 100644
> > --- a/xen/include/asm-arm/p2m.h
> > +++ b/xen/include/asm-arm/p2m.h
> > @@ -48,10 +48,13 @@ unsigned long gmfn_to_mfn(struct domain *d, unsigned long gpfn);
> >
> > /* Call when decreasing memory reservation to handle PoD entries properly.
> > * Will return '1' if all entries were handled and nothing more need be done.*/
> > -int
> > -p2m_pod_decrease_reservation(struct domain *d,
> > - xen_pfn_t gpfn,
> > - unsigned int order);
> > + /* No PoD on ARM yet */
> > +/* int
> > + * p2m_pod_decrease_reservation(struct domain *d,
> > + * xen_pfn_t gpfn,
> > + * unsigned int order);
> > + */
> > +#define p2m_pod_decrease_reservation(d, gpfn, order) -ENOSYS
> >
> > /* Compatibility function exporting the old untyped interface */
> > static inline unsigned long get_gfn_untyped(struct domain *d, unsigned long gpfn)
> > --
> > 1.7.2.5
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:25 ` Tim Deegan
@ 2012-01-20 12:34 ` Jan Beulich
2012-01-20 22:24 ` Dan M @ Oracle
0 siblings, 1 reply; 30+ messages in thread
From: Jan Beulich @ 2012-01-20 12:34 UTC (permalink / raw)
To: dan.magenheimer, Tim Deegan
Cc: xen-devel@lists.xensource.com, Ian Campbell, Stefano Stabellini
>>> On 20.01.12 at 13:25, Tim Deegan <tim@xen.org> wrote:
> At 12:19 +0000 on 20 Jan (1327061942), Stefano Stabellini wrote:
>> Why do we need this?
>> I though that tmem compiled OK on ARM. Also I don't think there is any
>> architectural limitation that would prevent tmem from working on ARM,
>> right?
>
> It may compile but it surely won't work. :) Does tmem work at all for
> non-PV guests?
Supposedly yes, otherwise it wouldn't be wired up in the HVM
hypercall tables. Dan?
Jan
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] arm: stub out PoD
2012-01-20 12:29 ` Ian Campbell
@ 2012-01-20 12:35 ` Tim Deegan
2012-01-20 12:40 ` Ian Campbell
0 siblings, 1 reply; 30+ messages in thread
From: Tim Deegan @ 2012-01-20 12:35 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini
At 12:29 +0000 on 20 Jan (1327062595), Ian Campbell wrote:
> On Fri, 2012-01-20 at 12:20 +0000, Stefano Stabellini wrote:
> > Could we have a proper stub function or a static inline rather than an
> > #define?
>
> I tried that, it would require pulling in more headers etc. This is
> really just a stop gap until we implement enough p2m to support pod
> properly. I left the real prototypes in the comment for reference.
We could just as easily have
static inline int
guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
unsigned int order)
{
return -ENOSYS;
}
&c, for no extra effort (and for the same effect). A matter of style is
all.
Tim.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:28 ` Ian Campbell
@ 2012-01-20 12:36 ` Jan Beulich
2012-01-20 12:39 ` Ian Campbell
0 siblings, 1 reply; 30+ messages in thread
From: Jan Beulich @ 2012-01-20 12:36 UTC (permalink / raw)
To: Ian Campbell, Stefano Stabellini; +Cc: xen-devel@lists.xensource.com
>>> On 20.01.12 at 13:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Fri, 2012-01-20 at 12:19 +0000, Stefano Stabellini wrote:
>> Why do we need this?
>> I though that tmem compiled OK on ARM.
>
> But it can't possibly work, as evidenced by the missing symbol in
> dummy.S! There is no point in compiling something which cannot work.
But introducing random HAS_xyz variables isn't that pretty either. The
more that the term 'has' seems wrong to me in this case.
By just not wiring up the hypercall you could achieve the same effect.
Jan
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH
2012-01-20 12:06 ` [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH Ian Campbell
@ 2012-01-20 12:38 ` Jan Beulich
2012-01-20 12:40 ` Ian Campbell
0 siblings, 1 reply; 30+ messages in thread
From: Jan Beulich @ 2012-01-20 12:38 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
>>> On 20.01.12 at 13:06, Ian Campbell <ian.campbell@citrix.com> wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/Rules.mk | 1 +
> xen/arch/arm/dummy.S | 2 --
> xen/common/grant_table.c | 6 ++++++
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index e25e8d4..ce88316 100644
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -52,6 +52,7 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
> CFLAGS-$(lock_profile) += -DLOCK_PROFILE
> CFLAGS-$(HAS_ACPI) += -DHAS_ACPI
> CFLAGS-$(HAS_TMEM) += -DHAS_TMEM
> +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/common/grant_table.c b/xen/common/grant_table.c
> index b024016..1798fcd 100644
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -434,6 +434,7 @@ static int _set_status(unsigned gt_version,
> return _set_status_v2(domid, readonly, mapflag, shah, act, status);
> }
>
> +#ifdef HAS_PASSTHROUGH
> static void mapcount(
> struct domain *ld, unsigned long mfn,
> unsigned int *wrc, unsigned int *rdc)
> @@ -456,6 +457,7 @@ static void mapcount(
> rcu_unlock_domain(rd);
> }
> }
> +#endif
>
> /*
> * Returns 0 if TLB flush / invalidate required by caller.
> @@ -662,6 +664,7 @@ __gnttab_map_grant_ref(
> goto undo_out;
> }
>
> +#ifdef HAS_PASSTHROUGH
> if ( !is_hvm_domain(ld) && need_iommu(ld) )
Wouldn't #define-ing need_iommu() to 0 in the ARM headers achieve
the same effect, without cluttering common code?
Jan
> {
> unsigned int wrc, rdc;
> @@ -689,6 +692,7 @@ __gnttab_map_grant_ref(
> goto undo_out;
> }
> }
> +#endif
>
> TRACE_1D(TRC_MEM_PAGE_GRANT_MAP, op->dom);
>
> @@ -858,6 +862,7 @@ __gnttab_unmap_common(
> act->pin -= GNTPIN_hstw_inc;
> }
>
> +#ifdef HAS_PASSTHROUGH
> if ( !is_hvm_domain(ld) && need_iommu(ld) )
> {
> unsigned int wrc, rdc;
> @@ -874,6 +879,7 @@ __gnttab_unmap_common(
> goto unmap_out;
> }
> }
> +#endif
>
> /* If just unmapped a writable mapping, mark as dirtied */
> if ( !(op->flags & GNTMAP_readonly) )
> --
> 1.7.2.5
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:36 ` Jan Beulich
@ 2012-01-20 12:39 ` Ian Campbell
2012-01-20 12:51 ` Jan Beulich
0 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:39 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini
On Fri, 2012-01-20 at 12:36 +0000, Jan Beulich wrote:
> >>> On 20.01.12 at 13:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Fri, 2012-01-20 at 12:19 +0000, Stefano Stabellini wrote:
> >> Why do we need this?
> >> I though that tmem compiled OK on ARM.
> >
> > But it can't possibly work, as evidenced by the missing symbol in
> > dummy.S! There is no point in compiling something which cannot work.
>
> But introducing random HAS_xyz variables isn't that pretty either. The
> more that the term 'has' seems wrong to me in this case.
yeah, I was copy the other similar variables. Probably ENABLE would be
better in this case.
> By just not wiring up the hypercall you could achieve the same effect.
Really? I'd still need to ifdef out the hypercall body or I'd get
unresolved symbols, wouldn't I?
Ian.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH
2012-01-20 12:38 ` Jan Beulich
@ 2012-01-20 12:40 ` Ian Campbell
2012-01-20 12:52 ` Jan Beulich
0 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:40 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel@lists.xensource.com
On Fri, 2012-01-20 at 12:38 +0000, Jan Beulich wrote:
> >>> On 20.01.12 at 13:06, Ian Campbell <ian.campbell@citrix.com> wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> > xen/Rules.mk | 1 +
> > xen/arch/arm/dummy.S | 2 --
> > xen/common/grant_table.c | 6 ++++++
> > 3 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/xen/Rules.mk b/xen/Rules.mk
> > index e25e8d4..ce88316 100644
> > --- a/xen/Rules.mk
> > +++ b/xen/Rules.mk
> > @@ -52,6 +52,7 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
> > CFLAGS-$(lock_profile) += -DLOCK_PROFILE
> > CFLAGS-$(HAS_ACPI) += -DHAS_ACPI
> > CFLAGS-$(HAS_TMEM) += -DHAS_TMEM
> > +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/common/grant_table.c b/xen/common/grant_table.c
> > index b024016..1798fcd 100644
> > --- a/xen/common/grant_table.c
> > +++ b/xen/common/grant_table.c
> > @@ -434,6 +434,7 @@ static int _set_status(unsigned gt_version,
> > return _set_status_v2(domid, readonly, mapflag, shah, act, status);
> > }
> >
> > +#ifdef HAS_PASSTHROUGH
> > static void mapcount(
> > struct domain *ld, unsigned long mfn,
> > unsigned int *wrc, unsigned int *rdc)
> > @@ -456,6 +457,7 @@ static void mapcount(
> > rcu_unlock_domain(rd);
> > }
> > }
> > +#endif
> >
> > /*
> > * Returns 0 if TLB flush / invalidate required by caller.
> > @@ -662,6 +664,7 @@ __gnttab_map_grant_ref(
> > goto undo_out;
> > }
> >
> > +#ifdef HAS_PASSTHROUGH
> > if ( !is_hvm_domain(ld) && need_iommu(ld) )
>
> Wouldn't #define-ing need_iommu() to 0 in the ARM headers achieve
> the same effect, without cluttering common code?
Yes. I'd thought there were other uses of need_iommu but in fact they
are all in x86.
Ian.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] arm: stub out PoD
2012-01-20 12:35 ` Tim Deegan
@ 2012-01-20 12:40 ` Ian Campbell
0 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2012-01-20 12:40 UTC (permalink / raw)
To: Tim Deegan; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini
On Fri, 2012-01-20 at 12:35 +0000, Tim Deegan wrote:
> At 12:29 +0000 on 20 Jan (1327062595), Ian Campbell wrote:
> > On Fri, 2012-01-20 at 12:20 +0000, Stefano Stabellini wrote:
> > > Could we have a proper stub function or a static inline rather than an
> > > #define?
> >
> > I tried that, it would require pulling in more headers etc. This is
> > really just a stop gap until we implement enough p2m to support pod
> > properly. I left the real prototypes in the comment for reference.
>
> We could just as easily have
>
> static inline int
> guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
> unsigned int order)
> {
> return -ENOSYS;
> }
>
> &c, for no extra effort (and for the same effect). A matter of style is
> all.
That is exactly what required pulling in more headers.
Ian.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:39 ` Ian Campbell
@ 2012-01-20 12:51 ` Jan Beulich
0 siblings, 0 replies; 30+ messages in thread
From: Jan Beulich @ 2012-01-20 12:51 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini
>>> On 20.01.12 at 13:39, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Fri, 2012-01-20 at 12:36 +0000, Jan Beulich wrote:
>> >>> On 20.01.12 at 13:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > On Fri, 2012-01-20 at 12:19 +0000, Stefano Stabellini wrote:
>> >> Why do we need this?
>> >> I though that tmem compiled OK on ARM.
>> >
>> > But it can't possibly work, as evidenced by the missing symbol in
>> > dummy.S! There is no point in compiling something which cannot work.
>>
>> But introducing random HAS_xyz variables isn't that pretty either. The
>> more that the term 'has' seems wrong to me in this case.
>
> yeah, I was copy the other similar variables. Probably ENABLE would be
> better in this case.
>
>> By just not wiring up the hypercall you could achieve the same effect.
>
> Really? I'd still need to ifdef out the hypercall body or I'd get
> unresolved symbols, wouldn't I?
Perhaps, but stubbing out dead symbols in a new port seems
prettier to me than cluttering common code.
Jan
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH
2012-01-20 12:40 ` Ian Campbell
@ 2012-01-20 12:52 ` Jan Beulich
0 siblings, 0 replies; 30+ messages in thread
From: Jan Beulich @ 2012-01-20 12:52 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
>>> On 20.01.12 at 13:40, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Fri, 2012-01-20 at 12:38 +0000, Jan Beulich wrote:
>> >>> On 20.01.12 at 13:06, Ian Campbell <ian.campbell@citrix.com> wrote:
>> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>> > ---
>> > xen/Rules.mk | 1 +
>> > xen/arch/arm/dummy.S | 2 --
>> > xen/common/grant_table.c | 6 ++++++
>> > 3 files changed, 7 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/xen/Rules.mk b/xen/Rules.mk
>> > index e25e8d4..ce88316 100644
>> > --- a/xen/Rules.mk
>> > +++ b/xen/Rules.mk
>> > @@ -52,6 +52,7 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
>> > CFLAGS-$(lock_profile) += -DLOCK_PROFILE
>> > CFLAGS-$(HAS_ACPI) += -DHAS_ACPI
>> > CFLAGS-$(HAS_TMEM) += -DHAS_TMEM
>> > +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/common/grant_table.c b/xen/common/grant_table.c
>> > index b024016..1798fcd 100644
>> > --- a/xen/common/grant_table.c
>> > +++ b/xen/common/grant_table.c
>> > @@ -434,6 +434,7 @@ static int _set_status(unsigned gt_version,
>> > return _set_status_v2(domid, readonly, mapflag, shah, act,
> status);
>> > }
>> >
>> > +#ifdef HAS_PASSTHROUGH
>> > static void mapcount(
>> > struct domain *ld, unsigned long mfn,
>> > unsigned int *wrc, unsigned int *rdc)
>> > @@ -456,6 +457,7 @@ static void mapcount(
>> > rcu_unlock_domain(rd);
>> > }
>> > }
>> > +#endif
>> >
>> > /*
>> > * Returns 0 if TLB flush / invalidate required by caller.
>> > @@ -662,6 +664,7 @@ __gnttab_map_grant_ref(
>> > goto undo_out;
>> > }
>> >
>> > +#ifdef HAS_PASSTHROUGH
>> > if ( !is_hvm_domain(ld) && need_iommu(ld) )
>>
>> Wouldn't #define-ing need_iommu() to 0 in the ARM headers achieve
>> the same effect, without cluttering common code?
>
> Yes. I'd thought there were other uses of need_iommu but in fact they
> are all in x86.
And even if there were, you'd want them to resolve to 0 too until you
have an IOMMU implementation.
Jan
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
2012-01-20 12:34 ` Jan Beulich
@ 2012-01-20 22:24 ` Dan M @ Oracle
0 siblings, 0 replies; 30+ messages in thread
From: Dan M @ Oracle @ 2012-01-20 22:24 UTC (permalink / raw)
To: Jan Beulich
Cc: xen-devel@lists.xensource.com, Tim Deegan, Ian Campbell,
Stefano Stabellini
I'm away for a few days. HVM works fine. Everything should be portable to ARM though it's never been tested afaik so may need a tweak or two. If someone wants to try it I'd be happy to help after I return
Sent from my iPhone
On Jan 20, 2012, at 2:34 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 20.01.12 at 13:25, Tim Deegan <tim@xen.org> wrote:
>> At 12:19 +0000 on 20 Jan (1327061942), Stefano Stabellini wrote:
>>> Why do we need this?
>>> I though that tmem compiled OK on ARM. Also I don't think there is any
>>> architectural limitation that would prevent tmem from working on ARM,
>>> right?
>>
>> It may compile but it surely won't work. :) Does tmem work at all for
>> non-PV guests?
>
> Supposedly yes, otherwise it wouldn't be wired up in the HVM
> hypercall tables. Dan?
>
> Jan
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 11/12] arm: define max_page
2012-02-14 14:43 [PATCH 00/12 v2] " Ian Campbell
@ 2012-02-14 14:44 ` Ian Campbell
0 siblings, 0 replies; 30+ 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] 30+ messages in thread
end of thread, other threads:[~2012-02-14 14:44 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 12:03 [PATCH 00/12] ARM: Slim down dummy.S Ian Campbell
2012-01-20 12:06 ` [PATCH 01/12] arm: add a missing local-vars comment Ian Campbell
2012-01-20 12:06 ` [PATCH 02/12] arm: define some more cp15 registers Ian Campbell
2012-01-20 12:06 ` [PATCH 03/12] arm: align some register bit definitions Ian Campbell
2012-01-20 12:06 ` [PATCH 04/12] arm: remove some unnecessary symbols from dummy.S Ian Campbell
2012-01-20 12:06 ` [PATCH 05/12] arm: Add stub functions instead of using DUMMY Ian Campbell
2012-01-20 12:06 ` [PATCH 06/12] PM: only include XEN_SYSCTL_{get_pmstat, pm_op} if HAVE_ACPI Ian Campbell
2012-01-20 12:06 ` [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM) Ian Campbell
2012-01-20 12:19 ` Stefano Stabellini
2012-01-20 12:25 ` Tim Deegan
2012-01-20 12:34 ` Jan Beulich
2012-01-20 22:24 ` Dan M @ Oracle
2012-01-20 12:28 ` Ian Campbell
2012-01-20 12:36 ` Jan Beulich
2012-01-20 12:39 ` Ian Campbell
2012-01-20 12:51 ` Jan Beulich
2012-01-20 12:06 ` [PATCH 08/12] arm: Implement arch_get_xen_caps Ian Campbell
2012-01-20 12:06 ` [PATCH 09/12] xen: only map PV guest grants via iommu if HAS_PASSTHROUGH Ian Campbell
2012-01-20 12:38 ` Jan Beulich
2012-01-20 12:40 ` Ian Campbell
2012-01-20 12:52 ` Jan Beulich
2012-01-20 12:06 ` [PATCH 10/12] arm: stub out PoD Ian Campbell
2012-01-20 12:20 ` Stefano Stabellini
2012-01-20 12:29 ` Ian Campbell
2012-01-20 12:35 ` Tim Deegan
2012-01-20 12:40 ` Ian Campbell
2012-01-20 12:06 ` [PATCH 11/12] arm: define max_page Ian Campbell
2012-01-20 12:06 ` [PATCH 12/12] arm: Group remaining dummy symbols somewhat according to functionality Ian Campbell
2012-01-20 12:20 ` [PATCH 00/12] ARM: Slim down dummy.S Stefano Stabellini
-- strict thread matches above, loose matches on Subject: below --
2012-02-14 14:43 [PATCH 00/12 v2] " Ian Campbell
2012-02-14 14:44 ` [PATCH 11/12] arm: define max_page 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).