xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] boot-wrapper: arm64: Xen support
@ 2016-12-15 12:27 Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 1/5] configure: fix file detection when cross-compiling Andre Przywara
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

These patches allow to include a Xen hypervisor binary into a boot-wrapper
ELF file, so that a Foundation Platform or a Fast Model can boot a Xen
system (including a Dom0 kernel).
The original patches have been around for a while, so this series is
merely an update to apply on the latest boot-wrapper HEAD. Also I fixed
minor things here and there (like increasing Xen's load address to
accomodate for Dom0 kernels bigger than 16 MB) and addressed Julien's
review comments.

For testing this just add: "--with-xen=/path/to/src/xen/xen" to the
./configure command line and feed the resulting xen-system.axf file to
the model.

Also this release folds in a cross-compilation fix to avoid pointless
merge conflicts.

Cheers,
Andre.

Changelog v1 .. v2:
- use "xen-cmdline" instead of bootargs as parameter and variable name
- move hunk in patch 1/4 to make patch 2/4 smaller
- replace AC_FILE_CHECK macro usage to fix cross compilation

Changelog v2 .. v3:
- fix spelling typos as pointed out by Julien
- include cross-compilation fix
- add Tested-by: and Reviewed-by: tags

Andre Przywara (1):
  configure: fix file detection when cross-compiling

Christoffer Dall (3):
  Support for building in a Xen binary
  Xen: Support adding DT nodes
  Explicitly clean linux-system.axf and xen-system.axf

Ian Campbell (1):
  Xen: Select correct dom0 console

 .gitignore    |  1 +
 Makefile.am   | 35 +++++++++++++++++++++++------------
 boot_common.c |  4 ++--
 configure.ac  | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
 model.lds.S   | 14 ++++++++++++++
 5 files changed, 86 insertions(+), 20 deletions(-)

-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v3 1/5] configure: fix file detection when cross-compiling
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
@ 2016-12-15 12:27 ` Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 2/5] Support for building in a Xen binary Andre Przywara
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

The autotools documentation states that AC_CHECK_FILE cannot be used when
cross-compiling [1], because it's meant to check files in the target
system, not on the build host. When just giving --host on the configure
command line, the script detects cross compilation rather late; and as the
file test just happens to execute earlier, this works anyway.
However if one gives both --host and --build, cross compilation is
detected very early and ./configure complains:

checking for /src/linux-arm64... configure: error: cannot check for file existence when cross compiling

So replace the checkfile macro usage with a simple "test -f" call (which
is the recommended way of checking for files on the build host) and output
proper error messages.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Files
---
 configure.ac | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index ab8f5b3..e0daec4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,12 +41,25 @@ AC_ARG_WITH([dtb],
 	[KERN_DTB="$withval"])
 
 # Ensure that the user has provided us with a sane kernel dir.
-m4_define([CHECKFILES], [KERN_DIR,
-	KERN_DTB,
-	KERN_IMAGE])
+if ! test -d $KERN_DIR; then
+	AC_MSG_ERROR([Could not find Linux kernel dir $KERN_DIR.])
+fi
+
+AC_MSG_CHECKING([whether DTB file exists])
+if ! test -f $KERN_DTB; then
+	AC_MSG_RESULT([no])
+	AC_MSG_ERROR([You need to specify a valid DTB file, could not find: $KERN_DTB])
+else
+	AC_MSG_RESULT([yes])
+fi
 
-m4_foreach([checkfile], [CHECKFILES],
-	[AC_CHECK_FILE([$checkfile], [], AC_MSG_ERROR([No such file or directory: $checkfile]))])
+AC_MSG_CHECKING([whether kernel image exists])
+if ! test -f $KERN_IMAGE; then
+	AC_MSG_RESULT([no])
+	AC_MSG_ERROR([You need to compile a kernel first, could not find: $KERN_IMAGE])
+else
+	AC_MSG_RESULT([yes])
+fi
 
 AC_SUBST([KERNEL_IMAGE], [$KERN_IMAGE])
 AC_SUBST([KERNEL_DTB], [$KERN_DTB])
-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v3 2/5] Support for building in a Xen binary
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 1/5] configure: fix file detection when cross-compiling Andre Przywara
@ 2016-12-15 12:27 ` Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 3/5] Xen: Support adding DT nodes Andre Przywara
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

From: Christoffer Dall <christoffer.dall@linaro.org>

Add support for building a Xen binary which includes a Dom0 image and
the Dom0 command-line.

If the user specifies --with-xen=<Xen>, where Xen is an appropriate
AArch64 Xen binary, the build system will generate a xen-system.axf
instead of a linux-system.axf.

Original patch from Ian Campbell, but I modified most of it so all bugs
are probably mine.
[Andre: adapt to newest boot-wrapper branch, increase load address,
	fixup Xen image file test]

Cc: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
 .gitignore    |  1 +
 Makefile.am   | 10 +++++++---
 boot_common.c |  4 ++--
 configure.ac  | 17 +++++++++++++++++
 model.lds.S   | 14 ++++++++++++++
 5 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8653852..80770c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@ configure
 dtc
 fdt.dtb
 Image
+Xen
 install-sh
 Makefile
 Makefile.in
diff --git a/Makefile.am b/Makefile.am
index 692d2cc..f8b9ec9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,7 +85,6 @@ TEXT_LIMIT	:= 0x80080000
 endif
 
 LD_SCRIPT	:= model.lds.S
-IMAGE		:= linux-system.axf
 
 FS_OFFSET	:= 0x10000000
 FILESYSTEM_START:= $(shell echo $$(($(PHYS_OFFSET) + $(FS_OFFSET))))
@@ -94,6 +93,11 @@ FILESYSTEM_END	:= $(shell echo $$(($(FILESYSTEM_START) + $(FILESYSTEM_SIZE))))
 
 FDT_OFFSET	:= 0x08000000
 
+if XEN
+XEN		:= -DXEN=$(XEN_IMAGE)
+XEN_OFFSET	:= 0x08200000
+endif
+
 if INITRD
 INITRD_FLAGS	:= -DUSE_INITRD
 CHOSEN_NODE	:= chosen {						\
@@ -121,7 +125,7 @@ all: $(IMAGE)
 
 CLEANFILES = $(IMAGE) $(OFILES) model.lds fdt.dtb
 
-$(IMAGE): $(OFILES) model.lds fdt.dtb $(KERNEL_IMAGE) $(FILESYSTEM)
+$(IMAGE): $(OFILES) model.lds fdt.dtb $(KERNEL_IMAGE) $(FILESYSTEM) $(XEN_IMAGE)
 	$(LD) $(LDFLAGS) $(OFILES) -o $@ --script=model.lds
 
 %.o: %.S Makefile
@@ -131,7 +135,7 @@ $(IMAGE): $(OFILES) model.lds fdt.dtb $(KERNEL_IMAGE) $(FILESYSTEM)
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
 
 model.lds: $(LD_SCRIPT) Makefile
-	$(CPP) $(CPPFLAGS) -ansi -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DKERNEL=$(KERNEL_IMAGE) -DFILESYSTEM=$(FILESYSTEM) -DTEXT_LIMIT=$(TEXT_LIMIT) -P -C -o $@ $<
+	$(CPP) $(CPPFLAGS) -ansi -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) $(XEN) -DXEN_OFFSET=$(XEN_OFFSET) -DKERNEL=$(KERNEL_IMAGE) -DFILESYSTEM=$(FILESYSTEM) -DTEXT_LIMIT=$(TEXT_LIMIT) -P -C -o $@ $<
 
 fdt.dtb: $(KERNEL_DTB) Makefile gen-cpu-nodes.sh
 	( $(DTC) -O dts -I dtb $(KERNEL_DTB) ; echo "/ { $(CHOSEN_NODE) $(PSCI_NODE) $(CPUS_NODE) };" ) | $(DTC) -O dtb -o $@ -
diff --git a/boot_common.c b/boot_common.c
index 4947fe3..e7b8e1d 100644
--- a/boot_common.c
+++ b/boot_common.c
@@ -9,7 +9,7 @@
 #include <cpu.h>
 #include <spin.h>
 
-extern unsigned long kernel;
+extern unsigned long entrypoint;
 extern unsigned long dtb;
 
 void init_platform(void);
@@ -67,7 +67,7 @@ void __noreturn first_spin(unsigned int cpu, unsigned long *mbox,
 	if (cpu == 0) {
 		init_platform();
 
-		*mbox = (unsigned long)&kernel;
+		*mbox = (unsigned long)&entrypoint;
 		sevl();
 		spin(mbox, invalid, 1);
 	} else {
diff --git a/configure.ac b/configure.ac
index e0daec4..1d7cf3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,18 @@ AC_ARG_WITH([dtb],
 	AS_HELP_STRING([--with-dtb], [Specify a particular DTB to use]),
 	[KERN_DTB="$withval"])
 
+AC_ARG_WITH([xen],
+	AS_HELP_STRING([--with-xen], [Compile for Xen, and specify a particular Xen to use]),
+	X_IMAGE=$withval)
+
+AS_IF([test "x$X_IMAGE" == "x"], [],
+      [AS_IF([test ! -f "$X_IMAGE"],
+	     [AC_MSG_ERROR([Could not find Xen hypervisor binary: $X_IMAGE])]
+      )]
+)
+AC_SUBST([XEN_IMAGE], [$X_IMAGE])
+AM_CONDITIONAL([XEN], [test "x$X_IMAGE" != "x"])
+
 # Ensure that the user has provided us with a sane kernel dir.
 if ! test -d $KERN_DIR; then
 	AC_MSG_ERROR([Could not find Linux kernel dir $KERN_DIR.])
@@ -63,6 +75,10 @@ fi
 
 AC_SUBST([KERNEL_IMAGE], [$KERN_IMAGE])
 AC_SUBST([KERNEL_DTB], [$KERN_DTB])
+AS_IF([test "x$X_IMAGE" != "x"],
+      [AC_SUBST([IMAGE], ["xen-system.axf"])],
+      [AC_SUBST([IMAGE], ["linux-system.axf"])]
+)
 
 # Allow a user to pass --enable-psci
 AC_ARG_ENABLE([psci],
@@ -132,4 +148,5 @@ echo "  CPU IDs:                           ${CPU_IDS}"
 echo "  Use GICv3?                         ${USE_GICV3}"
 echo "  Boot-wrapper execution state:      AArch${BOOTWRAPPER_ES}"
 echo "  Kernel execution state:            AArch${KERNEL_ES}"
+echo "  Xen image                          ${XEN_IMAGE:-NONE}"
 echo ""
diff --git a/model.lds.S b/model.lds.S
index 51c5684..511f552 100644
--- a/model.lds.S
+++ b/model.lds.S
@@ -16,6 +16,9 @@ OUTPUT_ARCH(aarch64)
 #endif
 TARGET(binary)
 
+#ifdef XEN
+INPUT(XEN)
+#endif
 INPUT(KERNEL)
 INPUT(./fdt.dtb)
 
@@ -36,6 +39,17 @@ SECTIONS
 		KERNEL
 	}
 
+#ifdef XEN
+	.xen (PHYS_OFFSET + XEN_OFFSET): {
+		xen = .;
+		XEN
+	}
+
+	entrypoint = xen;
+#else
+	entrypoint = kernel;
+#endif
+
 	.dtb (PHYS_OFFSET + FDT_OFFSET): {
 		dtb = .;
 		./fdt.dtb
-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v3 3/5] Xen: Support adding DT nodes
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 1/5] configure: fix file detection when cross-compiling Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 2/5] Support for building in a Xen binary Andre Przywara
@ 2016-12-15 12:27 ` Andre Przywara
  2016-12-15 12:27 ` [PATCH v3 4/5] Xen: Select correct dom0 console Andre Przywara
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

From: Christoffer Dall <christoffer.dall@linaro.org>

Support adding xen,xen-bootargs node via --with-xen-cmdline to the
configure script and automatically add the Dom0 node to the DT as well.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
 Makefile.am  | 23 +++++++++++++++--------
 configure.ac |  9 +++++++++
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f8b9ec9..db97f9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -96,21 +96,28 @@ FDT_OFFSET	:= 0x08000000
 if XEN
 XEN		:= -DXEN=$(XEN_IMAGE)
 XEN_OFFSET	:= 0x08200000
+KERNEL_SIZE	:= $(shell stat -Lc %s $(KERNEL_IMAGE) 2>/dev/null || echo 0)
+DOM0_OFFSET	:= $(shell echo $$(($(PHYS_OFFSET) + $(KERNEL_OFFSET))))
+XEN_BOOTARGS	:= xen,xen-bootargs = \"$(XEN_CMDLINE)\";		\
+		   \#address-cells = <2>;				\
+		   \#size-cells = <2>;					\
+		   module@1 {						\
+			compatible = \"xen,linux-zimage\", \"xen,multiboot-module\"; \
+			reg = <0x0 $(DOM0_OFFSET) 0x0 $(KERNEL_SIZE)>;	\
+		   };
 endif
 
 if INITRD
 INITRD_FLAGS	:= -DUSE_INITRD
+INITRD_CHOSEN   := linux,initrd-start = <$(FILESYSTEM_START)>;	\
+		   linux,initrd-end = <$(FILESYSTEM_END)>;
+endif
+
 CHOSEN_NODE	:= chosen {						\
 			bootargs = \"$(CMDLINE)\";			\
-			linux,initrd-start = <$(FILESYSTEM_START)>;	\
-			linux,initrd-end = <$(FILESYSTEM_END)>;		\
-		   };
-else
-INITRD_FLAGS	:=
-CHOSEN_NODE	:= chosen {						\
-			bootargs = \"$(CMDLINE)\";			\
+			$(INITRD_CHOSEN)				\
+			$(XEN_BOOTARGS)					\
 		   };
-endif
 
 CPPFLAGS	+= $(INITRD_FLAGS)
 CFLAGS		+= -Iinclude/ -I$(ARCH_SRC)/include/
diff --git a/configure.ac b/configure.ac
index 1d7cf3d..ea02dca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,12 @@ AC_ARG_WITH([cmdline],
 	[C_CMDLINE=$withval])
 AC_SUBST([CMDLINE], [$C_CMDLINE])
 
+X_CMDLINE="console=dtuart dtuart=serial0 no-bootscrub"
+AC_ARG_WITH([xen-cmdline],
+	AS_HELP_STRING([--with-xen-cmdline], [set Xen command line]),
+	[X_CMDLINE=$withval])
+AC_SUBST([XEN_CMDLINE], [$X_CMDLINE])
+
 # Allow a user to pass --enable-gicv3
 AC_ARG_ENABLE([gicv3],
 	AS_HELP_STRING([--enable-gicv3], [enable GICv3 instead of GICv2]),
@@ -149,4 +155,7 @@ echo "  Use GICv3?                         ${USE_GICV3}"
 echo "  Boot-wrapper execution state:      AArch${BOOTWRAPPER_ES}"
 echo "  Kernel execution state:            AArch${KERNEL_ES}"
 echo "  Xen image                          ${XEN_IMAGE:-NONE}"
+if test "x${XEN_IMAGE}" != "x"; then
+echo "  Xen command line:                  ${XEN_CMDLINE}"
+fi
 echo ""
-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v3 4/5] Xen: Select correct dom0 console
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
                   ` (2 preceding siblings ...)
  2016-12-15 12:27 ` [PATCH v3 3/5] Xen: Support adding DT nodes Andre Przywara
@ 2016-12-15 12:27 ` Andre Przywara
  2017-01-03 17:29   ` Mark Rutland
       [not found]   ` <20170103172859.GC14183@leverpostej>
  2016-12-15 12:27 ` [PATCH v3 5/5] Explicitly clean linux-system.axf and xen-system.axf Andre Przywara
  2017-01-03 17:32 ` [PATCH v3 0/5] boot-wrapper: arm64: Xen support Mark Rutland
  5 siblings, 2 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

From: Ian Campbell <ian.campbell@citrix.com>

If Xen is enabled, tell Dom0 to use the 'hvc0' console, and fall back to
the usual ttyAMA0 otherwise.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ea02dca..d23cced 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,7 +105,8 @@ AC_ARG_WITH([initrd],
 AC_SUBST([FILESYSTEM], [$USE_INITRD])
 AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
 
-C_CMDLINE="console=ttyAMA0 earlyprintk=pl011,0x1c090000"
+AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
+C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
 AC_ARG_WITH([cmdline],
 	AS_HELP_STRING([--with-cmdline], [set a command line for the kernel]),
 	[C_CMDLINE=$withval])
-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v3 5/5] Explicitly clean linux-system.axf and xen-system.axf
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
                   ` (3 preceding siblings ...)
  2016-12-15 12:27 ` [PATCH v3 4/5] Xen: Select correct dom0 console Andre Przywara
@ 2016-12-15 12:27 ` Andre Przywara
  2017-01-03 17:32 ` [PATCH v3 0/5] boot-wrapper: arm64: Xen support Mark Rutland
  5 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2016-12-15 12:27 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

From: Christoffer Dall <christoffer.dall@linaro.org>

When doing a make clean, only the output image currently configured to
build is being removed.  However, one would expect all build artifacts
to be removed when doing a 'make clean' and when switching between Xen
and Linux builds, it is easy to accidentally run an older build than
intended.  Simply hardcode the axf image file names.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index db97f9c..506a1d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -130,7 +130,7 @@ OFILES		+= $(addprefix $(ARCH_SRC),boot.o stack.o $(BOOTMETHOD) utils.o)
 
 all: $(IMAGE)
 
-CLEANFILES = $(IMAGE) $(OFILES) model.lds fdt.dtb
+CLEANFILES = $(IMAGE) linux-system.axf xen-system.axf $(OFILES) model.lds fdt.dtb
 
 $(IMAGE): $(OFILES) model.lds fdt.dtb $(KERNEL_IMAGE) $(FILESYSTEM) $(XEN_IMAGE)
 	$(LD) $(LDFLAGS) $(OFILES) -o $@ --script=model.lds
-- 
2.9.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH v3 4/5] Xen: Select correct dom0 console
  2016-12-15 12:27 ` [PATCH v3 4/5] Xen: Select correct dom0 console Andre Przywara
@ 2017-01-03 17:29   ` Mark Rutland
       [not found]   ` <20170103172859.GC14183@leverpostej>
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Rutland @ 2017-01-03 17:29 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

On Thu, Dec 15, 2016 at 12:27:17PM +0000, Andre Przywara wrote:
> From: Ian Campbell <ian.campbell@citrix.com>
> 
> If Xen is enabled, tell Dom0 to use the 'hvc0' console, and fall back to
> the usual ttyAMA0 otherwise.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> Reviewed-by: Julien Grall <julien.grall@arm.com>
> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
>  configure.ac | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index ea02dca..d23cced 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -105,7 +105,8 @@ AC_ARG_WITH([initrd],
>  AC_SUBST([FILESYSTEM], [$USE_INITRD])
>  AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
>  
> -C_CMDLINE="console=ttyAMA0 earlyprintk=pl011,0x1c090000"
> +AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
> +C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"

Just to check: what happesns if Dom0 tries to write to 0x1c090000?

Shouldn't we override/delete earlyprintk/earlycon here too?

I've applied this as-is, so if we do need to, I'll need a fixup patch.

Thanks,
Mark.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH v3 0/5] boot-wrapper: arm64: Xen support
  2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
                   ` (4 preceding siblings ...)
  2016-12-15 12:27 ` [PATCH v3 5/5] Explicitly clean linux-system.axf and xen-system.axf Andre Przywara
@ 2017-01-03 17:32 ` Mark Rutland
  5 siblings, 0 replies; 9+ messages in thread
From: Mark Rutland @ 2017-01-03 17:32 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Stefano Stabellini, Catalin Marinas, Julien Grall,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

On Thu, Dec 15, 2016 at 12:27:13PM +0000, Andre Przywara wrote:
> These patches allow to include a Xen hypervisor binary into a boot-wrapper
> ELF file, so that a Foundation Platform or a Fast Model can boot a Xen
> system (including a Dom0 kernel).

Thanks!

I've applied the series and pushed it out to git.kernel.org.

I made minor tweaks to patches 1 and 3 for consistency, as noted in the
commit logs, but neither of these should have a functional impact.

Thanks,
Mark.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH v3 4/5] Xen: Select correct dom0 console
       [not found]   ` <20170103172859.GC14183@leverpostej>
@ 2017-01-16 12:43     ` Julien Grall
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Grall @ 2017-01-16 12:43 UTC (permalink / raw)
  To: Mark Rutland, Andre Przywara
  Cc: Stefano Stabellini, Konrad Rzeszutek Wilk, Catalin Marinas,
	linux-arm-kernel, Ian Campbell, xen-devel, Christoffer Dall

Hi Mark,

On 03/01/17 17:29, Mark Rutland wrote:
> On Thu, Dec 15, 2016 at 12:27:17PM +0000, Andre Przywara wrote:
>> From: Ian Campbell <ian.campbell@citrix.com>
>>
>> If Xen is enabled, tell Dom0 to use the 'hvc0' console, and fall back to
>> the usual ttyAMA0 otherwise.
>>
>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> Reviewed-by: Julien Grall <julien.grall@arm.com>
>> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> ---
>>  configure.ac | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index ea02dca..d23cced 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -105,7 +105,8 @@ AC_ARG_WITH([initrd],
>>  AC_SUBST([FILESYSTEM], [$USE_INITRD])
>>  AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
>>
>> -C_CMDLINE="console=ttyAMA0 earlyprintk=pl011,0x1c090000"
>> +AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
>> +C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
>
> Just to check: what happesns if Dom0 tries to write to 0x1c090000?

Xen is emulating a simple UART (only write is supported) replacing the 
real UART for DOM0. So character will be printed on the console when the 
domain is writing to 0x1c090000.

>
> Shouldn't we override/delete earlyprintk/earlycon here too?

The ideal would be to use xen console for the earlyprintk/earlycon, but 
it seems that it has not been wired for ARM.

So for now, I would keep the earlyprintk options to help developer 
debugging early crash.

> I've applied this as-is, so if we do need to, I'll need a fixup patch.

Thank you for pushing the series.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-01-16 12:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 12:27 [PATCH v3 0/5] boot-wrapper: arm64: Xen support Andre Przywara
2016-12-15 12:27 ` [PATCH v3 1/5] configure: fix file detection when cross-compiling Andre Przywara
2016-12-15 12:27 ` [PATCH v3 2/5] Support for building in a Xen binary Andre Przywara
2016-12-15 12:27 ` [PATCH v3 3/5] Xen: Support adding DT nodes Andre Przywara
2016-12-15 12:27 ` [PATCH v3 4/5] Xen: Select correct dom0 console Andre Przywara
2017-01-03 17:29   ` Mark Rutland
     [not found]   ` <20170103172859.GC14183@leverpostej>
2017-01-16 12:43     ` Julien Grall
2016-12-15 12:27 ` [PATCH v3 5/5] Explicitly clean linux-system.axf and xen-system.axf Andre Przywara
2017-01-03 17:32 ` [PATCH v3 0/5] boot-wrapper: arm64: Xen support Mark Rutland

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).