Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xen: update to 4.17.2
@ 2023-11-10  1:56 numerys
  2023-11-10  2:01 ` numerys
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: numerys @ 2023-11-10  1:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

There is a new pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
@ 2023-11-10  2:01 ` numerys
  2023-11-11 14:27 ` [PR PATCH] [Updated] " numerys
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-10  2:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

New comment by numerys on void-packages repository

https://github.com/void-linux/void-packages/pull/47141#issuecomment-1804960700

Comment:
I did a `xlint template` without reporting error. I'll correct the template.

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
  2023-11-10  2:01 ` numerys
@ 2023-11-11 14:27 ` numerys
  2023-11-11 14:56 ` numerys
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 14:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
  2023-11-10  2:01 ` numerys
  2023-11-11 14:27 ` [PR PATCH] [Updated] " numerys
@ 2023-11-11 14:56 ` numerys
  2023-11-11 15:00 ` [PR PATCH] [Closed]: " numerys
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: [PR PATCH] [Closed]: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (2 preceding siblings ...)
  2023-11-11 14:56 ` numerys
@ 2023-11-11 15:00 ` numerys
  2023-11-11 15:01 ` numerys
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 15:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There's a closed pull request on the void-packages repository

xen: update to 4.17.2
https://github.com/void-linux/void-packages/pull/47141

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

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

* Re: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (3 preceding siblings ...)
  2023-11-11 15:00 ` [PR PATCH] [Closed]: " numerys
@ 2023-11-11 15:01 ` numerys
  2023-11-11 15:05 ` [PR PATCH] [Updated] " numerys
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 15:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

New comment by numerys on void-packages repository

https://github.com/void-linux/void-packages/pull/47141#issuecomment-1806838360

Comment:
Fixed revison typo.

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (4 preceding siblings ...)
  2023-11-11 15:01 ` numerys
@ 2023-11-11 15:05 ` numerys
  2023-11-11 15:06 ` [PR PATCH] [Closed]: " numerys
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 15:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: [PR PATCH] [Closed]: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (5 preceding siblings ...)
  2023-11-11 15:05 ` [PR PATCH] [Updated] " numerys
@ 2023-11-11 15:06 ` numerys
  2023-11-11 15:07 ` numerys
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 15:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There's a closed pull request on the void-packages repository

xen: update to 4.17.2
https://github.com/void-linux/void-packages/pull/47141

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

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

* Re: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (6 preceding siblings ...)
  2023-11-11 15:06 ` [PR PATCH] [Closed]: " numerys
@ 2023-11-11 15:07 ` numerys
  2023-11-11 16:04 ` [PR PATCH] [Updated] " numerys
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

New comment by numerys on void-packages repository

https://github.com/void-linux/void-packages/pull/47141#issuecomment-1806839641

Comment:
Once again...

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (7 preceding siblings ...)
  2023-11-11 15:07 ` numerys
@ 2023-11-11 16:04 ` numerys
  2023-11-13 21:29 ` Piraty
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-11 16:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From cf4b47d845c9ab6f78cba7c380e03c2a7bc397fd Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (8 preceding siblings ...)
  2023-11-11 16:04 ` [PR PATCH] [Updated] " numerys
@ 2023-11-13 21:29 ` Piraty
  2023-11-15  0:31 ` [PR PATCH] [Updated] " numerys
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Piraty @ 2023-11-13 21:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/47141#issuecomment-1809158014

Comment:
1. do not close/re-open PRs
2. do not merge upsteam/master into your branch, rebase your branch instead
3. adhere to `CONTRIBUTING.md`


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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (9 preceding siblings ...)
  2023-11-13 21:29 ` Piraty
@ 2023-11-15  0:31 ` numerys
  2023-11-15  0:50 ` numerys
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-15  0:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 11881 bytes --]

From 0a1c2dfb2a6968ddcb1a7b888413bd52b5d66588 Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
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 1a721780f8545..d8583af7fbef3 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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (10 preceding siblings ...)
  2023-11-15  0:31 ` [PR PATCH] [Updated] " numerys
@ 2023-11-15  0:50 ` numerys
  2023-11-15  1:44 ` numerys
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-15  0:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 12964 bytes --]

From 0a1c2dfb2a6968ddcb1a7b888413bd52b5d66588 Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
Date: Fri, 10 Nov 2023 02:42:28 +0100
Subject: [PATCH 1/2] 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 1a721780f8545..d8583af7fbef3 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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

From 1670eb6aaab4a8ff4b94e602c7c8930546f607e1 Mon Sep 17 00:00:00 2001
From: Goran <g@numerys.net>
Date: Wed, 15 Nov 2023 09:46:04 +0100
Subject: [PATCH 2/2] xen: update to 4.17.2

---
 srcpkgs/libvirt/template | 2 +-
 srcpkgs/xen/template     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libvirt/template b/srcpkgs/libvirt/template
index 110947c2db322..5287a05a6d9be 100644
--- a/srcpkgs/libvirt/template
+++ b/srcpkgs/libvirt/template
@@ -1,7 +1,7 @@
 # Template file for 'libvirt'
 pkgname=libvirt
 version=9.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dqemu_user=libvirt -Dqemu_group=libvirt -Drunstatedir=/run
  -Dpolkit=enabled"
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index cfbc0915c0eb5..78e4e2c4da5d4 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.17.2
-revision=11
+revision=1
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (11 preceding siblings ...)
  2023-11-15  0:50 ` numerys
@ 2023-11-15  1:44 ` numerys
  2023-11-15  2:12 ` numerys
  2023-11-17  1:47 ` [PR PATCH] [Closed]: " numerys
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-15  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 12323 bytes --]

From 1e7df5a2837c6afe18fd4d24418409fbe17f6bdf Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
Date: Fri, 10 Nov 2023 02:42:28 +0100
Subject: [PATCH] xen: update to 4.17.2

---
 common/shlibs                                 | 34 +++----
 srcpkgs/libvirt/template                      |  2 +-
 .../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 ++--
 6 files changed, 33 insertions(+), 177 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 1a721780f8545..d8583af7fbef3 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/libvirt/template b/srcpkgs/libvirt/template
index 110947c2db322..5287a05a6d9be 100644
--- a/srcpkgs/libvirt/template
+++ b/srcpkgs/libvirt/template
@@ -1,7 +1,7 @@
 # Template file for 'libvirt'
 pkgname=libvirt
 version=9.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dqemu_user=libvirt -Dqemu_group=libvirt -Drunstatedir=/run
  -Dpolkit=enabled"
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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..78e4e2c4da5d4 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=1
 # 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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() {

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

* Re: [PR PATCH] [Updated] xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (12 preceding siblings ...)
  2023-11-15  1:44 ` numerys
@ 2023-11-15  2:12 ` numerys
  2023-11-17  1:47 ` [PR PATCH] [Closed]: " numerys
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-15  2:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is an updated pull request by numerys against master on the void-packages repository

https://github.com/numerys/void-packages master
https://github.com/void-linux/void-packages/pull/47141

xen: update to 4.17.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/47141.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47141.patch --]
[-- Type: text/x-diff, Size: 12658 bytes --]

From bec5c699b5cf5b70f1cd41ccb4f43dd8d8019ab8 Mon Sep 17 00:00:00 2001
From: Goran Vukoman <g@numerys.net>
Date: Fri, 10 Nov 2023 02:42:28 +0100
Subject: [PATCH] xen: update to 4.17.2

---
 common/shlibs                                 | 34 +++----
 srcpkgs/libvirt/template                      |  2 +-
 .../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                          | 18 ++--
 6 files changed, 33 insertions(+), 178 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 1a721780f8545..d8583af7fbef3 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/libvirt/template b/srcpkgs/libvirt/template
index 110947c2db322..5287a05a6d9be 100644
--- a/srcpkgs/libvirt/template
+++ b/srcpkgs/libvirt/template
@@ -1,7 +1,7 @@
 # Template file for 'libvirt'
 pkgname=libvirt
 version=9.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dqemu_user=libvirt -Dqemu_group=libvirt -Drunstatedir=/run
  -Dpolkit=enabled"
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 <http://www.gnu.org/licenses/>.
   */
  
--#include <inttypes.h>
--#include <elf.h>
+-#include <stdint.h>
+-#include <xen/libelf/elfstructs.h>
 +#include <stdint_local.h>
 +#include <elf_local.h>
- #ifdef __sun__
- #include <sys/machelf.h>
- #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 <stdint.h>
-+#include <stdint_local.h>
++#include "stdint_local.h"
  #include <xen/xen.h>
  #include <xen/hvm/ioreq.h>
  
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 <rider@altlinux.org> 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 <roger.pau@citrix.com>
-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é <roger.pau@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- 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..4b94d89e3d64c 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=1
 # 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 <orphan@voidlinux.org>"
+maintainer="Goran <g@numerys.org>"
 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,14 +131,14 @@ 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() {
 	find \( -name "Makefile*" -o -name "*.mk" -o -name "common.make" \) -exec \
 		sed -i "{}" -e "s; *-Werror *; ;g" \
 		-e "s;-Wdeclaration-after-statement;-Wno-declaration-after-statement;g" \;
-	vsed -i tools/python/setup.py -e 's;, "-Werror";;g'
 	# Silence a stream edit for dependencies
 	vsed -i Config.mk -e 's;sed ";@&;'
 }

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

* Re: [PR PATCH] [Closed]: xen: update to 4.17.2
  2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
                   ` (13 preceding siblings ...)
  2023-11-15  2:12 ` numerys
@ 2023-11-17  1:47 ` numerys
  14 siblings, 0 replies; 16+ messages in thread
From: numerys @ 2023-11-17  1:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There's a closed pull request on the void-packages repository

xen: update to 4.17.2
https://github.com/void-linux/void-packages/pull/47141

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc, x86_64-musl)

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

end of thread, other threads:[~2023-11-17  1:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10  1:56 [PR PATCH] xen: update to 4.17.2 numerys
2023-11-10  2:01 ` numerys
2023-11-11 14:27 ` [PR PATCH] [Updated] " numerys
2023-11-11 14:56 ` numerys
2023-11-11 15:00 ` [PR PATCH] [Closed]: " numerys
2023-11-11 15:01 ` numerys
2023-11-11 15:05 ` [PR PATCH] [Updated] " numerys
2023-11-11 15:06 ` [PR PATCH] [Closed]: " numerys
2023-11-11 15:07 ` numerys
2023-11-11 16:04 ` [PR PATCH] [Updated] " numerys
2023-11-13 21:29 ` Piraty
2023-11-15  0:31 ` [PR PATCH] [Updated] " numerys
2023-11-15  0:50 ` numerys
2023-11-15  1:44 ` numerys
2023-11-15  2:12 ` numerys
2023-11-17  1:47 ` [PR PATCH] [Closed]: " numerys

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