From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001 From: Goran Vukoman Date: Fri, 10 Nov 2023 02:42:28 +0100 Subject: [PATCH] xen: update to 4.17.2 --- common/shlibs | 34 +++---- .../patches/musl-hvmloader-fix-stdint.patch | 24 ++--- srcpkgs/xen/patches/ocaml-4.12.patch | 36 ------- srcpkgs/xen/patches/xsa360-4.14.patch | 97 ------------------- srcpkgs/xen/template | 17 ++-- 5 files changed, 32 insertions(+), 176 deletions(-) delete mode 100644 srcpkgs/xen/patches/ocaml-4.12.patch delete mode 100644 srcpkgs/xen/patches/xsa360-4.14.patch diff --git a/common/shlibs b/common/shlibs index 36ddac17b0257..2b78f65dac44b 100644 --- a/common/shlibs +++ b/common/shlibs @@ -450,23 +450,23 @@ liblsofui.so.9 libksysguard-5.18.90_1 libKSysGuardSensorFaces.so.1 libksysguard-5.18.90_1 libKSysGuardFormatter.so.1 libksysguard-5.19.5_1 libKSysGuardSystemStats.so.1 libksysguard-5.22.0_1 -libxenctrl.so.4.14 xen-libs-4.14.0_1 -libxenfsimage.so.4.14 xen-libs-4.14.0_1 -libxenguest.so.4.14 xen-libs-4.14.0_1 -libxenhypfs.so.1 xen-libs-4.14.0_1 -libxlutil.so.4.14 xen-libs-4.14.0_1 -libxenlight.so.4.14 xen-libs-4.14.0_1 -libxenevtchn.so.1 xen-libs-4.10.0_1 -libxengnttab.so.1 xen-libs-4.10.0_1 -libxendevicemodel.so.1 xen-libs-4.10.0_1 -libxenforeignmemory.so.1 xen-libs-4.10.0_1 -libxentoolcore.so.1 xen-libs-4.10.0_1 -libxenstore.so.3.0 xen-libs-4.10.0_1 -libxentoollog.so.1 xen-libs-4.10.0_1 -libxencall.so.1 xen-libs-4.10.0_1 -libxenvchan.so.4.14 xen-libs-4.14.0_1 -libfsimage.so.1.0 xen-libs-4.10.0_1 -libxenstat.so.4.14 xen-libs-4.14.0_1 +libxenctrl.so.4.17 xen-libs-4.17.2_11 +libxenfsimage.so.4.17 xen-libs-4.17.2_11 +libxenguest.so.4.17 xen-libs-4.17.2_11 +libxenhypfs.so.1 xen-libs-4.17.2_11 +libxlutil.so.4.17 xen-libs-4.17.2_11 +libxenlight.so.4.17 xen-libs-4.17.2_11 +libxenevtchn.so.1 xen-libs-4.17.2_11 +libxengnttab.so.1 xen-libs-4.17.2_11 +libxendevicemodel.so.1 xen-libs-4.17.2_11 +libxenforeignmemory.so.1 xen-libs-4.17.2_11 +libxentoolcore.so.1 xen-libs-4.17.2_11 +libxenstore.so.4 xen-libs-4.17.2_11 +libxentoollog.so.1 xen-libs-4.17.2_11 +libxencall.so.1 xen-libs-4.17.2_11 +libxenvchan.so.4.17 xen-libs-4.17.2_11 +libfsimage.so.1.0 xen-libs-4.17.2_11 +libxenstat.so.4.17 xen-libs-4.17.2_11 libfam.so.0 gamin-0.1.10_1 libgamin-1.so.0 gamin-0.1.10_1 libkateprivate.so.23.08.2 libkate-23.08.2_1 diff --git a/srcpkgs/xen/patches/musl-hvmloader-fix-stdint.patch b/srcpkgs/xen/patches/musl-hvmloader-fix-stdint.patch index 0579d595768ef..9ce937e62d151 100644 --- a/srcpkgs/xen/patches/musl-hvmloader-fix-stdint.patch +++ b/srcpkgs/xen/patches/musl-hvmloader-fix-stdint.patch @@ -5,18 +5,6 @@ we use that instead https://bugs.alpinelinux.org/issues/3308 -diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk -index 26bbddc..efad58c 100644 ---- a/tools/firmware/Rules.mk -+++ b/tools/firmware/Rules.mk -@@ -12,6 +12,7 @@ CFLAGS += -DNDEBUG - endif - - CFLAGS += -Werror -+CFLAGS += -I$(XEN_ROOT)/tools/firmware - - $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) - diff --git a/tools/firmware/hvmloader/32bitbios_support.c b/tools/firmware/hvmloader/32bitbios_support.c index 1141350..0ba9d38 100644 --- a/tools/firmware/hvmloader/32bitbios_support.c @@ -25,13 +13,13 @@ index 1141350..0ba9d38 100644 * this program; If not, see . */ --#include --#include +-#include +-#include +#include +#include - #ifdef __sun__ - #include - #endif + + #include "util.h" + #include "config.h" diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h index 844120b..8cb799f 100644 --- a/tools/firmware/hvmloader/config.h @@ -184,7 +172,7 @@ index 2619ba3..c0498ca 100644 #define _ACPI_2_0_H_ -#include -+#include ++#include "stdint_local.h" #include #include diff --git a/srcpkgs/xen/patches/ocaml-4.12.patch b/srcpkgs/xen/patches/ocaml-4.12.patch deleted file mode 100644 index 32ec8657e3b58..0000000000000 --- a/srcpkgs/xen/patches/ocaml-4.12.patch +++ /dev/null @@ -1,36 +0,0 @@ -2021-04-06 - Anton Farygin 4.14.1-alt2 -- fixed build with ocaml-4.12.0 - ---- xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 -+++ xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c 2021-03-01 22:53:23.106205483 +0000 -@@ -53,8 +53,6 @@ - #include "_xtl_levels.inc" - - /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */ --#define Val_none Val_int(0) --#define Some_val(v) Field(v,0) - - static value Val_some(value v) - { ---- xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 -+++ xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c 2021-03-01 23:01:24.229859714 +0000 -@@ -227,8 +227,6 @@ - } - - /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */ --#define Val_none Val_int(0) --#define Some_val(v) Field(v,0) - - static value Val_some(value v) - { ---- xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 -+++ xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c 2021-03-01 23:24:45.477290290 +0000 -@@ -43,8 +43,6 @@ - #define _H(__h) ((xc_interface *)(__h)) - #define _D(__d) ((uint32_t)Int_val(__d)) - --#define Val_none (Val_int(0)) -- - #define string_of_option_array(array, index) \ - ((Field(array, index) == Val_none) ? NULL : String_val(Field(Field(array, index), 0))) - diff --git a/srcpkgs/xen/patches/xsa360-4.14.patch b/srcpkgs/xen/patches/xsa360-4.14.patch deleted file mode 100644 index 1bc185b110dc2..0000000000000 --- a/srcpkgs/xen/patches/xsa360-4.14.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Roger Pau Monne -Subject: x86/dpci: do not remove pirqs from domain tree on unbind - -A fix for a previous issue removed the pirqs from the domain tree when -they are unbound in order to prevent shared pirqs from triggering a -BUG_ON in __pirq_guest_unbind if they are unbound multiple times. That -caused free_domain_pirqs to no longer unmap the pirqs because they -are gone from the domain pirq tree, thus leaving stale unbound pirqs -after domain destruction if the domain had mapped dpci pirqs after -shutdown. - -Take a different approach to fix the original issue, instead of -removing the pirq from d->pirq_tree clear the flags of the dpci pirq -struct to signal that the pirq is now unbound. This prevents calling -pirq_guest_unbind multiple times for the same pirq without having to -remove it from the domain pirq tree. - -This is XSA-360. - -Fixes: 5b58dad089 ('x86/pass-through: avoid double IRQ unbind during domain cleanup') -Signed-off-by: Roger Pau Monné -Reviewed-by: Jan Beulich - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -1331,7 +1331,7 @@ void (pirq_cleanup_check)(struct pirq *p - } - - if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) -- BUG_ON(!d->is_dying); -+ BUG(); - } - - /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ ---- a/xen/drivers/passthrough/pci.c -+++ b/xen/drivers/passthrough/pci.c -@@ -862,6 +862,10 @@ static int pci_clean_dpci_irq(struct dom - { - struct dev_intx_gsi_link *digl, *tmp; - -+ if ( !pirq_dpci->flags ) -+ /* Already processed. */ -+ return 0; -+ - pirq_guest_unbind(d, dpci_pirq(pirq_dpci)); - - if ( pt_irq_need_timer(pirq_dpci->flags) ) -@@ -872,15 +876,10 @@ static int pci_clean_dpci_irq(struct dom - list_del(&digl->list); - xfree(digl); - } -+ /* Note the pirq is now unbound. */ -+ pirq_dpci->flags = 0; - -- radix_tree_delete(&d->pirq_tree, dpci_pirq(pirq_dpci)->pirq); -- -- if ( !pt_pirq_softirq_active(pirq_dpci) ) -- return 0; -- -- domain_get_irq_dpci(d)->pending_pirq_dpci = pirq_dpci; -- -- return -ERESTART; -+ return pt_pirq_softirq_active(pirq_dpci) ? -ERESTART : 0; - } - - static int pci_clean_dpci_irqs(struct domain *d) -@@ -897,18 +896,8 @@ static int pci_clean_dpci_irqs(struct do - hvm_irq_dpci = domain_get_irq_dpci(d); - if ( hvm_irq_dpci != NULL ) - { -- int ret = 0; -- -- if ( hvm_irq_dpci->pending_pirq_dpci ) -- { -- if ( pt_pirq_softirq_active(hvm_irq_dpci->pending_pirq_dpci) ) -- ret = -ERESTART; -- else -- hvm_irq_dpci->pending_pirq_dpci = NULL; -- } -+ int ret = pt_pirq_iterate(d, pci_clean_dpci_irq, NULL); - -- if ( !ret ) -- ret = pt_pirq_iterate(d, pci_clean_dpci_irq, NULL); - if ( ret ) - { - spin_unlock(&d->event_lock); ---- a/xen/include/asm-x86/hvm/irq.h -+++ b/xen/include/asm-x86/hvm/irq.h -@@ -160,8 +160,6 @@ struct hvm_irq_dpci { - DECLARE_BITMAP(isairq_map, NR_ISAIRQS); - /* Record of mapped Links */ - uint8_t link_cnt[NR_LINK]; -- /* Clean up: Entry with a softirq invocation pending / in progress. */ -- struct hvm_pirq_dpci *pending_pirq_dpci; - }; - - /* Machine IRQ to guest device/intx mapping. */ diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template index 011d1704fcd8c..cfbc0915c0eb5 100644 --- a/srcpkgs/xen/template +++ b/srcpkgs/xen/template @@ -1,7 +1,7 @@ # Template file for 'xen' pkgname=xen -version=4.14.1 -revision=10 +version=4.17.2 +revision=11 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63 # TODO: arm / aarch64 @@ -16,16 +16,16 @@ hostmakedepends="acpica-utils automake bin86 bison fig2dev flex gettext makedepends="SDL-devel dev86 dtc-devel e2fsprogs-devel gnutls-devel libaio-devel libbluetooth-devel libglib-devel liblzma-devel libnl3-devel openssl-devel netpbm pciutils-devel pixman-devel python3-devel seabios yajl-devel - ncurses-devel" + ncurses-devel ninja" depends="bridge-utils perl xen-hypervisor" short_desc="Xen hypervisor utilities" -maintainer="Orphaned " +maintainer="Goran " license="GPL-2.0-or-later" homepage="https://www.xenproject.org/" distfiles=" https://downloads.xenproject.org/release/xen/${version}/${pkgname}-${version}.tar.gz https://github.com/ipxe/ipxe/archive/${_git_tag_ipxe}.tar.gz" -checksum="cf0d7316ad674491f49b7ef0518cb1d906a2e3bfad639deef0ef2343b119ac0c +checksum="b5669b9475a10e42d286c301ee117130a3ed15b8fc818f60db07af1e7ad5c99b 4850691d6f196eaf4d6210f2de01383251b3ea1b928141da9ce28c0b06a90938" skip_extraction="${_git_tag_ipxe}.tar.gz" nopie=yes @@ -53,7 +53,7 @@ if [ "$build_option_stubdom" ]; then _newlib_version=1.16.0 _libpci_version=2.2.9 _tpmemu_version=0.7.4 - _ocaml_version=4.02.0 + _ocaml_version=4.10.2 distfiles+=" http://xenbits.xen.org/xen-extfiles/gmp-${_gmp_version}.tar.bz2 http://xenbits.xen.org/xen-extfiles/grub-${_grub_version}.tar.gz @@ -73,7 +73,7 @@ if [ "$build_option_stubdom" ]; then db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459 - dbbcbd72a29a51206677a606ea09dfec83ae25cbbf52dee90306bc04812cd034" + 23c30c2b166e6a3308994f78eabe064521fe05a9e1d5555bc4bc292cf5fb8e48" skip_extraction+=" gmp-${_gmp_version}.tar.bz2 grub-${_grub_version}.tar.gz @@ -131,7 +131,8 @@ post_extract() { fi cp -a ${FILESDIR}/*.h ${wrksrc}/tools/firmware - cp -a ${FILESDIR}/stdint_local.h ${wrksrc}/tools/libxl/ + cp -a ${FILESDIR}/stdint_local.h ${wrksrc}/tools/xl/ + cp -a ${FILESDIR}/stdint_local.h ${wrksrc}/tools/libacpi/ } post_patch() {