diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-09-25 21:32:16 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-09-25 21:32:16 +0000 |
commit | 46856f63065bd30c7f90cc524b2ff5c7d7be1132 (patch) | |
tree | ebfa1cfc94034c8b50c7f438eb7d22b606f6f541 | |
parent | 7a034244dcea55d1596193efa51c560127783d2d (diff) | |
download | meta-virtualization-46856f63065bd30c7f90cc524b2ff5c7d7be1132.tar.gz |
xen: cherry pick xen 4.19 from master
Introducing the xen-4.19 release to scarthgap -stable release.
Interested users can set their preferred version in their
configuration as this is NOT the default in scarthgap.
Any fixes must go to master before being considered here.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
4 files changed, 151 insertions, 0 deletions
diff --git a/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch new file mode 100644 index 00000000..637d6fe5 --- /dev/null +++ b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 2258853a19b2d0b1fafd901cddf69f730c38d450 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Fri, 31 May 2024 14:50:33 +0000 | ||
4 | Subject: [PATCH] arm: silence gcc14 warning (error) on irq bounds check | ||
5 | |||
6 | While we wait for upstream to update to gcc14, we add a quick | ||
7 | check to avoid gcc14 not being able to confirm that IRQ is | ||
8 | greater than 0 and hence throws a warning, which leads to an | ||
9 | error. | ||
10 | |||
11 | | In function '__irq_to_desc', | ||
12 | | inlined from 'route_irq_to_guest' at arch/arm/irq.c:467:12: | ||
13 | | arch/arm/irq.c:65:16: error: array subscript -2 is below array bounds of 'irq_desc_t[32]' {aka 'struct irq_desc[32]'} [-Werror=array-bounds=] | ||
14 | | 65 | return &this_cpu(local_irq_desc)[irq]; | ||
15 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
16 | |||
17 | Upstream-Status: Pending [the xen folks understand the code and the right fix .. I don't] | ||
18 | |||
19 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
20 | --- | ||
21 | xen/arch/arm/irq.c | 19 ++++++++++++------- | ||
22 | 1 file changed, 12 insertions(+), 7 deletions(-) | ||
23 | |||
24 | Index: git/xen/arch/arm/irq.c | ||
25 | =================================================================== | ||
26 | --- git.orig/xen/arch/arm/irq.c | ||
27 | +++ git/xen/arch/arm/irq.c | ||
28 | @@ -48,8 +48,13 @@ void irq_end_none(struct irq_desc *irq) | ||
29 | static irq_desc_t irq_desc[NR_IRQS]; | ||
30 | static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc); | ||
31 | |||
32 | + | ||
33 | struct irq_desc *__irq_to_desc(int irq) | ||
34 | { | ||
35 | + /* silence gcc14 warning */ | ||
36 | + if ( irq < 0 ) | ||
37 | + return &this_cpu(local_irq_desc)[0]; | ||
38 | + | ||
39 | if ( irq < NR_LOCAL_IRQS ) | ||
40 | return &this_cpu(local_irq_desc)[irq]; | ||
41 | |||
42 | @@ -722,16 +727,16 @@ int platform_get_irq(const struct dt_dev | ||
43 | |||
44 | int platform_get_irq_byname(const struct dt_device_node *np, const char *name) | ||
45 | { | ||
46 | - int index; | ||
47 | + int index; | ||
48 | |||
49 | - if ( unlikely(!name) ) | ||
50 | - return -EINVAL; | ||
51 | + if ( unlikely(!name) ) | ||
52 | + return -EINVAL; | ||
53 | |||
54 | - index = dt_property_match_string(np, "interrupt-names", name); | ||
55 | - if ( index < 0 ) | ||
56 | - return index; | ||
57 | + index = dt_property_match_string(np, "interrupt-names", name); | ||
58 | + if ( index < 0 ) | ||
59 | + return index; | ||
60 | |||
61 | - return platform_get_irq(np, index); | ||
62 | + return platform_get_irq(np, index); | ||
63 | } | ||
64 | |||
65 | /* | ||
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch new file mode 100644 index 00000000..bfd1acb4 --- /dev/null +++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: git/tools/pygrub/Makefile | ||
4 | =================================================================== | ||
5 | --- git.orig/tools/pygrub/Makefile | ||
6 | +++ git/tools/pygrub/Makefile | ||
7 | @@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG | ||
8 | all: build | ||
9 | .PHONY: build | ||
10 | build: | ||
11 | - $(setup.py) build | ||
12 | + $(setup.py) build $(DISTUTILS_BUILD_ARGS) | ||
13 | |||
14 | .PHONY: install | ||
15 | install: all | ||
16 | $(INSTALL_DIR) $(DESTDIR)/$(bindir) | ||
17 | $(INSTALL_DIR) $(DESTDIR)/$(LIBEXEC_BIN) | ||
18 | $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
19 | - --root="$(DESTDIR)" --force | ||
20 | + --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) | ||
21 | $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
22 | |||
23 | .PHONY: uninstall | ||
24 | Index: git/tools/python/Makefile | ||
25 | =================================================================== | ||
26 | --- git.orig/tools/python/Makefile | ||
27 | +++ git/tools/python/Makefile | ||
28 | @@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG | ||
29 | |||
30 | .PHONY: build | ||
31 | build: | ||
32 | - $(setup.py) build | ||
33 | + $(setup.py) build $(DISTUTILS_BUILD_ARGS) | ||
34 | |||
35 | .PHONY: install | ||
36 | install: | ||
37 | $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) | ||
38 | $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
39 | - --root="$(DESTDIR)" --force | ||
40 | + --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) | ||
41 | $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) | ||
42 | $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN) | ||
43 | |||
diff --git a/recipes-extended/xen/xen-tools_4.19.bb b/recipes-extended/xen/xen-tools_4.19.bb new file mode 100644 index 00000000..2d467004 --- /dev/null +++ b/recipes-extended/xen/xen-tools_4.19.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | # tag: RELEASE-4.19.0 | ||
2 | SRCREV ?= "026c9fa29716b0ff0f8b7c687908e71ba29cf239" | ||
3 | |||
4 | XEN_REL ?= "4.19" | ||
5 | XEN_BRANCH ?= "stable-4.19" | ||
6 | |||
7 | SRC_URI = " \ | ||
8 | git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ | ||
9 | file://0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch \ | ||
10 | " | ||
11 | |||
12 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" | ||
13 | |||
14 | PV = "${XEN_REL}+stable" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | DEFAULT_PREFERENCE ??= "-1" | ||
19 | |||
20 | require xen.inc | ||
21 | require xen-tools.inc | ||
diff --git a/recipes-extended/xen/xen_4.19.bb b/recipes-extended/xen/xen_4.19.bb new file mode 100644 index 00000000..6d3ecfa2 --- /dev/null +++ b/recipes-extended/xen/xen_4.19.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | # tag: RELEASE-4.19.0 | ||
2 | SRCREV ?= "026c9fa29716b0ff0f8b7c687908e71ba29cf239" | ||
3 | |||
4 | XEN_REL ?= "4.19.0" | ||
5 | XEN_BRANCH ?= "stable-4.19" | ||
6 | |||
7 | SRC_URI = " \ | ||
8 | git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ | ||
9 | file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ | ||
10 | file://0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch \ | ||
11 | " | ||
12 | |||
13 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" | ||
14 | |||
15 | PV = "${XEN_REL}+stable" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | DEFAULT_PREFERENCE ??= "-1" | ||
20 | |||
21 | require xen.inc | ||
22 | require xen-hypervisor.inc | ||