17 changes: 8 additions & 9 deletions 1103-Strip-build-path-directories-in-tools-xen-and-xen-ar.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
From 4c7ed3308ce0270d47c196c910e7aad0f6032d3a Mon Sep 17 00:00:00 2001
From 2a8b51484175163641d115b9a9ecf6c3db31e438 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<frederic.pierret@qubes-os.org>
Date: Sun, 8 Nov 2020 16:17:29 +0100
Subject: [PATCH 1103/1103] Strip build path directories in tools, xen and
xen/arch/x86
Subject: [PATCH] Strip build path directories in tools, xen and xen/arch/x86

Ensure to have a realpath for XEN_ROOT else it fails to substitute
properly pathes in strings sections
Expand All @@ -14,7 +13,7 @@ properly pathes in strings sections
3 files changed, 5 insertions(+)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index a5229bb5acb4..e4ec18fc7782 100644
index 18cf83f5be83..5bb089e6b238 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -176,6 +176,8 @@ endif
Expand All @@ -27,10 +26,10 @@ index a5229bb5acb4..e4ec18fc7782 100644

INSTALL_PYTHON_PROG = \
diff --git a/xen/Makefile b/xen/Makefile
index 9ac87ea9b27c..bc9656b8ab41 100644
index 02e947da95a0..c7340bedbe40 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -404,6 +404,8 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
@@ -408,6 +408,8 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
CFLAGS += -Wa,--strip-local-absolute
endif

Expand All @@ -40,10 +39,10 @@ index 9ac87ea9b27c..bc9656b8ab41 100644

$(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack)
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index f213a6b56a4d..4eec76510612 100644
index d902fb7accd9..898065e78950 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -133,6 +133,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
@@ -135,6 +135,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
mv $(TMP) $(TARGET)

CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
Expand All @@ -52,5 +51,5 @@ index f213a6b56a4d..4eec76510612 100644
$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
--
2.41.0
2.44.0

16 changes: 8 additions & 8 deletions 1200-hypercall-XENMEM_get_mfn_from_pfn.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6e4ca304008ef32ba4560cfbbffa15963af8151f Mon Sep 17 00:00:00 2001
From 6dea874a453d50cf064dd198679c26d22f84b527 Mon Sep 17 00:00:00 2001
From: Wei Ye <wei.ye@intel.com>
Date: Thu, 21 Aug 2014 03:45:38 +0800
Subject: [PATCH 1200/1202] hypercall: XENMEM_get_mfn_from_pfn
Subject: [PATCH] hypercall: XENMEM_get_mfn_from_pfn

Suppose that we should find an existing method to achieve the same
goal.
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Yu Zhang <yu.c.zhang@intel.com>
2 files changed, 87 insertions(+)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index db1817b691f8..78b1972e4170 100644
index b30453b9de11..54734371681e 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4676,6 +4676,61 @@ static int cf_check handle_iomem_range(
@@ -4693,6 +4693,61 @@ static int cf_check handle_iomem_range(
return err || s > e ? err : _handle_iomem_range(s, e, p);
}

Expand Down Expand Up @@ -79,7 +79,7 @@ index db1817b691f8..78b1972e4170 100644
long arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
{
int rc;
@@ -4886,6 +4941,15 @@ long arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
@@ -4903,6 +4958,15 @@ long arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
}
#endif

Expand All @@ -96,10 +96,10 @@ index db1817b691f8..78b1972e4170 100644
return subarch_memory_op(cmd, arg);
}
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index f8d26fb77d32..157a19fd0e7a 100644
index 5e545ae9a418..c522241e141f 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -699,6 +699,29 @@ struct xen_mem_acquire_resource {
@@ -682,6 +682,29 @@ struct xen_mem_acquire_resource {
typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);

Expand Down Expand Up @@ -130,5 +130,5 @@ index f8d26fb77d32..157a19fd0e7a 100644
* XENMEM_get_vnumainfo used by guest to get
* vNUMA topology from hypervisor.
--
2.37.3
2.44.0

16 changes: 8 additions & 8 deletions 1201-patch-gvt-hvmloader.patch.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 0cb9bf001f4f35ee8c7cd720b9668c7515cd9d6b Mon Sep 17 00:00:00 2001
From 8cb3e7fdb79dd869edbe7f294e91e781808241d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Wed, 16 Nov 2022 02:38:06 +0100
Subject: [PATCH 1201/1202] patch-gvt-hvmloader.patch
Subject: [PATCH] patch-gvt-hvmloader.patch

This patches based on Intel XenGT preview, XCP-NG Project.
---
Expand All @@ -14,7 +14,7 @@ This patches based on Intel XenGT preview, XCP-NG Project.
create mode 100644 tools/firmware/hvmloader/vgt.h

diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h
index c82adf6dc508..d6166b202a67 100644
index cd716bf39245..c9184366641b 100644
--- a/tools/firmware/hvmloader/config.h
+++ b/tools/firmware/hvmloader/config.h
@@ -4,7 +4,7 @@
Expand All @@ -27,7 +27,7 @@ index c82adf6dc508..d6166b202a67 100644

extern unsigned long igd_opregion_pgbase;
diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c
index 257a6feb6148..89b8ed3413a1 100644
index c3c61ca060a6..fe5ad75e9eb4 100644
--- a/tools/firmware/hvmloader/pci.c
+++ b/tools/firmware/hvmloader/pci.c
@@ -23,6 +23,7 @@
Expand All @@ -38,15 +38,15 @@ index 257a6feb6148..89b8ed3413a1 100644

#include <xen/memory.h>
#include <xen/hvm/ioreq.h>
@@ -84,6 +85,7 @@ void pci_setup(void)
@@ -91,6 +92,7 @@ void pci_setup(void)
uint16_t class, vendor_id, device_id;
unsigned int bar, pin, link, isa_irq;
uint8_t pci_devfn_decode_type[256] = {};
+ uint8_t intel_gpu_present = 0;

/* Resources assignable to PCI devices via BARs. */
struct resource {
@@ -163,6 +165,9 @@ void pci_setup(void)
@@ -170,6 +172,9 @@ void pci_setup(void)
ASSERT((devfn != PCI_ISA_DEVFN) ||
((vendor_id == 0x8086) && (device_id == 0x7000)));

Expand All @@ -56,7 +56,7 @@ index 257a6feb6148..89b8ed3413a1 100644
switch ( class )
{
case 0x0300:
@@ -536,6 +541,36 @@ void pci_setup(void)
@@ -548,6 +553,36 @@ void pci_setup(void)

if ( vga_devfn != 256 )
{
Expand Down Expand Up @@ -136,5 +136,5 @@ index 000000000000..f5b3f3475392
+
+#endif /* _VGT_DEVTABLE_H */
--
2.37.3
2.44.0

23 changes: 11 additions & 12 deletions 1202-libxl-Add-partially-Intel-GVT-g-support-xengt-device.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From 17cb4762597c08be62feb9dbcb5dcfbcba072ad2 Mon Sep 17 00:00:00 2001
From 1b0acc68addd4fe6c2e9928e65904b1110d9ea47 Mon Sep 17 00:00:00 2001
From: Ivan Kardykov <kardykov@tabit.pro>
Date: Wed, 16 Nov 2022 02:40:06 +0100
Subject: [PATCH 1202/1202] libxl: Add partially Intel GVT-g support (xengt
device)
Subject: [PATCH] libxl: Add partially Intel GVT-g support (xengt device)

This requires to add minimal support Intel GVT-g mediated passtrough
to Qubes OS. This patches based on Intel XenGT preview, XCP-NG
Expand All @@ -15,7 +14,7 @@ Project.
4 files changed, 68 insertions(+)

diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index 72c45cd67f07..57398cefd5a6 100644
index d89515b8693e..a3a1e99ace44 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -26,6 +26,36 @@
Expand Down Expand Up @@ -63,7 +62,7 @@ index 72c45cd67f07..57398cefd5a6 100644
case LIBXL_VGA_INTERFACE_TYPE_CIRRUS:
default:
if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
@@ -1831,6 +1862,9 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
@@ -1877,6 +1908,9 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
if ( ret )
goto error_out;

Expand All @@ -74,7 +73,7 @@ index 72c45cd67f07..57398cefd5a6 100644
}
case LIBXL_DOMAIN_TYPE_PV:
diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
index af0944a55762..e085e33c17d1 100644
index 4710ded5deec..af96dcae5ffd 100644
--- a/tools/libs/light/libxl_dm.c
+++ b/tools/libs/light/libxl_dm.c
@@ -1446,6 +1446,9 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
Expand All @@ -88,10 +87,10 @@ index af0944a55762..e085e33c17d1 100644
LOGD(ERROR, guest_domid, "Invalid emulated video card specified");
return ERROR_INVAL;
diff --git a/tools/libs/light/libxl_domain.c b/tools/libs/light/libxl_domain.c
index 0d5d1ef6663c..36f653a5deae 100644
index f4bcb0b198cb..db257d45ebb7 100644
--- a/tools/libs/light/libxl_domain.c
+++ b/tools/libs/light/libxl_domain.c
@@ -1114,6 +1114,30 @@ static void domain_destroy_callback(libxl__egc *egc,
@@ -1110,6 +1110,30 @@ static void domain_destroy_callback(libxl__egc *egc,
static void destroy_finish_check(libxl__egc *egc,
libxl__domain_destroy_state *dds);

Expand Down Expand Up @@ -132,7 +131,7 @@ index 0d5d1ef6663c..36f653a5deae 100644

/* Clean up qemu-save and qemu-resume files. They are
diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index d79a6e29121b..e4ab86bb2cf0 100644
index 1ad4d8dd1d3f..ba362dc43e61 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -38,6 +38,7 @@ libxl_ms_vm_genid = Builtin("ms_vm_genid", passby=PASS_BY_REFERENCE, check_defau
Expand All @@ -143,15 +142,15 @@ index d79a6e29121b..e4ab86bb2cf0 100644

#
# Constants / Enumerations
@@ -232,6 +233,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [
@@ -238,6 +239,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [
(2, "STD"),
(3, "NONE"),
(4, "QXL"),
+ (5, "XENGT"),
], init_val = "LIBXL_VGA_INTERFACE_TYPE_UNKNOWN")

libxl_vendor_device = Enumeration("vendor_device", [
@@ -615,6 +617,9 @@ libxl_domain_build_info = Struct("domain_build_info",[
@@ -677,6 +679,9 @@ libxl_domain_build_info = Struct("domain_build_info",[
("hdtype", libxl_hdtype),
("nographic", libxl_defbool),
("vga", libxl_vga_interface_info),
Expand All @@ -162,5 +161,5 @@ index d79a6e29121b..e4ab86bb2cf0 100644
# keyboard layout, default is en-us keyboard
("keymap", string),
--
2.37.3
2.44.0

65 changes: 0 additions & 65 deletions Makefile

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile.builder

This file was deleted.

4 changes: 1 addition & 3 deletions archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ prepare() {

# Fix Install Paths.
sed 's,/var/run,/run,g' -i tools/hotplug/Linux/locking.sh
sed 's,/var/run,/run,g' -i tools/misc/xenpvnetboot
sed 's,/var/run,/run,g' -i tools/xenmon/xenbaked.c
sed 's,/var/run,/run,g' -i tools/xenmon/xenmon.py
sed 's,/var/run,/run,g' -i tools/pygrub/src/pygrub
Expand All @@ -47,6 +46,7 @@ build() {
./configure --prefix=/usr \
--sbindir=/usr/bin \
--libdir=/usr/lib \
--enable-systemd \
--disable-ocaml \
--disable-pvshim \
--disable-blktap2
Expand Down Expand Up @@ -99,8 +99,6 @@ package() {
rm -rf "$pkgdir"/etc/sysconfig
rm -rf "$pkgdir"/etc/rc.d/init.d

rm -r ""$pkgdir"/var/run"

# udev
rm -f "$pkgdir"/etc/udev/rules.d/xend.rules

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.17.4
4.19.0
157 changes: 53 additions & 104 deletions xen.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
# hardlinked sources)
%define _unpackaged_files_terminate_build 0

# xen.efi.elf doesn't have proper build-id
%define _missing_build_ids_terminate_build 0

# Hypervisor ABI
%define hv_abi 4.17
%define hv_abi 4.19

%define upstream_version @VERSION@
%define rctag %(echo @VERSION@ | sed -n -e 's/.*-\\(rc[0-9]*\\).*/0.\\1./;/rc/p')
Expand Down Expand Up @@ -88,86 +91,50 @@ Provides: xen-gvt
# 1100+: Others

# EFI workarounds
Patch0201: 0201-EFI-early-Add-noexit-to-inhibit-calling-ExitBootServ.patch
Patch0202: 0202-efi-Ensure-incorrectly-typed-runtime-services-get-ma.patch
Patch0203: 0203-Add-xen.cfg-options-for-mapbs-and-noexitboot.patch
Patch0204: 0204-xen.efi.build.patch

# Backports
Patch0301: 0301-x86-mm-shadow-avoid-assuming-a-specific-Xen-PAT.patch
Patch0302: 0302-x86-mm-shadow-do-not-open-code-PAGE_CACHE_ATTRS.patch
Patch0303: 0303-p2m-pt-Avoid-hard-coding-Xen-s-PAT.patch
Patch0304: 0304-efi-Avoid-hard-coding-the-various-PAT-constants.patch
Patch0305: 0305-x86-Add-memory-type-constants.patch
Patch0306: 0306-x86-Replace-PAT_-with-X86_MT_.patch
Patch0307: 0307-x86-Replace-MTRR_-constants-with-X86_MT_-constants.patch
Patch0308: 0308-x86-Replace-EPT_EMT_-constants-with-X86_MT_.patch
Patch0309: 0309-x86-Derive-XEN_MSR_PAT-from-its-individual-entries.patch
Patch0314: 0314-drivers-char-support-up-to-1M-BAR0-of-xhci.patch
Patch0315: 0315-IOMMU-store-name-for-extra-reserved-device-memory.patch
Patch0316: 0316-drivers-char-mark-extra-reserved-device-memory-in-me.patch
Patch0317: 0317-xen-list-add-LIST_HEAD_RO_AFTER_INIT.patch
Patch0318: 0318-x86-mm-add-API-for-marking-only-part-of-a-MMIO-page-.patch
Patch0319: 0319-drivers-char-Use-sub-page-ro-API-to-make-just-xhci-d.patch

# Security fixes
Patch0500: 0500-xsa458.patch

# Upstreamable patches
Patch0604: 0604-libxl-create-writable-error-xenstore-dir.patch
Patch0605: 0605-libxl-do-not-wait-for-backend-on-PCI-remove-when-bac.patch
Patch0606: 0606-libxl-do-not-fail-device-removal-if-backend-domain-i.patch
Patch0607: 0607-libvchan-use-xengntshr_unshare-instead-of-munmap-dir.patch
Patch0608: 0608-x86-time-Don-t-use-EFI-s-GetTime-call-by-default.patch
Patch0609: 0609-libxl-automatically-enable-gfx_passthru-if-IGD-is-as.patch
Patch0610: 0610-autoconf-fix-handling-absolute-PYTHON-path.patch
Patch0611: 0611-libxl-do-not-require-filling-backend_domid-to-remove.patch
Patch0612: 0612-libxl-add-pcidevs-to-stubdomain-earlier.patch
Patch0613: 0613-Fix-buildid-alignment.patch
Patch0614: 0614-vchan-socket-proxy-add-reconnect-marker-support.patch
Patch0615: 0615-tools-libxl-enable-in-band-reconnect-marker-for-stub.patch
Patch0616: 0616-libxl-Add-a-utility-function-for-domain-resume.patch
Patch0617: 0617-libxl-Add-utility-function-to-check-guest-status.patch
Patch0618: 0618-libxl-Properly-suspend-stubdomains.patch
Patch0619: 0619-libxl-Fix-race-condition-in-domain-suspension.patch
Patch0620: 0620-libxl-Add-additional-domain-suspend-resume-logs.patch
Patch0621: 0621-libxl-workaround-for-Windows-PV-drivers-removing-con.patch
Patch0622: 0622-libxl-check-control-feature-before-issuing-pvcontrol.patch
Patch0623: 0623-tools-kdd-mute-spurious-gcc-warning.patch
Patch0624: 0624-libxl-do-not-start-qemu-in-dom0-just-for-extra-conso.patch
Patch0625: 0625-libxl-Allow-stubdomain-to-control-interupts-of-PCI-d.patch
Patch0626: 0626-Validate-EFI-memory-descriptors.patch
Patch0627: 0627-x86-mm-Avoid-hard-coding-PAT-in-get_page_from_l1e.patch
Patch0628: 0628-x86-mm-make-code-robust-to-future-PAT-changes.patch
Patch0630: 0630-Drop-ELF-notes-from-non-EFI-binary-too.patch

# Intel HWP support
Patch0631: 0631-cpufreq-Allow-restricting-to-internal-governors-only.patch
Patch0632: 0632-cpufreq-Add-perf_freq-to-cpuinfo.patch
Patch0633: 0633-cpufreq-Export-intel_feature_detect.patch
Patch0634: 0634-cpufreq-Add-Hardware-P-State-HWP-driver.patch
Patch0635: 0635-xenpm-Change-get-cpufreq-para-output-for-internal.patch
Patch0636: 0636-cpufreq-Export-HWP-parameters-to-userspace.patch
Patch0637: 0637-libxc-Include-hwp_para-in-definitions.patch
Patch0638: 0638-xenpm-Print-HWP-parameters.patch
Patch0639: 0639-xen-Add-SET_CPUFREQ_HWP-xen_sysctl_pm_op.patch
Patch0640: 0640-libxc-Add-xc_set_cpufreq_hwp.patch
Patch0641: 0641-xenpm-Factor-out-a-non-fatal-cpuid_parse-variant.patch
Patch0642: 0642-xenpm-Add-set-cpufreq-hwp-subcommand.patch
Patch0643: 0643-cpufreq-enable-HWP-by-default.patch

PAtch0651: 0651-x86-msi-passthrough-all-MSI-X-vector-ctrl-writes-to-.patch
PAtch0652: 0652-x86-hvm-Allow-writes-to-registers-on-the-same-page-a.patch
Patch0200: 0200-EFI-early-Add-noexit-to-inhibit-calling-ExitBootServ.patch
Patch0201: 0201-efi-Ensure-incorrectly-typed-runtime-services-get-ma.patch
Patch0202: 0202-Add-xen.cfg-options-for-mapbs-and-noexitboot.patch
Patch0203: 0203-xen.efi.build.patch

# Backports (300+)

# Security fixes (500+)

# Upstreamable patches (600+)
Patch0600: 0600-libxl-create-writable-error-xenstore-dir.patch
Patch0601: 0601-libxl-do-not-wait-for-backend-on-PCI-remove-when-bac.patch
Patch0602: 0602-libxl-do-not-fail-device-removal-if-backend-domain-i.patch
Patch0603: 0603-libvchan-use-xengntshr_unshare-instead-of-munmap-dir.patch
Patch0604: 0604-x86-time-Don-t-use-EFI-s-GetTime-call-by-default.patch
Patch0605: 0605-libxl-automatically-enable-gfx_passthru-if-IGD-is-as.patch
Patch0606: 0606-autoconf-fix-handling-absolute-PYTHON-path.patch
Patch0607: 0607-libxl-do-not-require-filling-backend_domid-to-remove.patch
Patch0608: 0608-libxl-add-pcidevs-to-stubdomain-earlier.patch
Patch0609: 0609-Fix-buildid-alignment.patch
Patch0610: 0610-vchan-socket-proxy-add-reconnect-marker-support.patch
Patch0611: 0611-tools-libxl-enable-in-band-reconnect-marker-for-stub.patch
Patch0612: 0612-libxl-Add-a-utility-function-for-domain-resume.patch
Patch0613: 0613-libxl-Properly-suspend-stubdomains.patch
Patch0614: 0614-libxl-Fix-race-condition-in-domain-suspension.patch
Patch0615: 0615-libxl-Add-additional-domain-suspend-resume-logs.patch
Patch0616: 0616-libxl-workaround-for-Windows-PV-drivers-removing-con.patch
Patch0617: 0617-libxl-check-control-feature-before-issuing-pvcontrol.patch
Patch0618: 0618-tools-kdd-mute-spurious-gcc-warning.patch
Patch0619: 0619-libxl-do-not-start-qemu-in-dom0-just-for-extra-conso.patch
Patch0620: 0620-libxl-Allow-stubdomain-to-control-interupts-of-PCI-d.patch
Patch0621: 0621-Validate-EFI-memory-descriptors.patch
Patch0622: 0622-x86-mm-make-code-robust-to-future-PAT-changes.patch
Patch0623: 0623-Drop-ELF-notes-from-non-EFI-binary-too.patch
Patch0624: 0624-xenpm-Factor-out-a-non-fatal-cpuid_parse-variant.patch

Patch0653: 0653-python-avoid-conflicting-_FORTIFY_SOURCE-values.patch

# S0ix support
Patch0670: 0670-x86-hpet-Disable-legacy-replacement-mode-after-test-.patch
Patch0671: 0671-x86-idle-Get-PC-8.10-counters-for-Tiger-and-Alder-La.patch
Patch0672: 0672-x86-ACPI-Ignore-entries-marked-as-unusable-when-pars.patch
Patch0673: 0673-x86-msr-Allow-hardware-domain-to-read-C-state-reside.patch
Patch0674: 0674-x86-mwait-idle-Use-ACPI-for-CPUs-without-hardcoded-C.patch
Patch0675: 0675-libxl_pci-Pass-power_mgmt-via-QMP.patch
Patch0625: 0625-x86-idle-Get-PC-8.10-counters-for-Tiger-and-Alder-La.patch
Patch0626: 0626-x86-ACPI-Ignore-entries-marked-as-unusable-when-pars.patch
Patch0627: 0627-x86-msr-Allow-hardware-domain-to-read-package-C-stat.patch
Patch0628: 0628-x86-mwait-idle-Use-ACPI-for-CPUs-without-hardcoded-C.patch
Patch0629: 0629-libxl_pci-Pass-power_mgmt-via-QMP.patch

# Qubes specific patches
Patch1000: 1000-Do-not-access-network-during-the-build.patch
Expand All @@ -183,12 +150,11 @@ Patch1009: 1009-tools-xenconsole-replace-ESC-char-on-xenconsole-outp.patch
Patch1010: 1010-libxl-disable-vkb-by-default.patch
Patch1011: 1011-Always-allocate-domid-sequentially-and-do-not-reuse-.patch
Patch1012: 1012-libxl-add-qubes-gui-graphics.patch
Patch1013: 1013-libxl-do-not-force-qdisk-backend-for-cdrom.patch
Patch1014: 1014-Additional-support-in-ACPI-builder-to-support-SLIC-a.patch
Patch1015: 1015-libxl-conditionally-allow-PCI-passthrough-on-PV-with.patch
Patch1016: 1016-gnttab-disable-grant-tables-v2-by-default.patch
Patch1018: 1018-Fix-IGD-passthrough-with-linux-stubdomain.patch
Patch1019: 1019-Use-Linux-s-PAT.patch
Patch1013: 1013-Additional-support-in-ACPI-builder-to-support-SLIC-a.patch
Patch1014: 1014-libxl-conditionally-allow-PCI-passthrough-on-PV-with.patch
Patch1015: 1015-gnttab-disable-grant-tables-v2-by-default.patch
Patch1016: 1016-cpufreq-enable-HWP-by-default.patch
Patch1017: 1017-Fix-IGD-passthrough-with-linux-stubdomain.patch

# Reproducible builds
Patch1100: 1100-Define-build-dates-time-based-on-SOURCE_DATE_EPOCH.patch
Expand Down Expand Up @@ -225,9 +191,9 @@ BuildRequires: libuuid-devel
BuildRequires: acpica-tools
# modern compressed kernels
BuildRequires: bzip2-devel xz-devel libzstd-devel
# libfsimage
BuildRequires: e2fsprogs-devel
# BEGIN QUBES SPECIFIC PART
## libfsimage
#BuildRequires: e2fsprogs-devel
# tools now require yajl and wget
BuildRequires: yajl-devel
# END QUBES SPECIFIC PART
Expand Down Expand Up @@ -452,7 +418,7 @@ CONFIG_EXTRA="$CONFIG_EXTRA --with-system-seabios=/usr/share/seabios/bios-256k.b
%else
CONFIG_EXTRA="$CONFIG_EXTRA --disable-seabios"
%endif
./configure --prefix=%{_prefix} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --with-system-qemu=/usr/bin/qemu-system-i386 --with-linux-backend-modules="xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback xen-scsiback xen-acpi-processor" $CONFIG_EXTRA
./configure --prefix=%{_prefix} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --with-system-qemu=/usr/bin/qemu-system-i386 --with-linux-backend-modules="xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback xen-scsiback xen-acpi-processor" --enable-systemd --disable-pygrub $CONFIG_EXTRA
unset CFLAGS CXXFLAGS FFLAGS LDFLAGS
export LDFLAGS="$LDFLAGS_SAVE"
export CFLAGS="$CFLAGS_SAVE -Wno-error=address"
Expand Down Expand Up @@ -620,15 +586,12 @@ rm %{buildroot}%{_sysconfdir}/%{initdloc}/xendriverdomain

# BEGIN QUBES SPECIFIC PART
rm %{buildroot}%{_sysconfdir}/sysconfig/xendomains
mkdir -p %{buildroot}/usr/lib/modules-load.d
cp %{SOURCE32} %{buildroot}/usr/lib/modules-load.d/xen.conf

# get rid of standard domain starting scripts
rm %{buildroot}%{_unitdir}/xen-qemu-dom0-disk-backend.service
rm %{buildroot}%{_unitdir}/xendomains.service

# unused and dangerous
rm -f %{buildroot}/%{_bindir}/pygrub
rm -rf %{buildroot}/%{python3_sitearch}/pygrub*
# END QUBES SPECIFIC PART

############ create dirs in /var ############
Expand Down Expand Up @@ -816,7 +779,6 @@ fi
#files -f xen-xm.lang
%files
%doc COPYING README
%{_bindir}/xencons

# BEGIN QUBES SPECIFIC PART
%files -n python%{python3_pkgversion}-%{name}
Expand All @@ -843,7 +805,6 @@ fi
%{_libdir}/libxenevtchn.so.1.2
%{_libdir}/libxenforeignmemory.so.1
%{_libdir}/libxenforeignmemory.so.1.4
%{_libdir}/libxenfsimage.so.4.*
%{_libdir}/libxengnttab.so.1
%{_libdir}/libxengnttab.so.1.2
%{_libdir}/libxenguest.so.4.*
Expand All @@ -857,7 +818,6 @@ fi
%{_libdir}/libxentoollog.so.1.0
%{_libdir}/libxenvchan.so.4.*
%{_libdir}/libxlutil.so.4.*
%{_libdir}/xenfsimage
%{_libdir}/libxenhypfs.so.1
%{_libdir}/libxenhypfs.so.1.0

Expand Down Expand Up @@ -907,7 +867,6 @@ fi
# man pages
%if %build_docs
%{_mandir}/man1/xentop.1*
%{_mandir}/man1/xentrace_format.1*
%{_mandir}/man8/xentrace.8*
%{_mandir}/man1/xl.1*
%{_mandir}/man5/xl.cfg.5*
Expand All @@ -927,12 +886,6 @@ fi
%{_mandir}/man5/xl-pci-configuration.5.gz
%endif

%{python3_sitearch}/xenfsimage*.so
%{python3_sitearch}/grub
# BEGIN QUBES SPECIFIC PART
# %{python3_sitearch}/pygrub-*.egg-info
# END QUBES SPECIFIC PART

# The firmware
%ifarch %{ix86} x86_64
%dir %{_libexecdir}/%{name}/boot
Expand Down Expand Up @@ -969,10 +922,6 @@ fi
# END QUBES SPECIFIC PART
%{_bindir}/xenstore
%{_bindir}/xenstore-*
# BEGIN QUBES SPECIFIC PART
#%{_bindir}/pygrub
# END QUBES SPECIFIC PART
%{_bindir}/xentrace*
#%#{_bindir}/remus
# XSM
# BEGIN QUBES SPECIFIC PART
Expand Down