Skip to contentSkip to conversation

xen: drop patch to workaround prelink on aarch64

PATCH New Christopher Clark 1 participant 3 messages Dec 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 xen: drop patch to workaround prelink on aarch64

prelink is no longer default enabled and has been recommended to be disabled since OE-core f9719cc1.

---
 ...xen-arm64-implement-atomic-fetch-add.patch | 50 -------------------
 recipes-extended/xen/xen_4.14.bb              |  1 -
 recipes-extended/xen/xen_4.15.bb              |  1 -
 recipes-extended/xen/xen_git.bb               |  1 -
 4 files changed, 53 deletions(-)
 delete mode 100644 recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch deleted +0 -50
deleted file mode 100644
index 6e957a5..0000000
@@ -1,50 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Christopher Clark <[email protected]>
-Date: Fri, 26 June 2020 16:34:00 -0800
-Subject: [PATCH] xen: implement atomic op to fix arm64 compilation
-
-Xen's ARM implementation of arch_fetch_and_add since f9cc3cd9
-uses a builtin, despite the build being performed with -fno-builtin.
-With gcc 10.1.0, this now breaks prelinking spinlock.c, so
-implement the one atomic operation that is required with logic
-derived from Linux's atomic_ll_sc.h: ATOMIC_FETCH_OP and comparison with
-the binary produced with and without the patch with gcc 9.2.0.
-
-Signed-off-by: Christopher Clark <[email protected]>
-diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h
-index e5d062667d..c46dd3ac71 100644
---- a/xen/include/asm-arm/system.h
-+++ b/xen/include/asm-arm/system.h
-@@ -55,7 +55,32 @@ static inline int local_abort_is_enabled(void)
-     return !(flags & PSR_ABT_MASK);
- }
- 
-+#ifdef CONFIG_ARM_64
-+
-+/* see atomic_ll_sc.h:  ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint) */
-+static inline int arch_fetch_and_add(unsigned int *ptr, unsigned long i)
-+{
-+    int register lptr asm("x0");
-+    int register result asm("w1");
-+    int register newval asm("w2");
-+    int register status asm("w3");
-+
-+    asm volatile(
-+    "   mov       %[lptr], %[ptr]\n"
-+    "1: ldxr      %w[result], [%[lptr]]\n"
-+    "   add       %w[newval], %w[result], %w[i]\n"
-+    "   stlxr     %w[status], %w[newval], [%[lptr]]\n"
-+    "   cbnz      %w[status], 1b\n"
-+    "   dmb       ish\n"
-+    : [result] "=&r" (result), [lptr] "=&r" (lptr), [newval] "=&r" (newval), [status] "=&r" (status), [i] "+r" (i), "+Q" (*ptr)
-+    : [ptr] "r" (ptr), "r" (i)
-+    : "memory");
-+
-+    return result;
-+}
-+#else
- #define arch_fetch_and_add(x, v) __sync_fetch_and_add(x, v)
-+#endif
- 
- extern struct vcpu *__context_switch(struct vcpu *prev, struct vcpu *next);
- 
recipes-extended/xen/xen_4.14.bb +0 -1
index 0d7d20b..267db16 100644
@@ -6,7 +6,6 @@ XEN_BRANCH ?= "stable-${XEN_REL}"
 
 SRC_URI = " \
     git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
-    file://xen-arm64-implement-atomic-fetch-add.patch \
     file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
     "
 
recipes-extended/xen/xen_4.15.bb +0 -1
index 0cfaf0c..1b87ae8 100644
@@ -6,7 +6,6 @@ XEN_BRANCH ?= "stable-${XEN_REL}"
 
 SRC_URI = " \
     git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
-    file://xen-arm64-implement-atomic-fetch-add.patch \
     file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
     "
 
recipes-extended/xen/xen_git.bb +0 -1
index 20227e0..e014733 100644
@@ -6,7 +6,6 @@ XEN_BRANCH ?= "master"
 
 SRC_URI = " \
     git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
-    file://xen-arm64-implement-atomic-fetch-add.patch \
     file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
     "
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 xen-tools: upgrade RSUGGESTS to RRECOMMENDS for ifupdown

Xen's networking for guests is typically configured using bridges and the standalone ifupdown package, which contains a more capable version of the tool than busybox, is needed to configure them, so:

Increase the recommendation strength from RSUGGESTS to RRECOMMENDS to bring the package in by default, which fixes networking for images built with packaging formats that follow RRECOMMENDS but not RSUGGESTS.

I should've paid closer attention to Corey's recommendation for this, so:

---
 recipes-extended/xen/xen-tools.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/xen/xen-tools.inc +1 -1
index d831941..ca924f4 100644
@@ -94,7 +94,7 @@ RDEPENDS:${PN}-scripts-network = "\
     ${PN}-volatiles \
     "
 
-RSUGGESTS:${PN}-scripts-network = "\
+RRECOMMENDS:${PN}-scripts-network = "\
     ifupdown \
     "
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 MAINTAINERS: add xtf and the raspberry pi dynamic layer for Xen

In reply to Christopher Clark

Add the more recent Xen-related recipes to the list.

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index 1bb9a24..4b41bad 100644
@@ -32,3 +32,5 @@ M:      Christopher Clark <[email protected]>
 F:      recipes-extended/xen/
 F:      recipes-extended/uxen/
 F:      recipes-extended/images/*xen*.bb
+F:      recipes-extended/images/xtf*.bb
+F:      dynamic-layers/raspberrypi/
Signature · 1 line
2.25.1