Accepting request 908023 from home:jfehlig:branches:Virtualization:ovmf

- libxl: ovmf now provides only one firmware for Xen. The firmware
  is named ovmf-x86_64-xen-4m.bin in the SUSE ovmf package. Adjust
  the upstream default firmware path to match the SUSE name.
- packaging: To improve maintainability, rename suse-ovmf-paths.patch
  to suse-qemu-ovmf-paths.patch and suse-xen-ovmf-loaders.patch to
  suse-xen-ovmf-paths.patch

OBS-URL: https://build.opensuse.org/request/show/908023
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=898
This commit is contained in:
James Fehlig 2021-07-23 21:27:33 +00:00 committed by Git OBS Bridge
parent d0be6a8d16
commit 95d05af7e8
5 changed files with 37 additions and 29 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jul 22 22:19:47 UTC 2021 - James Fehlig <jfehlig@suse.com>
- libxl: ovmf now provides only one firmware for Xen. The firmware
is named ovmf-x86_64-xen-4m.bin in the SUSE ovmf package. Adjust
the upstream default firmware path to match the SUSE name.
- packaging: To improve maintainability, rename suse-ovmf-paths.patch
to suse-qemu-ovmf-paths.patch and suse-xen-ovmf-loaders.patch to
suse-xen-ovmf-paths.patch
-------------------------------------------------------------------
Fri Jul 16 23:05:03 UTC 2021 - James Fehlig <jfehlig@suse.com>

View File

@ -302,13 +302,13 @@ Patch156: 0001-libxl-add-support-for-BlockResize-API.patch
Patch200: suse-libvirtd-disable-tls.patch
Patch201: suse-libvirt-guests-service.patch
Patch202: suse-qemu-conf.patch
Patch203: suse-ovmf-paths.patch
Patch203: suse-qemu-ovmf-paths.patch
Patch204: libxl-support-block-script.patch
Patch205: qemu-apparmor-screenshot.patch
Patch206: libvirt-suse-netcontrol.patch
Patch207: lxc-wait-after-eth-del.patch
Patch208: suse-libxl-disable-autoballoon.patch
Patch209: suse-xen-ovmf-loaders.patch
Patch209: suse-xen-ovmf-paths.patch
Patch210: virt-create-rootfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build

View File

@ -1,5 +1,10 @@
Adjust paths of OVMF firmwares on SUSE distros
Note: SLE15 SP2 and newer support automatic firmware selection. Firmwares
advertised and used by libvirt are automatically detected. Until upstream
removes the old DEFAULT_LOADER_NVRAM approach and associated code, this
patch will stay.
Index: libvirt-7.5.0/src/qemu/qemu.conf
===================================================================
--- libvirt-7.5.0.orig/src/qemu/qemu.conf

View File

@ -1,27 +0,0 @@
libxl: Temporarily hardcode paths to ovmf firmwares
This is a quick, hacky fix for bsc#1159793 until there is time to work on
upstream support for firmware autoselection in the xen driver. Sadly, the
upstream efforts to improve firmware handling in the qemu driver broke
the firmware handling in the xen driver.
Index: libvirt-7.5.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-7.5.0.orig/src/libxl/libxl_conf.c
+++ libvirt-7.5.0/src/libxl/libxl_conf.c
@@ -1802,6 +1802,15 @@ libxlDriverConfigNew(void)
cfg->autoDumpDir = g_strdup(LIBXL_DUMP_DIR);
cfg->channelDir = g_strdup(LIBXL_CHANNEL_DIR);
+ /* Begin hack ---
+ * bsc#1159793: Until there is time to work on proper upstream support for
+ * firmware autoselection in the xen driver we'll go with this minimal fix.
+ */
+#define DEFAULT_LOADER_NVRAM "/usr/share/qemu/ovmf-x86_64-ms-4m.bin:/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin:/usr/share/qemu/ovmf-x86_64-ms.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin"
+ /*
+ * --- End hack
+ */
+
#ifdef DEFAULT_LOADER_NVRAM
if (virFirmwareParseList(DEFAULT_LOADER_NVRAM,
&cfg->firmwares,

20
suse-xen-ovmf-paths.patch Normal file
View File

@ -0,0 +1,20 @@
libxl: Use the SUSE ovmf firmware path for Xen
The libxl driver trivially supports firmware autoselection since as of
June 2021 ovmf only supports one firmware for Xen. This patch adjusts
the firmware path to match the one provided by the ovmf package.
Index: libvirt-7.5.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-7.5.0.orig/src/libxl/libxl_conf.c
+++ libvirt-7.5.0/src/libxl/libxl_conf.c
@@ -1813,7 +1813,7 @@ libxlDriverConfigNew(void)
cfg->firmwares = g_new0(virFirmware *, 1);
cfg->nfirmwares = 1;
cfg->firmwares[0] = g_new0(virFirmware, 1);
- cfg->firmwares[0]->name = g_strdup(LIBXL_FIRMWARE_DIR "/ovmf.bin");
+ cfg->firmwares[0]->name = g_strdup(DATADIR "/qemu/ovmf-x86_64-xen-4m.bin");
#endif
/* Always add hvmloader to firmwares */