mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-11 11:47:02 +02:00
xen: update to 4.19.1.
Add patch to fix build with gcc14 and musl. Use xen-init-dom0 to properly initialize the default cpupool.
This commit is contained in:
parent
8f7a57de4a
commit
4488f955f2
11 changed files with 163 additions and 3224 deletions
|
@ -464,23 +464,23 @@ libKSysGuardSensorFaces.so.2 libksysguard-6.0.0_1
|
|||
libprocesscore.so.10 libksysguard-6.0.0_1
|
||||
libKSysGuardSystemStats.so.2 libksysguard-6.0.0_1
|
||||
libKSysGuardSensors.so.2 libksysguard-6.0.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
|
||||
libxenctrl.so.4.19 xen-libs-4.19.0_1
|
||||
libxenfsimage.so.4.19 xen-libs-4.19.0_1
|
||||
libxenguest.so.4.19 xen-libs-4.19.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
|
||||
libxlutil.so.4.19 xen-libs-4.19.0_1
|
||||
libxenlight.so.4.19 xen-libs-4.19.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
|
||||
libxenstore.so.4 xen-libs-4.19.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
|
||||
libxenvchan.so.4.19 xen-libs-4.19.0_1
|
||||
libfsimage.so.1.0 xen-libs-4.10.0_1
|
||||
libxenstat.so.4.14 xen-libs-4.14.0_1
|
||||
libxenstat.so.4.19 xen-libs-4.19.0_1
|
||||
libfam.so.0 gamin-0.1.10_1
|
||||
libgamin-1.so.0 gamin-0.1.10_1
|
||||
libKF5SyntaxHighlighting.so.5 syntax-highlighting-5.29.0_1
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,20 +0,0 @@
|
|||
/* Copied from Alpine Linux's aports repo: */
|
||||
/* 32 bit int types */
|
||||
#ifndef STDINT_LOCAL_H
|
||||
#define STDINT_LOCAL_H
|
||||
typedef __INT8_TYPE__ int8_t;
|
||||
typedef __INT16_TYPE__ int16_t;
|
||||
typedef __INT32_TYPE__ int32_t;
|
||||
typedef __INT64_TYPE__ int64_t;
|
||||
typedef __INTPTR_TYPE__ intptr_t;
|
||||
|
||||
/* Unsigned. */
|
||||
typedef __UINT8_TYPE__ uint8_t;
|
||||
typedef __UINT16_TYPE__ uint16_t;
|
||||
typedef __UINT32_TYPE__ uint32_t;
|
||||
typedef __UINT64_TYPE__ uint64_t;
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
|
||||
#define INTPTR_MAX 0x7fffffffffffffffL
|
||||
#define UINTPTR_MAX 0xffffffffffffffffUL
|
||||
#endif
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
exec 2>&1
|
||||
sv check xenconsoled >/dev/null || exit 1
|
||||
xenstore-write "/local/domain/0/domid" 0 || exit 1
|
||||
xenstore-write "/local/domain/0/name" "Domain-0" || exit 1
|
||||
/usr/lib/xen/bin/xen-init-dom0 || exit 1
|
||||
exec chpst -b xen pause
|
||||
|
|
40
srcpkgs/xen/patches/basename.patch
Normal file
40
srcpkgs/xen/patches/basename.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
From 2bff4b6fbecf87f91bce64ad99e94540ed9f9f51 Mon Sep 17 00:00:00 2001
|
||||
From: Blue Swirl <blauwirbel@gmail.com>
|
||||
Date: Wed, 23 Dec 2009 15:34:04 +0000
|
||||
Subject: [PATCH] Compile qemu-nbd also on OpenBSD and Solaris
|
||||
|
||||
basename() needs #include <libgen.h>.
|
||||
|
||||
No prototype for daemon() is available on Solaris, but link
|
||||
succeeds.
|
||||
|
||||
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
||||
---
|
||||
configure | 2 +-
|
||||
qemu-nbd.c | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/qemu-nbd.c b/qemu-nbd.c
|
||||
index 6cdb83473f9..91ea01414d1 100644
|
||||
--- a/tools/qemu-xen-traditional/qemu-nbd.c
|
||||
+++ b/tools/qemu-xen-traditional/qemu-nbd.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <signal.h>
|
||||
+#include <libgen.h>
|
||||
|
||||
#define SOCKET_PATH "/var/lock/qemu-nbd-%s"
|
||||
|
||||
diff -rup pci.c.orig pci.c
|
||||
--- a/tools/qemu-xen/hw/vfio/pci.c
|
||||
+++ b/tools/qemu-xen/hw/vfio/pci.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include <linux/vfio.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <libgen.h>
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "hw/pci/msi.h"
|
||||
|
|
@ -1,190 +0,0 @@
|
|||
(patch from Alpine Linux's aports repository)
|
||||
musl's stdint does not support gcc -m32 so we need to make sure that we
|
||||
don't use system's stdint.h. We ship a stdind_local.h and make sure that
|
||||
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
|
||||
+++ b/tools/firmware/hvmloader/32bitbios_support.c
|
||||
@@ -20,8 +20,8 @@
|
||||
* this program; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <inttypes.h>
|
||||
-#include <elf.h>
|
||||
+#include <stdint_local.h>
|
||||
+#include <elf_local.h>
|
||||
#ifdef __sun__
|
||||
#include <sys/machelf.h>
|
||||
#endif
|
||||
diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h
|
||||
index 844120b..8cb799f 100644
|
||||
--- a/tools/firmware/hvmloader/config.h
|
||||
+++ b/tools/firmware/hvmloader/config.h
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __HVMLOADER_CONFIG_H__
|
||||
#define __HVMLOADER_CONFIG_H__
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
|
||||
diff --git a/tools/firmware/hvmloader/hypercall.h b/tools/firmware/hvmloader/hypercall.h
|
||||
index 5368c30..c57bc86 100644
|
||||
--- a/tools/firmware/hvmloader/hypercall.h
|
||||
+++ b/tools/firmware/hvmloader/hypercall.h
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __HVMLOADER_HYPERCALL_H__
|
||||
#define __HVMLOADER_HYPERCALL_H__
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <xen/xen.h>
|
||||
#include "config.h"
|
||||
|
||||
diff --git a/tools/firmware/hvmloader/mp_tables.c b/tools/firmware/hvmloader/mp_tables.c
|
||||
index d207ecb..6dae38a 100644
|
||||
--- a/tools/firmware/hvmloader/mp_tables.c
|
||||
+++ b/tools/firmware/hvmloader/mp_tables.c
|
||||
@@ -27,7 +27,7 @@
|
||||
* this program; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include "config.h"
|
||||
|
||||
/* number of non-processor MP table entries */
|
||||
diff --git a/tools/firmware/hvmloader/option_rom.h b/tools/firmware/hvmloader/option_rom.h
|
||||
index 0fefe08..66a93bc 100644
|
||||
--- a/tools/firmware/hvmloader/option_rom.h
|
||||
+++ b/tools/firmware/hvmloader/option_rom.h
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __HVMLOADER_OPTION_ROM_H__
|
||||
#define __HVMLOADER_OPTION_ROM_H__
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
|
||||
struct option_rom_header {
|
||||
uint8_t signature[2]; /* "\x55\xaa" */
|
||||
diff --git a/tools/firmware/hvmloader/pir_types.h b/tools/firmware/hvmloader/pir_types.h
|
||||
index 9f9259c..7c004c8 100644
|
||||
--- a/tools/firmware/hvmloader/pir_types.h
|
||||
+++ b/tools/firmware/hvmloader/pir_types.h
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef PIR_TYPES_H
|
||||
#define PIR_TYPES_H
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
|
||||
#define NR_PIR_SLOTS 6
|
||||
|
||||
diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/smbios.c
|
||||
index 97a054e..e1646ee 100644
|
||||
--- a/tools/firmware/hvmloader/smbios.c
|
||||
+++ b/tools/firmware/hvmloader/smbios.c
|
||||
@@ -19,7 +19,7 @@
|
||||
* Authors: Andrew D. Ball <aball@us.ibm.com>
|
||||
*/
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <xen/xen.h>
|
||||
#include <xen/version.h>
|
||||
#include "smbios_types.h"
|
||||
diff --git a/tools/firmware/hvmloader/smbios_types.h b/tools/firmware/hvmloader/smbios_types.h
|
||||
index 7c648ec..6ea0dc8 100644
|
||||
--- a/tools/firmware/hvmloader/smbios_types.h
|
||||
+++ b/tools/firmware/hvmloader/smbios_types.h
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef SMBIOS_TYPES_H
|
||||
#define SMBIOS_TYPES_H
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
|
||||
/* SMBIOS entry point -- must be written to a 16-bit aligned address
|
||||
between 0xf0000 and 0xfffff.
|
||||
diff --git a/tools/firmware/hvmloader/util.c b/tools/firmware/hvmloader/util.c
|
||||
index 7da144b..5a96608 100644
|
||||
--- a/tools/firmware/hvmloader/util.c
|
||||
+++ b/tools/firmware/hvmloader/util.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "vnuma.h"
|
||||
#include <acpi2_0.h>
|
||||
#include <libacpi.h>
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <xen/xen.h>
|
||||
#include <xen/memory.h>
|
||||
#include <xen/sched.h>
|
||||
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
|
||||
index 31889de..4f32283 100644
|
||||
--- a/tools/firmware/hvmloader/util.h
|
||||
+++ b/tools/firmware/hvmloader/util.h
|
||||
@@ -2,7 +2,7 @@
|
||||
#define __HVMLOADER_UTIL_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <xen/xen.h>
|
||||
diff --git a/tools/firmware/rombios/32bit/pmm.c b/tools/firmware/rombios/32bit/pmm.c
|
||||
index 09fec42..133cab7 100644
|
||||
--- a/tools/firmware/rombios/32bit/pmm.c
|
||||
+++ b/tools/firmware/rombios/32bit/pmm.c
|
||||
@@ -62,7 +62,7 @@
|
||||
* }
|
||||
*/
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <stddef.h>
|
||||
#include "config.h"
|
||||
#include "e820.h"
|
||||
diff --git a/tools/firmware/rombios/32bit/util.c b/tools/firmware/rombios/32bit/util.c
|
||||
index 6c1c480..52c5878 100644
|
||||
--- a/tools/firmware/rombios/32bit/util.c
|
||||
+++ b/tools/firmware/rombios/32bit/util.c
|
||||
@@ -17,7 +17,7 @@
|
||||
* this program; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include "rombios_compat.h"
|
||||
#include "util.h"
|
||||
|
||||
diff --git a/tools/libacpi/acpi2_0.h b/tools/libacpi/acpi2_0.h
|
||||
index 2619ba3..c0498ca 100644
|
||||
--- a/tools/libacpi/acpi2_0.h
|
||||
+++ b/tools/libacpi/acpi2_0.h
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef _ACPI_2_0_H_
|
||||
#define _ACPI_2_0_H_
|
||||
|
||||
-#include <stdint.h>
|
||||
+#include <stdint_local.h>
|
||||
#include <xen/xen.h>
|
||||
#include <xen/hvm/ioreq.h>
|
||||
|
|
@ -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)))
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
|
||||
|
||||
Remove broken libs (like upstream later).
|
||||
|
||||
--- xen-4.14.1/tools/ocaml/libs/Makefile
|
||||
+++ xen-4.14.1/tools/ocaml/libs/Makefile
|
||||
@@ -3,9 +3,8 @@
|
||||
|
||||
SUBDIRS= \
|
||||
mmap \
|
||||
- xentoollog \
|
||||
xc eventchn \
|
||||
- xb xs xl
|
||||
+ xb xs
|
||||
|
||||
.PHONY: all
|
||||
all: subdirs-all
|
||||
--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
|
||||
+++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
|
||||
@@ -30,7 +30,7 @@
|
||||
| _ -> raise (Failure "undecify")
|
||||
|
||||
let unhex c =
|
||||
- let c = Char.lowercase c in
|
||||
+ let c = Char.lowercase_ascii c in
|
||||
match c with
|
||||
| '0' .. '9' -> (Char.code c) - (Char.code '0')
|
||||
| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
|
|
@ -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. */
|
98
srcpkgs/xen/patches/xsa467.patch
Normal file
98
srcpkgs/xen/patches/xsa467.patch
Normal file
|
@ -0,0 +1,98 @@
|
|||
From: Jan Beulich <jbeulich@suse.com>
|
||||
Subject: IOMMU/x86: the bus-to-bridge lock needs to be acquired IRQ-safe
|
||||
|
||||
The function's use from set_msi_source_id() is guaranteed to be in an
|
||||
IRQs-off region. While the invocation of that function could be moved
|
||||
ahead in msi_msg_to_remap_entry() (doesn't need to be in the IOMMU-
|
||||
intremap-locked region), the call tree from map_domain_pirq() holds an
|
||||
IRQ descriptor lock. Hence all use sites of the lock need become IRQ-
|
||||
safe ones.
|
||||
|
||||
In find_upstream_bridge() do a tiny bit of tidying in adjacent code:
|
||||
Change a variable's type to unsigned and merge a redundant assignment
|
||||
into another variable's initializer.
|
||||
|
||||
This is XSA-467 / CVE-2025-1713.
|
||||
|
||||
Fixes: 476bbccc811c ("VT-d: fix MSI source-id of interrupt remapping")
|
||||
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||
Reviewed-by: Juergen Gross <jgross@suse.com>
|
||||
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/pci.c
|
||||
+++ b/xen/drivers/passthrough/pci.c
|
||||
@@ -354,20 +354,21 @@ static struct pci_dev *alloc_pdev(struct
|
||||
switch ( pdev->type = pdev_type(pseg->nr, bus, devfn) )
|
||||
{
|
||||
unsigned int cap, sec_bus, sub_bus;
|
||||
+ unsigned long flags;
|
||||
|
||||
case DEV_TYPE_PCIe2PCI_BRIDGE:
|
||||
case DEV_TYPE_LEGACY_PCI_BRIDGE:
|
||||
sec_bus = pci_conf_read8(pdev->sbdf, PCI_SECONDARY_BUS);
|
||||
sub_bus = pci_conf_read8(pdev->sbdf, PCI_SUBORDINATE_BUS);
|
||||
|
||||
- spin_lock(&pseg->bus2bridge_lock);
|
||||
+ spin_lock_irqsave(&pseg->bus2bridge_lock, flags);
|
||||
for ( ; sec_bus <= sub_bus; sec_bus++ )
|
||||
{
|
||||
pseg->bus2bridge[sec_bus].map = 1;
|
||||
pseg->bus2bridge[sec_bus].bus = bus;
|
||||
pseg->bus2bridge[sec_bus].devfn = devfn;
|
||||
}
|
||||
- spin_unlock(&pseg->bus2bridge_lock);
|
||||
+ spin_unlock_irqrestore(&pseg->bus2bridge_lock, flags);
|
||||
break;
|
||||
|
||||
case DEV_TYPE_PCIe_ENDPOINT:
|
||||
@@ -437,16 +438,17 @@ static void free_pdev(struct pci_seg *ps
|
||||
switch ( pdev->type )
|
||||
{
|
||||
unsigned int sec_bus, sub_bus;
|
||||
+ unsigned long flags;
|
||||
|
||||
case DEV_TYPE_PCIe2PCI_BRIDGE:
|
||||
case DEV_TYPE_LEGACY_PCI_BRIDGE:
|
||||
sec_bus = pci_conf_read8(pdev->sbdf, PCI_SECONDARY_BUS);
|
||||
sub_bus = pci_conf_read8(pdev->sbdf, PCI_SUBORDINATE_BUS);
|
||||
|
||||
- spin_lock(&pseg->bus2bridge_lock);
|
||||
+ spin_lock_irqsave(&pseg->bus2bridge_lock, flags);
|
||||
for ( ; sec_bus <= sub_bus; sec_bus++ )
|
||||
pseg->bus2bridge[sec_bus] = pseg->bus2bridge[pdev->bus];
|
||||
- spin_unlock(&pseg->bus2bridge_lock);
|
||||
+ spin_unlock_irqrestore(&pseg->bus2bridge_lock, flags);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1053,8 +1055,9 @@ enum pdev_type pdev_type(u16 seg, u8 bus
|
||||
int find_upstream_bridge(u16 seg, u8 *bus, u8 *devfn, u8 *secbus)
|
||||
{
|
||||
struct pci_seg *pseg = get_pseg(seg);
|
||||
- int ret = 0;
|
||||
- int cnt = 0;
|
||||
+ int ret = 1;
|
||||
+ unsigned long flags;
|
||||
+ unsigned int cnt = 0;
|
||||
|
||||
if ( *bus == 0 )
|
||||
return 0;
|
||||
@@ -1065,8 +1068,7 @@ int find_upstream_bridge(u16 seg, u8 *bu
|
||||
if ( !pseg->bus2bridge[*bus].map )
|
||||
return 0;
|
||||
|
||||
- ret = 1;
|
||||
- spin_lock(&pseg->bus2bridge_lock);
|
||||
+ spin_lock_irqsave(&pseg->bus2bridge_lock, flags);
|
||||
while ( pseg->bus2bridge[*bus].map )
|
||||
{
|
||||
*secbus = *bus;
|
||||
@@ -1080,7 +1082,7 @@ int find_upstream_bridge(u16 seg, u8 *bu
|
||||
}
|
||||
|
||||
out:
|
||||
- spin_unlock(&pseg->bus2bridge_lock);
|
||||
+ spin_unlock_irqrestore(&pseg->bus2bridge_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
# Template file for 'xen'
|
||||
pkgname=xen
|
||||
version=4.14.1
|
||||
revision=13
|
||||
version=4.19.1
|
||||
revision=1
|
||||
# grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
|
||||
_git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
|
||||
_git_tag_ipxe=1d1cf74a5e58811822bee4b3da3cff7282fcdfca
|
||||
# TODO: arm / aarch64
|
||||
archs="x86_64*"
|
||||
build_style=gnu-configure
|
||||
configure_args="$(vopt_enable stubdom) --disable-systemd
|
||||
--with-system-seabios=/usr/share/seabios/bios.bin
|
||||
--with-sysconfig-leaf-dir=conf.d --with-rundir=/run"
|
||||
hostmakedepends="acpica-utils automake bin86 bison fig2dev flex gettext
|
||||
ghostscript git ocaml ocaml-findlib pandoc pkg-config tar texinfo wget
|
||||
hostmakedepends="acpica-utils automake ninja bin86 bison fig2dev flex gettext
|
||||
ghostscript git pandoc pkg-config tar texinfo wget
|
||||
python3-Markdown python3-setuptools"
|
||||
makedepends="sdl12-compat-devel dev86 dtc-devel e2fsprogs-devel gnutls-devel libaio-devel
|
||||
libbluetooth-devel libglib-devel liblzma-devel libnl3-devel openssl-devel
|
||||
|
@ -25,8 +25,8 @@ 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
|
||||
4850691d6f196eaf4d6210f2de01383251b3ea1b928141da9ce28c0b06a90938"
|
||||
checksum="cb513d5998d3887be4233a3ee1bae335a87fa430b3300e2c9afead813d4f40fa
|
||||
5bf68d88dceb359f33c32363cca1de1e4d95ddc14d1bfe7677e9b467fb8cc7b8"
|
||||
skip_extraction="${_git_tag_ipxe}.tar.gz"
|
||||
nopie=yes
|
||||
ignore_elf_dirs="/usr/share/xen/qemu /usr/share/qemu-xen/qemu"
|
||||
|
@ -45,15 +45,15 @@ build_options_default="stubdom"
|
|||
desc_option_stubdom="Build xen with stubdom"
|
||||
|
||||
if [ "$build_option_stubdom" ]; then
|
||||
_gmp_version=4.3.2
|
||||
_grub_version=0.97
|
||||
# From "stubdom/configure"
|
||||
_zlib_version=1.2.3
|
||||
_lwip_version=1.3.0
|
||||
_polarssl_version=1.1.4
|
||||
_newlib_version=1.16.0
|
||||
_libpci_version=2.2.9
|
||||
_newlib_version=1.16.0
|
||||
_lwip_version=1.3.0
|
||||
_grub_version=0.97
|
||||
_gmp_version=4.3.2
|
||||
_polarssl_version=1.1.4
|
||||
_tpmemu_version=0.7.4
|
||||
_ocaml_version=4.02.0
|
||||
distfiles+="
|
||||
http://xenbits.xen.org/xen-extfiles/gmp-${_gmp_version}.tar.bz2
|
||||
http://xenbits.xen.org/xen-extfiles/grub-${_grub_version}.tar.gz
|
||||
|
@ -62,8 +62,7 @@ if [ "$build_option_stubdom" ]; then
|
|||
http://xenbits.xen.org/xen-extfiles/polarssl-${_polarssl_version}-gpl.tgz
|
||||
http://xenbits.xen.org/xen-extfiles/newlib-${_newlib_version}.tar.gz
|
||||
http://xenbits.xen.org/xen-extfiles/pciutils-${_libpci_version}.tar.bz2
|
||||
http://xenbits.xen.org/xen-extfiles/tpm_emulator-${_tpmemu_version}.tar.gz
|
||||
http://caml.inria.fr/pub/distrib/ocaml-${_ocaml_version%.*}/ocaml-${_ocaml_version}.tar.gz"
|
||||
http://xenbits.xen.org/xen-extfiles/tpm_emulator-${_tpmemu_version}.tar.gz"
|
||||
checksum+="
|
||||
936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775
|
||||
4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b
|
||||
|
@ -72,8 +71,7 @@ if [ "$build_option_stubdom" ]; then
|
|||
2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6
|
||||
db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07
|
||||
f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24
|
||||
4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459
|
||||
dbbcbd72a29a51206677a606ea09dfec83ae25cbbf52dee90306bc04812cd034"
|
||||
4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459"
|
||||
skip_extraction+="
|
||||
gmp-${_gmp_version}.tar.bz2
|
||||
grub-${_grub_version}.tar.gz
|
||||
|
@ -82,8 +80,7 @@ if [ "$build_option_stubdom" ]; then
|
|||
polarssl-${_polarssl_version}-gpl.tgz
|
||||
newlib-${_newlib_version}.tar.gz
|
||||
pciutils-${_libpci_version}.tar.bz2
|
||||
tpm_emulator-${_tpmemu_version}.tar.gz
|
||||
ocaml-${_ocaml_version}.tar.gz"
|
||||
tpm_emulator-${_tpmemu_version}.tar.gz"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
|
@ -126,19 +123,14 @@ post_extract() {
|
|||
newlib-${_newlib_version}.tar.gz \
|
||||
pciutils-${_libpci_version}.tar.bz2 \
|
||||
tpm_emulator-${_tpmemu_version}.tar.gz \
|
||||
ocaml-${_ocaml_version}.tar.gz \
|
||||
stubdom/
|
||||
fi
|
||||
|
||||
cp -a ${FILESDIR}/*.h ${wrksrc}/tools/firmware
|
||||
cp -a ${FILESDIR}/stdint_local.h ${wrksrc}/tools/libxl/
|
||||
}
|
||||
|
||||
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 ";@&;'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue