From e45054c955a47b67c1b068c59ce4f00aff27269e8ee26b8876a9af0e37a220b6 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 15 Jun 2016 19:29:46 +0000 Subject: [PATCH 1/2] - Advertise aarch64 UEFI firmware paths - adjust spec file to include aarch64 paths in '--with-loader-nvram=' configure option - adjust qemu.conf 'nvram' option to include the SUSE paths bsc#981836, bsc#983747 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=541 --- libvirt.changes | 9 +++++++++ libvirt.spec | 10 ++++++++-- suse-qemu-conf.patch | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index 34d2de3..f6e770d 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jun 15 18:51:29 UTC 2016 - jfehlig@suse.com + +- Advertise aarch64 UEFI firmware paths + - adjust spec file to include aarch64 paths in + '--with-loader-nvram=' configure option + - adjust qemu.conf 'nvram' option to include the SUSE paths + bsc#981836, bsc#983747 + ------------------------------------------------------------------- Thu Jun 9 15:12:19 UTC 2016 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index aed774b..690ba2e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -109,8 +109,6 @@ %define qemu_user qemu %define qemu_group qemu -%define arg_loader_nvram --with-loader-nvram="/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin" - # Pull in cgroups config system %if %{with_qemu} || %{with_lxc} %define with_cgconfig 0%{!?_without_cgconfig:1} @@ -845,6 +843,14 @@ libvirt plugin for NSS for translating domain names into IP addresses. %define arg_selinux_mount --with-selinux-mount="/selinux" +# x86_64 UEFI firmwares +# To more closely resemble actual hardware, we use the firmwares with +# embedded Microsoft keys +LOADERS="/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin" +# aarch64 UEFI firmwares +LOADERS="$LOADERS:/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin" +%define arg_loader_nvram --with-loader-nvram="$LOADERS" + autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --with-pic \ diff --git a/suse-qemu-conf.patch b/suse-qemu-conf.patch index c811813..53762a0 100644 --- a/suse-qemu-conf.patch +++ b/suse-qemu-conf.patch @@ -1,3 +1,12 @@ +SUSE adjustments to qemu.conf + +This patch contains SUSE-specific adjustments to the upstream +qemu.conf configuration file. In the future, it might make +sense to separate these changes into individual patches (e.g. +suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch, +etc.), but for now they are all lumped together in this +single patch. + Index: libvirt-1.3.5/src/qemu/qemu.conf =================================================================== --- libvirt-1.3.5.orig/src/qemu/qemu.conf @@ -53,3 +62,14 @@ Index: libvirt-1.3.5/src/qemu/qemu.conf # #lock_manager = "lockd" +@@ -512,8 +532,8 @@ + # for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default + # follows this scheme. + #nvram = [ +-# "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd", +-# "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd" ++# "/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin", ++# "/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin" + #] + + # The backend to use for handling stdout/stderr output from From 0c7f3cbbe129de1800a23adcf755c4455cafc377e0c4a10223b31b086b6d49f5 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 16 Jun 2016 18:45:02 +0000 Subject: [PATCH 2/2] - xenconfig: fix conversion of to backendtype e33cd67a-xenconfig-backendtype-fix.patch bsc#984798 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=542 --- e33cd67a-xenconfig-backendtype-fix.patch | 60 ++++++++++++++++++++++++ libvirt.changes | 7 +++ libvirt.spec | 2 + 3 files changed, 69 insertions(+) create mode 100644 e33cd67a-xenconfig-backendtype-fix.patch diff --git a/e33cd67a-xenconfig-backendtype-fix.patch b/e33cd67a-xenconfig-backendtype-fix.patch new file mode 100644 index 0000000..00eeeec --- /dev/null +++ b/e33cd67a-xenconfig-backendtype-fix.patch @@ -0,0 +1,60 @@ +commit e33cd67a9b51e8fcb4e084f40f500057b30b2786 +Author: Jim Fehlig +Date: Wed Jun 15 23:09:36 2016 -0600 + + xenconfig: fix conversion of to backendtype + + When converting domXML to xen xl.cfg, backendtype should + not be emitted if is not specified. Moreover, + should be converted to backendtype + qdisk, similar to handling of in libxlMakeDisk() + in libxl_conf.c. + + Prior to this change, connectDomainXMLToNative would + produce incorrect xl.cfg when the input domXML contained + + + domXML: + + + + + + + + virsh domxml-to-native xen-xl domXML + + disk = [ "format=raw,vdev=xvda,access=rw,backendtype=target=/image/file/path" ] + + xl create xl.cfg + config parsing error in disk specification: unknown value + for backendtype: near `target=/image/file/path' in + `format=raw,vdev=xvda,access=rw,backendtype=target=/image/file/path' + +Index: libvirt-1.3.5/src/xenconfig/xen_xl.c +=================================================================== +--- libvirt-1.3.5.orig/src/xenconfig/xen_xl.c ++++ libvirt-1.3.5/src/xenconfig/xen_xl.c +@@ -752,13 +752,15 @@ xenFormatXLDisk(virConfValuePtr list, vi + } + + /* backendtype */ +- virBufferAddLit(&buf, "backendtype="); +- if (STREQ_NULLABLE(driver, "qemu")) +- virBufferAddLit(&buf, "qdisk,"); +- else if (STREQ_NULLABLE(driver, "tap")) +- virBufferAddLit(&buf, "tap,"); +- else if (STREQ_NULLABLE(driver, "phy")) +- virBufferAddLit(&buf, "phy,"); ++ if (driver) { ++ virBufferAddLit(&buf, "backendtype="); ++ if (STREQ(driver, "qemu") || STREQ(driver, "file")) ++ virBufferAddLit(&buf, "qdisk,"); ++ else if (STREQ(driver, "tap")) ++ virBufferAddLit(&buf, "tap,"); ++ else if (STREQ(driver, "phy")) ++ virBufferAddLit(&buf, "phy,"); ++ } + + /* devtype */ + if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) diff --git a/libvirt.changes b/libvirt.changes index f6e770d..6fd771e 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 16 18:39:54 UTC 2016 - jfehlig@suse.com + +- xenconfig: fix conversion of to backendtype + e33cd67a-xenconfig-backendtype-fix.patch + bsc#984798 + ------------------------------------------------------------------- Wed Jun 15 18:51:29 UTC 2016 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 690ba2e..57c0051 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -257,6 +257,7 @@ Source4: libvirtd-relocation-server.fw Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches +Patch0: e33cd67a-xenconfig-backendtype-fix.patch # Patches pending upstream review Patch100: apparmor-dont-scrub-environment-of-virtlogd-process.patch # Need to go upstream @@ -706,6 +707,7 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q +%patch0 -p1 %patch100 -p1 %patch150 -p1 %patch151 -p1