From e5890b4d2db35fed96e22c05781aea4338aceb6a Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Wed, 2 Aug 2023 13:35:09 +0200 Subject: [PATCH] dracut-049-228.git20230802 Resolves: #2228422 --- 0200.patch | 1 + 0201.patch | 1 + 0208.patch | 1 + 0217.patch | 1 + 0220.patch | 1 + 0222.patch | 1 + 0223.patch | 1 + 0224.patch | 1 + 0226.patch | 1 + 0227.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ dracut.spec | 6 +++++- 11 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 0227.patch diff --git a/0200.patch b/0200.patch index 32ea347..dcd4cf2 100644 --- a/0200.patch +++ b/0200.patch @@ -82,3 +82,4 @@ index 8800a49e..71bea53a 100755 inst_simple /etc/system-fips [ -c ${initdir}/dev/random ] || mknod ${initdir}/dev/random c 1 8 \ + diff --git a/0201.patch b/0201.patch index 856e184..71b5da7 100644 --- a/0201.patch +++ b/0201.patch @@ -31,3 +31,4 @@ index c57fd426..e8952489 100755 done fi fi + diff --git a/0208.patch b/0208.patch index 6003e09..867b10d 100644 --- a/0208.patch +++ b/0208.patch @@ -52,3 +52,4 @@ index 00000000..ce5c883b +# https://github.com/koalaman/shellcheck/wiki/SC3045 +# ... but dash supports it +disable=SC3045 + diff --git a/0217.patch b/0217.patch index f80cc76..43a2cf3 100644 --- a/0217.patch +++ b/0217.patch @@ -35,3 +35,4 @@ index 0d4ef27b..d531bb56 100755 fi done # Default: We don't know the interface to use, handle all + diff --git a/0220.patch b/0220.patch index 10ca1dc..fd53f20 100644 --- a/0220.patch +++ b/0220.patch @@ -29,3 +29,4 @@ index 61752384..94c19545 100755 source_hook initqueue/online $ifname /sbin/netroot $ifname done + diff --git a/0222.patch b/0222.patch index 2876131..8674e63 100644 --- a/0222.patch +++ b/0222.patch @@ -45,3 +45,4 @@ index 57f51e91..f58559e8 100755 # these options add to the stuff in the config file (( ${#add_dracutmodules_l[@]} )) && add_dracutmodules+=" ${add_dracutmodules_l[@]} " (( ${#force_add_dracutmodules_l[@]} )) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[@]} " + diff --git a/0223.patch b/0223.patch index 26eb9e9..ed789ff 100644 --- a/0223.patch +++ b/0223.patch @@ -53,3 +53,4 @@ index fe1eca1a..92c1d1dd 100755 # TODO: make this conditional on a cmdline flag / config option inst_multiple -o cpio xz bzip2 zstd inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh" + diff --git a/0224.patch b/0224.patch index 3a347bd..e69f3c1 100644 --- a/0224.patch +++ b/0224.patch @@ -40,3 +40,4 @@ index f36d31f7..851bc31b 100755 for _nic in $hostonly_nics; do _net_drivers=$(get_dev_module /sys/class/net/$_nic) if ! [[ $_net_drivers ]]; then + diff --git a/0226.patch b/0226.patch index 33e8e11..1fc9be0 100644 --- a/0226.patch +++ b/0226.patch @@ -82,3 +82,4 @@ index 00000000..16365377 + inst_multiple "${hwdb_bin}" + fi +} + diff --git a/0227.patch b/0227.patch new file mode 100644 index 0000000..7a9b2a4 --- /dev/null +++ b/0227.patch @@ -0,0 +1,55 @@ +From a6f8ccba4b55a1f3715a0fd3d8f611b954e443a5 Mon Sep 17 00:00:00 2001 +From: David Hildenbrand +Date: Thu, 18 Mar 2021 10:41:49 +0100 +Subject: [PATCH] feat(qemu): include the virtio_mem kernel module + +This adds support for virtio-mem devices, which provide a dynamic +amount of memory in a VM. Right now, the driver gets loaded and any +memory gets added to the system when loading the kernel module from disk. + +While not strictly required to boot, we want to be able to +1) add virito-mem provided memory to the system early while booting up +2) add virtio-mem provided memory even when booting without a disk +3) add virtio-mem devices without adding actual memory in kdump + environments such that we can query things like: + a) is a certain PFN currently plugged in the hypervisor and, therefore, + should actually be read when creating a system dump. (kexec-tools + prepares the vmcore header, like on x86-64) + b) which ranges of a virtio-mem device are currently plugged in the + hypervisor and, therefore, should be added to the dump. (vmcore header + gets prepared by the crashkernel, like on s390x) + Note that loading virtio-mem in kdump environments currently fails with + -EBUSY -- but there are plans to install proper hooks instead to support + especially a) in the near future. + +1) and 2) are only really effective when memory hotplug is configured to +automatically online all added system RAM in the kernel (and not late, +via udev rules): e.g., via "mhp_default_state=online" on the kernel +cmdline or via CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE in the kernel. + +Especially 2) and 3) require the module to be present inside the initial +ramdisk. The primary use case for including it in the initial ramdisk +is 3). + +Signed-off-by: David Hildenbrand +(cherry picked from commit f3dcb60619671f2d353caaa42d38207172c8b3ba) + +Cherry-picked from: f3dcb60619671f2d353caaa42d38207172c8b3ba +Resolves: #2228422 +--- + modules.d/90qemu/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 7e5ea6a4..e89dafbb 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -31,7 +31,7 @@ installkernel() { + hostonly='' instmods \ + ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ + virtio_blk virtio virtio_ring virtio_pci \ +- virtio_scsi virtio_console virtio_rng \ ++ virtio_scsi virtio_console virtio_rng virtio_mem \ + spapr-vscsi \ + qemu_fw_cfg + } diff --git a/dracut.spec b/dracut.spec index edb5bd1..a5eeb6a 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 227.git20230725 +%define dist_free_release 228.git20230802 Name: dracut Version: 049 @@ -254,6 +254,7 @@ Patch223: 0223.patch Patch224: 0224.patch Patch225: 0225.patch Patch226: 0226.patch +Patch227: 0227.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -709,6 +710,9 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf %changelog +* Wed Aug 02 2023 Lukas Nykryn - 049-228.git20230802 +- feat(qemu): include the virtio_mem kernel module + * Tue Jul 25 2023 Pavel Valena - 049-227.git20230725 - fix(rngd): install system service file - feat(hwdb): install hwdb on demand when module is needed