xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Minimal build for RISCV
@ 2021-05-24 14:34 Connor Davis
  2021-05-24 14:34 ` [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Connor Davis @ 2021-05-24 14:34 UTC (permalink / raw)
  To: xen-devel
  Cc: Bobby Eshleman, Alistair Francis, Connor Davis, Andrew Cooper,
	George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu, Paul Durrant, Doug Goldstein

Hi all,

This series introduces a minimal build for RISCV. It is based on Bobby's
previous work from last year[0] rebased onto current Xen.

This series provides the patches necessary to get a minimal build
working. The build is "minimal" in the sense that it only supports
building TARGET=head.o. The arch/riscv/head.S is just a simple while(1).

The first 2 patches are mods to non-RISCV bits that enable building a
config with:

  !CONFIG_HAS_NS16550
  !CONFIG_HAS_PASSTHROUGH

respectively. The third patch adds the make/Kconfig boilerplate
alongside head.S and asm-riscv/config.h (head.S references ENTRY
that is defined in asm-riscv/config.h).

The last adds a docker container for doing the build. To build from the
docker container (after creating it locally), you can run the following:

  $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
  $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o

[0] https://lore.kernel.org/xen-devel/cover.1579615303.git.bobbyeshleman@gmail.com/

Thanks,
Connor

--
Changes since v3:
  - Dropped "xen: Fix build when !CONFIG_GRANT_TABLE" since this was
    applied by Jan
  - Adjusted Kconfig condition for building NS16550
  - Use bool rather than bool_t
  - Removed riscv memory map, as this should probably be done later once
    the frametable size is figured out
  - Consolidated 64-bit #defines in asm-riscv/config.h
  - Renamed riscv64_defconfig to tiny64_defconfig, added CONFIG_DEBUG
    and CONFIG_DEBUG_INFO
  - Fixed logic/alignment/whitespace issues in Kconfig files
  - Use upstream archlinux riscv64 cross-compiler packages instead of
    custom built toolchain in docker container

Changes since v2:
  - Reduced number of riscv files added to ease review

Changes since v1:
  - Dropped "xen/sched: Fix build when NR_CPUS == 1" since this was
    fixed for 4.15
  - Moved #ifdef-ary around iommu_enabled to iommu.h
  - Moved struct grant_table declaration above ifdef CONFIG_GRANT_TABLE
    instead of defining an empty struct when !CONFIG_GRANT_TABLE
--
Connor Davis (4):
  xen/char: Default HAS_NS16550 to y only for X86 and ARM
  xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH
  xen: Add files needed for minimal riscv build
  automation: Add container for riscv64 builds

 automation/build/archlinux/riscv64.dockerfile | 19 ++++++++
 automation/scripts/containerize               |  1 +
 config/riscv.mk                               |  4 ++
 xen/Makefile                                  |  8 +++-
 xen/arch/riscv/Kconfig                        | 47 +++++++++++++++++++
 xen/arch/riscv/Kconfig.debug                  |  0
 xen/arch/riscv/Makefile                       |  0
 xen/arch/riscv/Rules.mk                       |  0
 xen/arch/riscv/arch.mk                        | 14 ++++++
 xen/arch/riscv/asm-offsets.c                  |  0
 xen/arch/riscv/configs/tiny64_defconfig       | 13 +++++
 xen/arch/riscv/head.S                         |  6 +++
 xen/common/memory.c                           | 10 ++++
 xen/drivers/char/Kconfig                      |  1 +
 xen/include/asm-riscv/config.h                | 47 +++++++++++++++++++
 xen/include/xen/iommu.h                       |  8 +++-
 16 files changed, 175 insertions(+), 3 deletions(-)
 create mode 100644 automation/build/archlinux/riscv64.dockerfile
 create mode 100644 config/riscv.mk
 create mode 100644 xen/arch/riscv/Kconfig
 create mode 100644 xen/arch/riscv/Kconfig.debug
 create mode 100644 xen/arch/riscv/Makefile
 create mode 100644 xen/arch/riscv/Rules.mk
 create mode 100644 xen/arch/riscv/arch.mk
 create mode 100644 xen/arch/riscv/asm-offsets.c
 create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
 create mode 100644 xen/arch/riscv/head.S
 create mode 100644 xen/include/asm-riscv/config.h


base-commit: d4fb5f166c2bfbaf9ba0de69da0d411288f437a9
-- 
2.31.1



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

* [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM
  2021-05-24 14:34 [PATCH v4 0/4] Minimal build for RISCV Connor Davis
@ 2021-05-24 14:34 ` Connor Davis
  2021-05-25  7:02   ` Jan Beulich
  2021-05-24 14:34 ` [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Connor Davis @ 2021-05-24 14:34 UTC (permalink / raw)
  To: xen-devel
  Cc: Bobby Eshleman, Alistair Francis, Connor Davis, Andrew Cooper,
	George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu, Alistair Francis

Defaulting to yes only for X86 and ARM reduces the requirements
for a minimal build when porting new architectures.

Signed-off-by: Connor Davis <connojdavis@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
---
 xen/drivers/char/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index b572305657..2ff5b288e2 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -1,5 +1,6 @@
 config HAS_NS16550
 	bool "NS16550 UART driver" if ARM
+	default n if RISCV
 	default y
 	help
 	  This selects the 16550-series UART support. For most systems, say Y.
-- 
2.31.1



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

* [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH
  2021-05-24 14:34 [PATCH v4 0/4] Minimal build for RISCV Connor Davis
  2021-05-24 14:34 ` [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
@ 2021-05-24 14:34 ` Connor Davis
  2021-05-25  8:44   ` Jan Beulich
  2021-05-24 14:34 ` [PATCH v4 3/4] xen: Add files needed for minimal riscv build Connor Davis
  2021-05-24 14:34 ` [PATCH v4 4/4] automation: Add container for riscv64 builds Connor Davis
  3 siblings, 1 reply; 20+ messages in thread
From: Connor Davis @ 2021-05-24 14:34 UTC (permalink / raw)
  To: xen-devel
  Cc: Bobby Eshleman, Alistair Francis, Connor Davis, Andrew Cooper,
	George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu, Paul Durrant

The variables iommu_enabled and iommu_dont_flush_iotlb are defined in
drivers/passthrough/iommu.c and are referenced in common code, which
causes the link to fail when !CONFIG_HAS_PASSTHROUGH.

Guard references to these variables in common code so that xen
builds when !CONFIG_HAS_PASSTHROUGH.

Signed-off-by: Connor Davis <connojdavis@gmail.com>
---
 xen/common/memory.c     | 10 ++++++++++
 xen/include/xen/iommu.h |  8 +++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index b5c70c4b85..72a6b70cb5 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -294,7 +294,9 @@ int guest_remove_page(struct domain *d, unsigned long gmfn)
     p2m_type_t p2mt;
 #endif
     mfn_t mfn;
+#ifdef CONFIG_HAS_PASSTHROUGH
     bool *dont_flush_p, dont_flush;
+#endif
     int rc;
 
 #ifdef CONFIG_X86
@@ -385,13 +387,17 @@ int guest_remove_page(struct domain *d, unsigned long gmfn)
      * Since we're likely to free the page below, we need to suspend
      * xenmem_add_to_physmap()'s suppressing of IOMMU TLB flushes.
      */
+#ifdef CONFIG_HAS_PASSTHROUGH
     dont_flush_p = &this_cpu(iommu_dont_flush_iotlb);
     dont_flush = *dont_flush_p;
     *dont_flush_p = false;
+#endif
 
     rc = guest_physmap_remove_page(d, _gfn(gmfn), mfn, 0);
 
+#ifdef CONFIG_HAS_PASSTHROUGH
     *dont_flush_p = dont_flush;
+#endif
 
     /*
      * With the lack of an IOMMU on some platforms, domains with DMA-capable
@@ -839,11 +845,13 @@ int xenmem_add_to_physmap(struct domain *d, struct xen_add_to_physmap *xatp,
     xatp->gpfn += start;
     xatp->size -= start;
 
+#ifdef CONFIG_HAS_PASSTHROUGH
     if ( is_iommu_enabled(d) )
     {
        this_cpu(iommu_dont_flush_iotlb) = 1;
        extra.ppage = &pages[0];
     }
+#endif
 
     while ( xatp->size > done )
     {
@@ -868,6 +876,7 @@ int xenmem_add_to_physmap(struct domain *d, struct xen_add_to_physmap *xatp,
         }
     }
 
+#ifdef CONFIG_HAS_PASSTHROUGH
     if ( is_iommu_enabled(d) )
     {
         int ret;
@@ -894,6 +903,7 @@ int xenmem_add_to_physmap(struct domain *d, struct xen_add_to_physmap *xatp,
         if ( unlikely(ret) && rc >= 0 )
             rc = ret;
     }
+#endif
 
     return rc;
 }
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 460755df29..904cdf725d 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -51,9 +51,15 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
     return dfn_x(x) == dfn_x(y);
 }
 
-extern bool_t iommu_enable, iommu_enabled;
+extern bool_t iommu_enable;
 extern bool force_iommu, iommu_quarantine, iommu_verbose;
 
+#ifdef CONFIG_HAS_PASSTHROUGH
+extern bool iommu_enabled;
+#else
+#define iommu_enabled false
+#endif
+
 #ifdef CONFIG_X86
 extern enum __packed iommu_intremap {
    /*
-- 
2.31.1



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

* [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-05-24 14:34 [PATCH v4 0/4] Minimal build for RISCV Connor Davis
  2021-05-24 14:34 ` [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
  2021-05-24 14:34 ` [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
@ 2021-05-24 14:34 ` Connor Davis
  2021-05-25  8:48   ` Jan Beulich
  2021-06-01  6:11   ` Jan Beulich
  2021-05-24 14:34 ` [PATCH v4 4/4] automation: Add container for riscv64 builds Connor Davis
  3 siblings, 2 replies; 20+ messages in thread
From: Connor Davis @ 2021-05-24 14:34 UTC (permalink / raw)
  To: xen-devel
  Cc: Bobby Eshleman, Alistair Francis, Connor Davis, Andrew Cooper,
	George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu

Add arch-specific makefiles and configs needed to build for
riscv. Also add a minimal head.S that is a simple infinite loop.
head.o can be built with

$ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
$ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o

No other TARGET is supported at the moment.

Signed-off-by: Connor Davis <connojdavis@gmail.com>
---
 config/riscv.mk                         |  4 +++
 xen/Makefile                            |  8 +++--
 xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
 xen/arch/riscv/Kconfig.debug            |  0
 xen/arch/riscv/Makefile                 |  0
 xen/arch/riscv/Rules.mk                 |  0
 xen/arch/riscv/arch.mk                  | 14 ++++++++
 xen/arch/riscv/asm-offsets.c            |  0
 xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
 xen/arch/riscv/head.S                   |  6 ++++
 xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
 11 files changed, 137 insertions(+), 2 deletions(-)
 create mode 100644 config/riscv.mk
 create mode 100644 xen/arch/riscv/Kconfig
 create mode 100644 xen/arch/riscv/Kconfig.debug
 create mode 100644 xen/arch/riscv/Makefile
 create mode 100644 xen/arch/riscv/Rules.mk
 create mode 100644 xen/arch/riscv/arch.mk
 create mode 100644 xen/arch/riscv/asm-offsets.c
 create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
 create mode 100644 xen/arch/riscv/head.S
 create mode 100644 xen/include/asm-riscv/config.h

diff --git a/config/riscv.mk b/config/riscv.mk
new file mode 100644
index 0000000000..2b2cc2e63a
--- /dev/null
+++ b/config/riscv.mk
@@ -0,0 +1,4 @@
+CONFIG_RISCV := y
+CONFIG_RISCV_$(XEN_OS) := y
+
+CONFIG_XEN_INSTALL_SUFFIX :=
diff --git a/xen/Makefile b/xen/Makefile
index 9f3be7766d..3a1ff0045b 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -26,7 +26,9 @@ MAKEFLAGS += -rR
 EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
 
 ARCH=$(XEN_TARGET_ARCH)
-SRCARCH=$(shell echo $(ARCH) | sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g')
+SRCARCH=$(shell echo $(ARCH) | \
+          sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \
+              -e s'/riscv.*/riscv/g')
 
 # Don't break if the build process wasn't called from the top level
 # we need XEN_TARGET_ARCH to generate the proper config
@@ -35,7 +37,8 @@ include $(XEN_ROOT)/Config.mk
 # Set ARCH/SUBARCH appropriately.
 export TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
 export TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | \
-                            sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g')
+                            sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \
+                                -e s'/riscv.*/riscv/g')
 
 # Allow someone to change their config file
 export KCONFIG_CONFIG ?= .config
@@ -335,6 +338,7 @@ _clean: delete-unfresh-files
 	$(MAKE) $(clean) xsm
 	$(MAKE) $(clean) crypto
 	$(MAKE) $(clean) arch/arm
+	$(MAKE) $(clean) arch/riscv
 	$(MAKE) $(clean) arch/x86
 	$(MAKE) $(clean) test
 	$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean
diff --git a/xen/arch/riscv/Kconfig b/xen/arch/riscv/Kconfig
new file mode 100644
index 0000000000..bd8381c5e0
--- /dev/null
+++ b/xen/arch/riscv/Kconfig
@@ -0,0 +1,47 @@
+config RISCV
+	def_bool y
+
+config RISCV_64
+	def_bool y
+	select 64BIT
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/riscv/configs/tiny64_defconfig"
+
+menu "Architecture Features"
+
+source "arch/Kconfig"
+
+endmenu
+
+menu "ISA Selection"
+
+choice
+	prompt "Base ISA"
+	default RISCV_ISA_RV64IMA if RISCV_64
+	help
+	  This selects the base ISA extensions that Xen will target.
+
+config RISCV_ISA_RV64IMA
+	bool "RV64IMA"
+	help
+	  Use the RV64I base ISA, plus the "M" and "A" extensions
+	  for integer multiply/divide and atomic instructions, respectively.
+
+endchoice
+
+config RISCV_ISA_C
+	bool "Compressed extension"
+	help
+	  Add "C" to the ISA subsets that the toolchain is allowed to
+	  emit when building Xen, which results in compressed instructions
+	  in the Xen binary.
+
+	  If unsure, say N.
+
+endmenu
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"
diff --git a/xen/arch/riscv/Kconfig.debug b/xen/arch/riscv/Kconfig.debug
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/xen/arch/riscv/Rules.mk b/xen/arch/riscv/Rules.mk
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk
new file mode 100644
index 0000000000..53dadb8975
--- /dev/null
+++ b/xen/arch/riscv/arch.mk
@@ -0,0 +1,14 @@
+########################################
+# RISCV-specific definitions
+
+CFLAGS-$(CONFIG_RISCV_64) += -mabi=lp64
+
+riscv-march-$(CONFIG_RISCV_ISA_RV64IMA) := rv64ima
+riscv-march-$(CONFIG_RISCV_ISA_C)       := $(riscv-march-y)c
+
+# Note that -mcmodel=medany is used so that Xen can be mapped
+# into the upper half _or_ the lower half of the address space.
+# -mcmodel=medlow would force Xen into the lower half.
+
+CFLAGS += -march=$(riscv-march-y) -mstrict-align -mcmodel=medany
+CFLAGS += -I$(BASEDIR)/include
diff --git a/xen/arch/riscv/asm-offsets.c b/xen/arch/riscv/asm-offsets.c
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/xen/arch/riscv/configs/tiny64_defconfig b/xen/arch/riscv/configs/tiny64_defconfig
new file mode 100644
index 0000000000..3c9a2ff941
--- /dev/null
+++ b/xen/arch/riscv/configs/tiny64_defconfig
@@ -0,0 +1,13 @@
+# CONFIG_SCHED_CREDIT is not set
+# CONFIG_SCHED_RTDS is not set
+# CONFIG_SCHED_NULL is not set
+# CONFIG_SCHED_ARINC653 is not set
+# CONFIG_TRACEBUFFER is not set
+# CONFIG_HYPFS is not set
+# CONFIG_GRANT_TABLE is not set
+# CONFIG_SPECULATIVE_HARDEN_ARRAY is not set
+
+CONFIG_RISCV_64=y
+CONFIG_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_EXPERT=y
diff --git a/xen/arch/riscv/head.S b/xen/arch/riscv/head.S
new file mode 100644
index 0000000000..0dbc27ba75
--- /dev/null
+++ b/xen/arch/riscv/head.S
@@ -0,0 +1,6 @@
+#include <asm/config.h>
+
+        .text
+
+ENTRY(start)
+        j  start
diff --git a/xen/include/asm-riscv/config.h b/xen/include/asm-riscv/config.h
new file mode 100644
index 0000000000..e2ae21de61
--- /dev/null
+++ b/xen/include/asm-riscv/config.h
@@ -0,0 +1,47 @@
+#ifndef __RISCV_CONFIG_H__
+#define __RISCV_CONFIG_H__
+
+#if defined(CONFIG_RISCV_64)
+# define LONG_BYTEORDER 3
+# define ELFSIZE 64
+# define MAX_VIRT_CPUS 128u
+#else
+# error "Unsupported RISCV variant"
+#endif
+
+#define BYTES_PER_LONG (1 << LONG_BYTEORDER)
+#define BITS_PER_LONG  (BYTES_PER_LONG << 3)
+#define POINTER_ALIGN  BYTES_PER_LONG
+
+#define BITS_PER_LLONG 64
+
+/* xen_ulong_t is always 64 bits */
+#define BITS_PER_XEN_ULONG 64
+
+#define CONFIG_RISCV_L1_CACHE_SHIFT 6
+#define CONFIG_PAGEALLOC_MAX_ORDER  18
+#define CONFIG_DOMU_MAX_ORDER       9
+#define CONFIG_HWDOM_MAX_ORDER      10
+
+#define OPT_CONSOLE_STR "dtuart"
+#define INVALID_VCPU_ID MAX_VIRT_CPUS
+
+/* Linkage for RISCV */
+#ifdef __ASSEMBLY__
+#define ALIGN .align 2
+
+#define ENTRY(name)                                \
+  .globl name;                                     \
+  ALIGN;                                           \
+  name:
+#endif
+
+#endif /* __RISCV_CONFIG_H__ */
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.31.1



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

* [PATCH v4 4/4] automation: Add container for riscv64 builds
  2021-05-24 14:34 [PATCH v4 0/4] Minimal build for RISCV Connor Davis
                   ` (2 preceding siblings ...)
  2021-05-24 14:34 ` [PATCH v4 3/4] xen: Add files needed for minimal riscv build Connor Davis
@ 2021-05-24 14:34 ` Connor Davis
  2021-05-25  9:24   ` Andrew Cooper
  3 siblings, 1 reply; 20+ messages in thread
From: Connor Davis @ 2021-05-24 14:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Bobby Eshleman, Alistair Francis, Connor Davis, Doug Goldstein

Add a container for cross-compiling xen to riscv64.
This just includes the cross-compiler and necessary packages for
building xen itself (packages for tools, stubdoms, etc., can be
added later).

Signed-off-by: Connor Davis <connojdavis@gmail.com>
---
 automation/build/archlinux/riscv64.dockerfile | 19 +++++++++++++++++++
 automation/scripts/containerize               |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 automation/build/archlinux/riscv64.dockerfile

diff --git a/automation/build/archlinux/riscv64.dockerfile b/automation/build/archlinux/riscv64.dockerfile
new file mode 100644
index 0000000000..ff8b2b955d
--- /dev/null
+++ b/automation/build/archlinux/riscv64.dockerfile
@@ -0,0 +1,19 @@
+FROM archlinux
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+# Packages needed for the build
+RUN pacman --noconfirm --needed -Syu \
+    base-devel \
+    git \
+    inetutils \
+    riscv64-linux-gnu-binutils \
+    riscv64-linux-gnu-gcc \
+    riscv64-linux-gnu-glibc
+
+# Add compiler path
+ENV CROSS_COMPILE=riscv64-linux-gnu-
+
+RUN useradd --create-home user
+USER user
+WORKDIR /build
diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index b7c81559fb..59edf0ba40 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -26,6 +26,7 @@ BASE="registry.gitlab.com/xen-project/xen"
 case "_${CONTAINER}" in
     _alpine) CONTAINER="${BASE}/alpine:3.12" ;;
     _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;;
+    _riscv64) CONTAINER="${BASE}/archlinux:riscv64" ;;
     _centos7) CONTAINER="${BASE}/centos:7" ;;
     _centos72) CONTAINER="${BASE}/centos:7.2" ;;
     _fedora) CONTAINER="${BASE}/fedora:29";;
-- 
2.31.1



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

* Re: [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM
  2021-05-24 14:34 ` [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
@ 2021-05-25  7:02   ` Jan Beulich
  2021-05-25  7:06     ` Jan Beulich
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-05-25  7:02 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Alistair Francis, xen-devel

On 24.05.2021 16:34, Connor Davis wrote:
> Defaulting to yes only for X86 and ARM reduces the requirements
> for a minimal build when porting new architectures.
> 
> Signed-off-by: Connor Davis <connojdavis@gmail.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Acked-by: Jan Beulich <jbeulich@suse.com>



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

* Re: [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM
  2021-05-25  7:02   ` Jan Beulich
@ 2021-05-25  7:06     ` Jan Beulich
  2021-05-28  7:45       ` Jan Beulich
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-05-25  7:06 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Alistair Francis, xen-devel

On 25.05.2021 09:02, Jan Beulich wrote:
> On 24.05.2021 16:34, Connor Davis wrote:
>> Defaulting to yes only for X86 and ARM reduces the requirements
>> for a minimal build when porting new architectures.
>>
>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>

Actually, just to make sure: This ...

> --- a/xen/drivers/char/Kconfig
> +++ b/xen/drivers/char/Kconfig
> @@ -1,5 +1,6 @@
>  config HAS_NS16550
>  	bool "NS16550 UART driver" if ARM
> +	default n if RISCV

... won't trigger a kconfig warning prior to the RISCV symbol getting
introduced, will it? (I was about to commit the change when I started
wondering.)

Jan


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

* Re: [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH
  2021-05-24 14:34 ` [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
@ 2021-05-25  8:44   ` Jan Beulich
  2021-05-28  7:41     ` Jan Beulich
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-05-25  8:44 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Paul Durrant, xen-devel

On 24.05.2021 16:34, Connor Davis wrote:
> The variables iommu_enabled and iommu_dont_flush_iotlb are defined in
> drivers/passthrough/iommu.c and are referenced in common code, which
> causes the link to fail when !CONFIG_HAS_PASSTHROUGH.
> 
> Guard references to these variables in common code so that xen
> builds when !CONFIG_HAS_PASSTHROUGH.
> 
> Signed-off-by: Connor Davis <connojdavis@gmail.com>

Somewhat hesitantly
Acked-by: Jan Beulich <jbeulich@suse.com>
with ...

> --- a/xen/include/xen/iommu.h
> +++ b/xen/include/xen/iommu.h
> @@ -51,9 +51,15 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
>      return dfn_x(x) == dfn_x(y);
>  }
>  
> -extern bool_t iommu_enable, iommu_enabled;
> +extern bool_t iommu_enable;

... just "bool" used here, as I think I did say before. Can be taken
care of while committing, I think.

Jan


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-05-24 14:34 ` [PATCH v4 3/4] xen: Add files needed for minimal riscv build Connor Davis
@ 2021-05-25  8:48   ` Jan Beulich
  2021-05-25 18:13     ` Bob Eshleman
  2021-06-01  6:11   ` Jan Beulich
  1 sibling, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-05-25  8:48 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	xen-devel

On 24.05.2021 16:34, Connor Davis wrote:
> Add arch-specific makefiles and configs needed to build for
> riscv. Also add a minimal head.S that is a simple infinite loop.
> head.o can be built with
> 
> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
> 
> No other TARGET is supported at the moment.
> 
> Signed-off-by: Connor Davis <connojdavis@gmail.com>
> ---
>  config/riscv.mk                         |  4 +++
>  xen/Makefile                            |  8 +++--
>  xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
>  xen/arch/riscv/Kconfig.debug            |  0
>  xen/arch/riscv/Makefile                 |  0
>  xen/arch/riscv/Rules.mk                 |  0
>  xen/arch/riscv/arch.mk                  | 14 ++++++++
>  xen/arch/riscv/asm-offsets.c            |  0
>  xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>  xen/arch/riscv/head.S                   |  6 ++++
>  xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
>  11 files changed, 137 insertions(+), 2 deletions(-)
>  create mode 100644 config/riscv.mk
>  create mode 100644 xen/arch/riscv/Kconfig
>  create mode 100644 xen/arch/riscv/Kconfig.debug
>  create mode 100644 xen/arch/riscv/Makefile
>  create mode 100644 xen/arch/riscv/Rules.mk
>  create mode 100644 xen/arch/riscv/arch.mk
>  create mode 100644 xen/arch/riscv/asm-offsets.c
>  create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>  create mode 100644 xen/arch/riscv/head.S
>  create mode 100644 xen/include/asm-riscv/config.h

I think this wants to be accompanied by an addition to ./MAINTAINERS
right away, such that future RISC-V patches can be acked by the
respective designated maintainers, rather than falling under "THE REST".
Question is whether you / we have settled yet who's to become arch
maintainer there.

Jan


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

* Re: [PATCH v4 4/4] automation: Add container for riscv64 builds
  2021-05-24 14:34 ` [PATCH v4 4/4] automation: Add container for riscv64 builds Connor Davis
@ 2021-05-25  9:24   ` Andrew Cooper
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Cooper @ 2021-05-25  9:24 UTC (permalink / raw)
  To: Connor Davis, xen-devel; +Cc: Bobby Eshleman, Alistair Francis, Doug Goldstein

On 24/05/2021 15:34, Connor Davis wrote:
> Add a container for cross-compiling xen to riscv64.
> This just includes the cross-compiler and necessary packages for
> building xen itself (packages for tools, stubdoms, etc., can be
> added later).
>
> Signed-off-by: Connor Davis <connojdavis@gmail.com>

I've deployed this version of the container, which (surprisingly, not)
is rather smaller than the one with the locally built gcc toolchain.

Therefore, Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> and I'll
commit this right away to make xen.git match reality.

~Andrew


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-05-25  8:48   ` Jan Beulich
@ 2021-05-25 18:13     ` Bob Eshleman
  2021-06-01  2:26       ` Connor Davis
  0 siblings, 1 reply; 20+ messages in thread
From: Bob Eshleman @ 2021-05-25 18:13 UTC (permalink / raw)
  To: Jan Beulich, Connor Davis
  Cc: Alistair Francis, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, xen-devel

On 5/25/21 1:48 AM, Jan Beulich wrote:
> On 24.05.2021 16:34, Connor Davis wrote:
>> Add arch-specific makefiles and configs needed to build for
>> riscv. Also add a minimal head.S that is a simple infinite loop.
>> head.o can be built with
>>
>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>
>> No other TARGET is supported at the moment.
>>
>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>> ---
>>  config/riscv.mk                         |  4 +++
>>  xen/Makefile                            |  8 +++--
>>  xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
>>  xen/arch/riscv/Kconfig.debug            |  0
>>  xen/arch/riscv/Makefile                 |  0
>>  xen/arch/riscv/Rules.mk                 |  0
>>  xen/arch/riscv/arch.mk                  | 14 ++++++++
>>  xen/arch/riscv/asm-offsets.c            |  0
>>  xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>>  xen/arch/riscv/head.S                   |  6 ++++
>>  xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
>>  11 files changed, 137 insertions(+), 2 deletions(-)
>>  create mode 100644 config/riscv.mk
>>  create mode 100644 xen/arch/riscv/Kconfig
>>  create mode 100644 xen/arch/riscv/Kconfig.debug
>>  create mode 100644 xen/arch/riscv/Makefile
>>  create mode 100644 xen/arch/riscv/Rules.mk
>>  create mode 100644 xen/arch/riscv/arch.mk
>>  create mode 100644 xen/arch/riscv/asm-offsets.c
>>  create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>>  create mode 100644 xen/arch/riscv/head.S
>>  create mode 100644 xen/include/asm-riscv/config.h
> 
> I think this wants to be accompanied by an addition to ./MAINTAINERS
> right away, such that future RISC-V patches can be acked by the
> respective designated maintainers, rather than falling under "THE REST".
> Question is whether you / we have settled yet who's to become arch
> maintainer there.
> 
> Jan
> 

I'd like to volunteer myself for this, as I'm slated to continue
with the port indefinitely and would at least like to review
patches.  If Connor has the time, I think it makes sense for him
to be listed there too.

Until we have others (it's just us two right now), it'll be a
lot of us reviewing each other's arch-specific work (in addition to
reviewers elsewhere in the Xen project, of course).

-Bobby

-- 
Bobby Eshleman
SE at Vates SAS


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

* Re: [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH
  2021-05-25  8:44   ` Jan Beulich
@ 2021-05-28  7:41     ` Jan Beulich
  0 siblings, 0 replies; 20+ messages in thread
From: Jan Beulich @ 2021-05-28  7:41 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Paul Durrant, xen-devel

On 25.05.2021 10:44, Jan Beulich wrote:
> On 24.05.2021 16:34, Connor Davis wrote:
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -51,9 +51,15 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
>>      return dfn_x(x) == dfn_x(y);
>>  }
>>  
>> -extern bool_t iommu_enable, iommu_enabled;
>> +extern bool_t iommu_enable;
> 
> ... just "bool" used here, as I think I did say before. Can be taken
> care of while committing, I think.

Actually, while preparing to commit this, I realized this would
better be

--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -51,8 +51,12 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
     return dfn_x(x) == dfn_x(y);
 }
 
+#ifdef CONFIG_HAS_PASSTHROUGH
 extern bool_t iommu_enable, iommu_enabled;
 extern bool force_iommu, iommu_quarantine, iommu_verbose;
+#else
+#define iommu_enabled false
+#endif
 
 #ifdef CONFIG_X86
 extern enum __packed iommu_intremap {

Which is what I'm about to commit.

Jan


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

* Re: [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM
  2021-05-25  7:06     ` Jan Beulich
@ 2021-05-28  7:45       ` Jan Beulich
  0 siblings, 0 replies; 20+ messages in thread
From: Jan Beulich @ 2021-05-28  7:45 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Alistair Francis, xen-devel

On 25.05.2021 09:06, Jan Beulich wrote:
> On 25.05.2021 09:02, Jan Beulich wrote:
>> On 24.05.2021 16:34, Connor Davis wrote:
>>> Defaulting to yes only for X86 and ARM reduces the requirements
>>> for a minimal build when porting new architectures.
>>>
>>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>>> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
>>
>> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> Actually, just to make sure: This ...
> 
>> --- a/xen/drivers/char/Kconfig
>> +++ b/xen/drivers/char/Kconfig
>> @@ -1,5 +1,6 @@
>>  config HAS_NS16550
>>  	bool "NS16550 UART driver" if ARM
>> +	default n if RISCV
> 
> ... won't trigger a kconfig warning prior to the RISCV symbol getting
> introduced, will it? (I was about to commit the change when I started
> wondering.)

While, not having heard back, I've now verified this myself, I still
decided to leave committing this until the point where it can be committed
together with at least patch 3 here, so there wouldn't be a seemingly
stray reference to RISCV here.

Jan


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-05-25 18:13     ` Bob Eshleman
@ 2021-06-01  2:26       ` Connor Davis
  2021-06-01  6:03         ` Jan Beulich
  2021-06-03 23:26         ` Alistair Francis
  0 siblings, 2 replies; 20+ messages in thread
From: Connor Davis @ 2021-06-01  2:26 UTC (permalink / raw)
  To: Bob Eshleman, Jan Beulich
  Cc: Alistair Francis, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, xen-devel



On 5/25/21 12:13 PM, Bob Eshleman wrote:
> On 5/25/21 1:48 AM, Jan Beulich wrote:
>> On 24.05.2021 16:34, Connor Davis wrote:
>>> Add arch-specific makefiles and configs needed to build for
>>> riscv. Also add a minimal head.S that is a simple infinite loop.
>>> head.o can be built with
>>>
>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>>
>>> No other TARGET is supported at the moment.
>>>
>>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>>> ---
>>>   config/riscv.mk                         |  4 +++
>>>   xen/Makefile                            |  8 +++--
>>>   xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
>>>   xen/arch/riscv/Kconfig.debug            |  0
>>>   xen/arch/riscv/Makefile                 |  0
>>>   xen/arch/riscv/Rules.mk                 |  0
>>>   xen/arch/riscv/arch.mk                  | 14 ++++++++
>>>   xen/arch/riscv/asm-offsets.c            |  0
>>>   xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>>>   xen/arch/riscv/head.S                   |  6 ++++
>>>   xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
>>>   11 files changed, 137 insertions(+), 2 deletions(-)
>>>   create mode 100644 config/riscv.mk
>>>   create mode 100644 xen/arch/riscv/Kconfig
>>>   create mode 100644 xen/arch/riscv/Kconfig.debug
>>>   create mode 100644 xen/arch/riscv/Makefile
>>>   create mode 100644 xen/arch/riscv/Rules.mk
>>>   create mode 100644 xen/arch/riscv/arch.mk
>>>   create mode 100644 xen/arch/riscv/asm-offsets.c
>>>   create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>>>   create mode 100644 xen/arch/riscv/head.S
>>>   create mode 100644 xen/include/asm-riscv/config.h
>> I think this wants to be accompanied by an addition to ./MAINTAINERS
>> right away, such that future RISC-V patches can be acked by the
>> respective designated maintainers, rather than falling under "THE REST".
>> Question is whether you / we have settled yet who's to become arch
>> maintainer there.
>>
>> Jan
>>
> I'd like to volunteer myself for this, as I'm slated to continue
> with the port indefinitely and would at least like to review
> patches.  If Connor has the time, I think it makes sense for him
> to be listed there too.
>
> Until we have others (it's just us two right now), it'll be a
> lot of us reviewing each other's arch-specific work (in addition to
> reviewers elsewhere in the Xen project, of course).
>
> -Bobby
>
Jan: can you list Bobby as the maintainer on commit? You can list me as 
well,
but I can't guarantee a time commitment unlike Bobby.

Thanks,
Connor



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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-06-01  2:26       ` Connor Davis
@ 2021-06-01  6:03         ` Jan Beulich
  2021-06-01  8:40           ` Julien Grall
  2021-06-03 23:26         ` Alistair Francis
  1 sibling, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-06-01  6:03 UTC (permalink / raw)
  To: Connor Davis, Bob Eshleman
  Cc: Alistair Francis, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, xen-devel

On 01.06.2021 04:26, Connor Davis wrote:
> 
> 
> On 5/25/21 12:13 PM, Bob Eshleman wrote:
>> On 5/25/21 1:48 AM, Jan Beulich wrote:
>>> On 24.05.2021 16:34, Connor Davis wrote:
>>>> Add arch-specific makefiles and configs needed to build for
>>>> riscv. Also add a minimal head.S that is a simple infinite loop.
>>>> head.o can be built with
>>>>
>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>>>
>>>> No other TARGET is supported at the moment.
>>>>
>>>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>>>> ---
>>>>   config/riscv.mk                         |  4 +++
>>>>   xen/Makefile                            |  8 +++--
>>>>   xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
>>>>   xen/arch/riscv/Kconfig.debug            |  0
>>>>   xen/arch/riscv/Makefile                 |  0
>>>>   xen/arch/riscv/Rules.mk                 |  0
>>>>   xen/arch/riscv/arch.mk                  | 14 ++++++++
>>>>   xen/arch/riscv/asm-offsets.c            |  0
>>>>   xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>>>>   xen/arch/riscv/head.S                   |  6 ++++
>>>>   xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
>>>>   11 files changed, 137 insertions(+), 2 deletions(-)
>>>>   create mode 100644 config/riscv.mk
>>>>   create mode 100644 xen/arch/riscv/Kconfig
>>>>   create mode 100644 xen/arch/riscv/Kconfig.debug
>>>>   create mode 100644 xen/arch/riscv/Makefile
>>>>   create mode 100644 xen/arch/riscv/Rules.mk
>>>>   create mode 100644 xen/arch/riscv/arch.mk
>>>>   create mode 100644 xen/arch/riscv/asm-offsets.c
>>>>   create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>>>>   create mode 100644 xen/arch/riscv/head.S
>>>>   create mode 100644 xen/include/asm-riscv/config.h
>>> I think this wants to be accompanied by an addition to ./MAINTAINERS
>>> right away, such that future RISC-V patches can be acked by the
>>> respective designated maintainers, rather than falling under "THE REST".
>>> Question is whether you / we have settled yet who's to become arch
>>> maintainer there.
>>>
>>> Jan
>>>
>> I'd like to volunteer myself for this, as I'm slated to continue
>> with the port indefinitely and would at least like to review
>> patches.  If Connor has the time, I think it makes sense for him
>> to be listed there too.
>>
>> Until we have others (it's just us two right now), it'll be a
>> lot of us reviewing each other's arch-specific work (in addition to
>> reviewers elsewhere in the Xen project, of course).
>>
>> -Bobby
>>
> Jan: can you list Bobby as the maintainer on commit? You can list me as 
> well,
> but I can't guarantee a time commitment unlike Bobby.

Well, actually I did expect a v5 submission with whatever entry you
both deem suitable. Otoh I now realize that patch 1 had my extra
request addressed (by myself) and hence with this one needing just
that entry, I could indeed add that addition myself while committing.
Let me move the mails back to the to-be-committed folder...

Jan


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-05-24 14:34 ` [PATCH v4 3/4] xen: Add files needed for minimal riscv build Connor Davis
  2021-05-25  8:48   ` Jan Beulich
@ 2021-06-01  6:11   ` Jan Beulich
  2021-06-02  2:12     ` Connor Davis
  1 sibling, 1 reply; 20+ messages in thread
From: Jan Beulich @ 2021-06-01  6:11 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	xen-devel

On 24.05.2021 16:34, Connor Davis wrote:
> Add arch-specific makefiles and configs needed to build for
> riscv. Also add a minimal head.S that is a simple infinite loop.
> head.o can be built with
> 
> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
> 
> No other TARGET is supported at the moment.

Just to confirm - an actual (even if not functioning) xen binary can't
be linked yet? I ask because that would be the prereq for me to set up
routine (cross) build testing, just like I do for Arm.

Jan


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-06-01  6:03         ` Jan Beulich
@ 2021-06-01  8:40           ` Julien Grall
  2021-06-02  2:13             ` Connor Davis
  0 siblings, 1 reply; 20+ messages in thread
From: Julien Grall @ 2021-06-01  8:40 UTC (permalink / raw)
  To: Jan Beulich, Connor Davis, Bob Eshleman
  Cc: Alistair Francis, Andrew Cooper, George Dunlap, Ian Jackson,
	Stefano Stabellini, Wei Liu, xen-devel

Hi,

On 01/06/2021 07:03, Jan Beulich wrote:
> On 01.06.2021 04:26, Connor Davis wrote:
>>
>>
>> On 5/25/21 12:13 PM, Bob Eshleman wrote:
>>> On 5/25/21 1:48 AM, Jan Beulich wrote:
>>>> On 24.05.2021 16:34, Connor Davis wrote:
>>>>> Add arch-specific makefiles and configs needed to build for
>>>>> riscv. Also add a minimal head.S that is a simple infinite loop.
>>>>> head.o can be built with
>>>>>
>>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>>>>
>>>>> No other TARGET is supported at the moment.
>>>>>
>>>>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>>>>> ---
>>>>>    config/riscv.mk                         |  4 +++
>>>>>    xen/Makefile                            |  8 +++--
>>>>>    xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
>>>>>    xen/arch/riscv/Kconfig.debug            |  0
>>>>>    xen/arch/riscv/Makefile                 |  0
>>>>>    xen/arch/riscv/Rules.mk                 |  0
>>>>>    xen/arch/riscv/arch.mk                  | 14 ++++++++
>>>>>    xen/arch/riscv/asm-offsets.c            |  0
>>>>>    xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>>>>>    xen/arch/riscv/head.S                   |  6 ++++
>>>>>    xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
>>>>>    11 files changed, 137 insertions(+), 2 deletions(-)
>>>>>    create mode 100644 config/riscv.mk
>>>>>    create mode 100644 xen/arch/riscv/Kconfig
>>>>>    create mode 100644 xen/arch/riscv/Kconfig.debug
>>>>>    create mode 100644 xen/arch/riscv/Makefile
>>>>>    create mode 100644 xen/arch/riscv/Rules.mk
>>>>>    create mode 100644 xen/arch/riscv/arch.mk
>>>>>    create mode 100644 xen/arch/riscv/asm-offsets.c
>>>>>    create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>>>>>    create mode 100644 xen/arch/riscv/head.S
>>>>>    create mode 100644 xen/include/asm-riscv/config.h
>>>> I think this wants to be accompanied by an addition to ./MAINTAINERS
>>>> right away, such that future RISC-V patches can be acked by the
>>>> respective designated maintainers, rather than falling under "THE REST".
>>>> Question is whether you / we have settled yet who's to become arch
>>>> maintainer there.
>>>>
>>>> Jan
>>>>
>>> I'd like to volunteer myself for this, as I'm slated to continue
>>> with the port indefinitely and would at least like to review
>>> patches.  If Connor has the time, I think it makes sense for him
>>> to be listed there too.
>>>
>>> Until we have others (it's just us two right now), it'll be a
>>> lot of us reviewing each other's arch-specific work (in addition to
>>> reviewers elsewhere in the Xen project, of course).
>>>
>>> -Bobby
>>>
>> Jan: can you list Bobby as the maintainer on commit? You can list me as
>> well,
>> but I can't guarantee a time commitment unlike Bobby.
> 
> Well, actually I did expect a v5 submission with whatever entry you
> both deem suitable. Otoh I now realize that patch 1 had my extra
> request addressed (by myself) and hence with this one needing just
> that entry, I could indeed add that addition myself while committing.
> Let me move the mails back to the to-be-committed folder...

At the risk of being picky, I don't think this should be done of commit. 
Instead, a formal patch should be sent with both maintainers + one of 
the committer acking (or signed-off-by) the proposal.

Cheers,

-- 
Julien Grall


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-06-01  6:11   ` Jan Beulich
@ 2021-06-02  2:12     ` Connor Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Connor Davis @ 2021-06-02  2:12 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Bobby Eshleman, Alistair Francis, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	xen-devel



On 6/1/21 12:11 AM, Jan Beulich wrote:
> On 24.05.2021 16:34, Connor Davis wrote:
>> Add arch-specific makefiles and configs needed to build for
>> riscv. Also add a minimal head.S that is a simple infinite loop.
>> head.o can be built with
>>
>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>
>> No other TARGET is supported at the moment.
> Just to confirm - an actual (even if not functioning) xen binary can't
> be linked yet? I ask because that would be the prereq for me to set up
> routine (cross) build testing, just like I do for Arm.

That's right. The consensus was that targets and files should be added
incrementally, so I stopped at head.o for now.

Thanks,
Connor


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-06-01  8:40           ` Julien Grall
@ 2021-06-02  2:13             ` Connor Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Connor Davis @ 2021-06-02  2:13 UTC (permalink / raw)
  To: Julien Grall, Jan Beulich, Bob Eshleman
  Cc: Alistair Francis, Andrew Cooper, George Dunlap, Ian Jackson,
	Stefano Stabellini, Wei Liu, xen-devel



On 6/1/21 2:40 AM, Julien Grall wrote:
> Hi,
>
> On 01/06/2021 07:03, Jan Beulich wrote:
>> On 01.06.2021 04:26, Connor Davis wrote:
>>>
>>>
>>> On 5/25/21 12:13 PM, Bob Eshleman wrote:
>>>> On 5/25/21 1:48 AM, Jan Beulich wrote:
>>>>> On 24.05.2021 16:34, Connor Davis wrote:
>>>>>> Add arch-specific makefiles and configs needed to build for
>>>>>> riscv. Also add a minimal head.S that is a simple infinite loop.
>>>>>> head.o can be built with
>>>>>>
>>>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
>>>>>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
>>>>>>
>>>>>> No other TARGET is supported at the moment.
>>>>>>
>>>>>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
>>>>>> ---
>>>>>>    config/riscv.mk                         |  4 +++
>>>>>>    xen/Makefile                            |  8 +++--
>>>>>>    xen/arch/riscv/Kconfig                  | 47 
>>>>>> +++++++++++++++++++++++++
>>>>>>    xen/arch/riscv/Kconfig.debug            |  0
>>>>>>    xen/arch/riscv/Makefile                 |  0
>>>>>>    xen/arch/riscv/Rules.mk                 |  0
>>>>>>    xen/arch/riscv/arch.mk                  | 14 ++++++++
>>>>>>    xen/arch/riscv/asm-offsets.c            |  0
>>>>>>    xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
>>>>>>    xen/arch/riscv/head.S                   |  6 ++++
>>>>>>    xen/include/asm-riscv/config.h          | 47 
>>>>>> +++++++++++++++++++++++++
>>>>>>    11 files changed, 137 insertions(+), 2 deletions(-)
>>>>>>    create mode 100644 config/riscv.mk
>>>>>>    create mode 100644 xen/arch/riscv/Kconfig
>>>>>>    create mode 100644 xen/arch/riscv/Kconfig.debug
>>>>>>    create mode 100644 xen/arch/riscv/Makefile
>>>>>>    create mode 100644 xen/arch/riscv/Rules.mk
>>>>>>    create mode 100644 xen/arch/riscv/arch.mk
>>>>>>    create mode 100644 xen/arch/riscv/asm-offsets.c
>>>>>>    create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
>>>>>>    create mode 100644 xen/arch/riscv/head.S
>>>>>>    create mode 100644 xen/include/asm-riscv/config.h
>>>>> I think this wants to be accompanied by an addition to ./MAINTAINERS
>>>>> right away, such that future RISC-V patches can be acked by the
>>>>> respective designated maintainers, rather than falling under "THE 
>>>>> REST".
>>>>> Question is whether you / we have settled yet who's to become arch
>>>>> maintainer there.
>>>>>
>>>>> Jan
>>>>>
>>>> I'd like to volunteer myself for this, as I'm slated to continue
>>>> with the port indefinitely and would at least like to review
>>>> patches.  If Connor has the time, I think it makes sense for him
>>>> to be listed there too.
>>>>
>>>> Until we have others (it's just us two right now), it'll be a
>>>> lot of us reviewing each other's arch-specific work (in addition to
>>>> reviewers elsewhere in the Xen project, of course).
>>>>
>>>> -Bobby
>>>>
>>> Jan: can you list Bobby as the maintainer on commit? You can list me as
>>> well,
>>> but I can't guarantee a time commitment unlike Bobby.
>>
>> Well, actually I did expect a v5 submission with whatever entry you
>> both deem suitable. Otoh I now realize that patch 1 had my extra
>> request addressed (by myself) and hence with this one needing just
>> that entry, I could indeed add that addition myself while committing.
>> Let me move the mails back to the to-be-committed folder...
>
> At the risk of being picky, I don't think this should be done of 
> commit. Instead, a formal patch should be sent with both maintainers + 
> one of the committer acking (or signed-off-by) the proposal.

No problem, I will send a v5.

Thanks,
Connor


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

* Re: [PATCH v4 3/4] xen: Add files needed for minimal riscv build
  2021-06-01  2:26       ` Connor Davis
  2021-06-01  6:03         ` Jan Beulich
@ 2021-06-03 23:26         ` Alistair Francis
  1 sibling, 0 replies; 20+ messages in thread
From: Alistair Francis @ 2021-06-03 23:26 UTC (permalink / raw)
  To: Connor Davis
  Cc: Bob Eshleman, Jan Beulich, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	open list:X86

On Tue, Jun 1, 2021 at 12:26 PM Connor Davis <connojdavis@gmail.com> wrote:
>
>
>
> On 5/25/21 12:13 PM, Bob Eshleman wrote:
> > On 5/25/21 1:48 AM, Jan Beulich wrote:
> >> On 24.05.2021 16:34, Connor Davis wrote:
> >>> Add arch-specific makefiles and configs needed to build for
> >>> riscv. Also add a minimal head.S that is a simple infinite loop.
> >>> head.o can be built with
> >>>
> >>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen tiny64_defconfig
> >>> $ make XEN_TARGET_ARCH=riscv SUBSYSTEMS=xen -C xen TARGET=head.o
> >>>
> >>> No other TARGET is supported at the moment.
> >>>
> >>> Signed-off-by: Connor Davis <connojdavis@gmail.com>
> >>> ---
> >>>   config/riscv.mk                         |  4 +++
> >>>   xen/Makefile                            |  8 +++--
> >>>   xen/arch/riscv/Kconfig                  | 47 +++++++++++++++++++++++++
> >>>   xen/arch/riscv/Kconfig.debug            |  0
> >>>   xen/arch/riscv/Makefile                 |  0
> >>>   xen/arch/riscv/Rules.mk                 |  0
> >>>   xen/arch/riscv/arch.mk                  | 14 ++++++++
> >>>   xen/arch/riscv/asm-offsets.c            |  0
> >>>   xen/arch/riscv/configs/tiny64_defconfig | 13 +++++++
> >>>   xen/arch/riscv/head.S                   |  6 ++++
> >>>   xen/include/asm-riscv/config.h          | 47 +++++++++++++++++++++++++
> >>>   11 files changed, 137 insertions(+), 2 deletions(-)
> >>>   create mode 100644 config/riscv.mk
> >>>   create mode 100644 xen/arch/riscv/Kconfig
> >>>   create mode 100644 xen/arch/riscv/Kconfig.debug
> >>>   create mode 100644 xen/arch/riscv/Makefile
> >>>   create mode 100644 xen/arch/riscv/Rules.mk
> >>>   create mode 100644 xen/arch/riscv/arch.mk
> >>>   create mode 100644 xen/arch/riscv/asm-offsets.c
> >>>   create mode 100644 xen/arch/riscv/configs/tiny64_defconfig
> >>>   create mode 100644 xen/arch/riscv/head.S
> >>>   create mode 100644 xen/include/asm-riscv/config.h
> >> I think this wants to be accompanied by an addition to ./MAINTAINERS
> >> right away, such that future RISC-V patches can be acked by the
> >> respective designated maintainers, rather than falling under "THE REST".
> >> Question is whether you / we have settled yet who's to become arch
> >> maintainer there.
> >>
> >> Jan
> >>
> > I'd like to volunteer myself for this, as I'm slated to continue
> > with the port indefinitely and would at least like to review
> > patches.  If Connor has the time, I think it makes sense for him
> > to be listed there too.
> >
> > Until we have others (it's just us two right now), it'll be a
> > lot of us reviewing each other's arch-specific work (in addition to
> > reviewers elsewhere in the Xen project, of course).
> >
> > -Bobby
> >
> Jan: can you list Bobby as the maintainer on commit? You can list me as
> well,
> but I can't guarantee a time commitment unlike Bobby.

If you need more people you can add me as well. I don't have too much
time to spend here, but I did start the initial Xen port and have a
good understanding of the RISC-V Hypervisor extension.

Alistair

>
> Thanks,
> Connor
>


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

end of thread, other threads:[~2021-06-03 23:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 14:34 [PATCH v4 0/4] Minimal build for RISCV Connor Davis
2021-05-24 14:34 ` [PATCH v4 1/4] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
2021-05-25  7:02   ` Jan Beulich
2021-05-25  7:06     ` Jan Beulich
2021-05-28  7:45       ` Jan Beulich
2021-05-24 14:34 ` [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
2021-05-25  8:44   ` Jan Beulich
2021-05-28  7:41     ` Jan Beulich
2021-05-24 14:34 ` [PATCH v4 3/4] xen: Add files needed for minimal riscv build Connor Davis
2021-05-25  8:48   ` Jan Beulich
2021-05-25 18:13     ` Bob Eshleman
2021-06-01  2:26       ` Connor Davis
2021-06-01  6:03         ` Jan Beulich
2021-06-01  8:40           ` Julien Grall
2021-06-02  2:13             ` Connor Davis
2021-06-03 23:26         ` Alistair Francis
2021-06-01  6:11   ` Jan Beulich
2021-06-02  2:12     ` Connor Davis
2021-05-24 14:34 ` [PATCH v4 4/4] automation: Add container for riscv64 builds Connor Davis
2021-05-25  9:24   ` Andrew Cooper

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