arm: start working on ARM. Config.mk | 1 + xen/Rules.mk | 2 +- xen/common/kexec.c | 2 ++ xen/common/sysctl.c | 8 ++++++++ xen/common/tmem_xen.c | 2 +- xen/drivers/Makefile | 2 ++ xen/drivers/char/Makefile | 2 ++ xen/include/public/xen.h | 2 ++ xen/include/xen/libelf.h | 2 +- 9 files changed, 20 insertions(+), 3 deletions(-) Signed-off-by: Jaemin Ryu <jm77.ryu@samsung.com> diff -r b3de82b35189 Config.mk --- a/Config.mk Fri Feb 03 12:21:09 2012 +0900 +++ b/Config.mk Fri Feb 03 15:52:40 2012 +0900 @@ -15,6 +15,7 @@ debug ?= y XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/) XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) +XEN_TARGET_SUBARCH ?= $(XEN_TARGET_ARCH) XEN_OS ?= $(shell uname -s) CONFIG_$(XEN_OS) := y diff -r b3de82b35189 xen/Rules.mk --- a/xen/Rules.mk Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/Rules.mk Fri Feb 03 15:52:40 2012 +0900 @@ -26,9 +26,9 @@ perfc := y endif # Set ARCH/SUBARCH appropriately. -override TARGET_SUBARCH := $(XEN_TARGET_ARCH) override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ sed -e ''s/x86.*/x86/'') +override TARGET_SUBARCH := $(XEN_TARGET_SUBARCH) TARGET := $(BASEDIR)/xen diff -r b3de82b35189 xen/common/kexec.c --- a/xen/common/kexec.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/kexec.c Fri Feb 03 15:52:40 2012 +0900 @@ -211,7 +211,9 @@ static void kexec_common_shutdown(void) console_start_sync(); spin_debug_disable(); one_cpu_only(); +#if !defined(__arm__) acpi_dmar_reinstate(); +#endif } void kexec_crash(void) diff -r b3de82b35189 xen/common/sysctl.c --- a/xen/common/sysctl.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/sysctl.c Fri Feb 03 15:52:40 2012 +0900 @@ -226,6 +226,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc case XEN_SYSCTL_get_pmstat: { +#if !defined(__arm__) ret = xsm_get_pmstat(); if ( ret ) break; @@ -239,11 +240,15 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc ret = -EFAULT; break; } +#else + ret = -EINVAL; +#endif } break; case XEN_SYSCTL_pm_op: { +#if !defined(__arm__) ret = xsm_pm_op(); if ( ret ) break; @@ -257,6 +262,9 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc ret = -EFAULT; break; } +#else + ret = -EINVAL; +#endif } break; diff -r b3de82b35189 xen/common/tmem_xen.c --- a/xen/common/tmem_xen.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/tmem_xen.c Fri Feb 03 15:52:40 2012 +0900 @@ -87,7 +87,7 @@ void tmh_copy_page(char *to, char*from) #endif } -#ifdef __ia64__ +#if defined(__ia64__) || defined(__arm__) static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn, pfp_t **pcli_pfp, bool_t cli_write) { diff -r b3de82b35189 xen/drivers/Makefile --- a/xen/drivers/Makefile Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/drivers/Makefile Fri Feb 03 15:52:40 2012 +0900 @@ -1,6 +1,8 @@ subdir-y += char +ifneq ($(TARGET_ARCH),arm) subdir-y += cpufreq subdir-y += pci subdir-y += passthrough subdir-$(HAS_ACPI) += acpi subdir-$(HAS_VGA) += video +endif diff -r b3de82b35189 xen/drivers/char/Makefile --- a/xen/drivers/char/Makefile Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/drivers/char/Makefile Fri Feb 03 15:52:40 2012 +0900 @@ -1,3 +1,5 @@ obj-y += console.o +ifneq ($(TARGET_ARCH),arm) obj-y += ns16550.o +endif obj-y += serial.o diff -r b3de82b35189 xen/include/public/xen.h --- a/xen/include/public/xen.h Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/include/public/xen.h Fri Feb 03 15:52:40 2012 +0900 @@ -33,6 +33,8 @@ #include "arch-x86/xen.h" #elif defined(__ia64__) #include "arch-ia64.h" +#elif defined(__arm__) +#include "arch-arm.h" #else #error "Unsupported architecture" #endif diff -r b3de82b35189 xen/include/xen/libelf.h --- a/xen/include/xen/libelf.h Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/include/xen/libelf.h Fri Feb 03 15:52:40 2012 +0900 @@ -23,7 +23,7 @@ #ifndef __XEN_LIBELF_H__ #define __XEN_LIBELF_H__ -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__arm__) #define XEN_ELF_LITTLE_ENDIAN #else #error define architectural endianness
arm: start working on ARM. Config.mk | 1 + xen/Rules.mk | 2 +- xen/common/kexec.c | 2 ++ xen/common/sysctl.c | 8 ++++++++ xen/common/tmem_xen.c | 2 +- xen/drivers/Makefile | 2 ++ xen/drivers/char/Makefile | 2 ++ xen/include/public/xen.h | 2 ++ xen/include/xen/libelf.h | 2 +- 9 files changed, 20 insertions(+), 3 deletions(-) Signed-off-by: Jaemin Ryu diff -r b3de82b35189 Config.mk --- a/Config.mk Fri Feb 03 12:21:09 2012 +0900 +++ b/Config.mk Fri Feb 03 15:52:40 2012 +0900 @@ -15,6 +15,7 @@ debug ?= y XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/) XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) +XEN_TARGET_SUBARCH ?= $(XEN_TARGET_ARCH) XEN_OS ?= $(shell uname -s) CONFIG_$(XEN_OS) := y diff -r b3de82b35189 xen/Rules.mk --- a/xen/Rules.mk Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/Rules.mk Fri Feb 03 15:52:40 2012 +0900 @@ -26,9 +26,9 @@ perfc := y endif # Set ARCH/SUBARCH appropriately. -override TARGET_SUBARCH := $(XEN_TARGET_ARCH) override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ sed -e 's/x86.*/x86/') +override TARGET_SUBARCH := $(XEN_TARGET_SUBARCH) TARGET := $(BASEDIR)/xen diff -r b3de82b35189 xen/common/kexec.c --- a/xen/common/kexec.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/kexec.c Fri Feb 03 15:52:40 2012 +0900 @@ -211,7 +211,9 @@ static void kexec_common_shutdown(void) console_start_sync(); spin_debug_disable(); one_cpu_only(); +#if !defined(__arm__) acpi_dmar_reinstate(); +#endif } void kexec_crash(void) diff -r b3de82b35189 xen/common/sysctl.c --- a/xen/common/sysctl.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/sysctl.c Fri Feb 03 15:52:40 2012 +0900 @@ -226,6 +226,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc case XEN_SYSCTL_get_pmstat: { +#if !defined(__arm__) ret = xsm_get_pmstat(); if ( ret ) break; @@ -239,11 +240,15 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc ret = -EFAULT; break; } +#else + ret = -EINVAL; +#endif } break; case XEN_SYSCTL_pm_op: { +#if !defined(__arm__) ret = xsm_pm_op(); if ( ret ) break; @@ -257,6 +262,9 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc ret = -EFAULT; break; } +#else + ret = -EINVAL; +#endif } break; diff -r b3de82b35189 xen/common/tmem_xen.c --- a/xen/common/tmem_xen.c Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/common/tmem_xen.c Fri Feb 03 15:52:40 2012 +0900 @@ -87,7 +87,7 @@ void tmh_copy_page(char *to, char*from) #endif } -#ifdef __ia64__ +#if defined(__ia64__) || defined(__arm__) static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn, pfp_t **pcli_pfp, bool_t cli_write) { diff -r b3de82b35189 xen/drivers/Makefile --- a/xen/drivers/Makefile Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/drivers/Makefile Fri Feb 03 15:52:40 2012 +0900 @@ -1,6 +1,8 @@ subdir-y += char +ifneq ($(TARGET_ARCH),arm) subdir-y += cpufreq subdir-y += pci subdir-y += passthrough subdir-$(HAS_ACPI) += acpi subdir-$(HAS_VGA) += video +endif diff -r b3de82b35189 xen/drivers/char/Makefile --- a/xen/drivers/char/Makefile Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/drivers/char/Makefile Fri Feb 03 15:52:40 2012 +0900 @@ -1,3 +1,5 @@ obj-y += console.o +ifneq ($(TARGET_ARCH),arm) obj-y += ns16550.o +endif obj-y += serial.o diff -r b3de82b35189 xen/include/public/xen.h --- a/xen/include/public/xen.h Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/include/public/xen.h Fri Feb 03 15:52:40 2012 +0900 @@ -33,6 +33,8 @@ #include "arch-x86/xen.h" #elif defined(__ia64__) #include "arch-ia64.h" +#elif defined(__arm__) +#include "arch-arm.h" #else #error "Unsupported architecture" #endif diff -r b3de82b35189 xen/include/xen/libelf.h --- a/xen/include/xen/libelf.h Fri Feb 03 12:21:09 2012 +0900 +++ b/xen/include/xen/libelf.h Fri Feb 03 15:52:40 2012 +0900 @@ -23,7 +23,7 @@ #ifndef __XEN_LIBELF_H__ #define __XEN_LIBELF_H__ -#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__arm__) #define XEN_ELF_LITTLE_ENDIAN #else #error define architectural endianness _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com lists.xensource.com/xen-devel
Hi Jae-Min, I am glad to see the ARM PV code being submitted upstream, thanks for you hard work! It is not clear on what changeset the patches are based on, next time could you please send an introductory email with an high level description of the work, the diff stat and the changeset on which the work is based on? Otherwise it is very hard to review. See for example: marc.info/?l=xen-devel&m=132811994102227 The other piece of information that is missing is what ARM processors families and models are supported and how we could try out the code. Also, as of last week the Xen port to ARMv7 with virtualization extensions went in xen-unstable (see marc.info/?l=xen-devel&m=132759546228687): I think it would be great if you could rebase your patches on it so that we could start collaborating together toward a single Xen ARM port. It would certainly be a great benefit for the Xen community. However I do understand that there are technical differences between the two approaches and that it would be a significant amount of work for you to rebase on top of the current xen/arch/arm, so if you want to keep your port as it is, you could choose a different name for it, for example armpv, and you would be able to keep it completely separate (xen/arch/armpv). Cheers, Stefano