diff --git a/ae102b5d7-qemu-fix-regression-when-hyperv-vendor_id-feature-is-used.patch b/ae102b5d7-qemu-fix-regression-when-hyperv-vendor_id-feature-is-used.patch new file mode 100644 index 0000000..059d5c5 --- /dev/null +++ b/ae102b5d7-qemu-fix-regression-when-hyperv-vendor_id-feature-is-used.patch @@ -0,0 +1,72 @@ +From ae102b5d7bccd29bc6015a3e0acefeaa90d097ac Mon Sep 17 00:00:00 2001 +From: Jiri Denemark +Date: Thu, 6 Apr 2017 13:52:30 +0200 +Subject: [PATCH] qemu: Fix regression when hyperv/vendor_id feature is used + +qemuProcessVerifyHypervFeatures is supposed to check whether all +requested hyperv features were actually honored by QEMU/KVM. This is +done by checking the corresponding CPUID bits reported by the virtual +CPU. In other words, it doesn't work for string properties, such as +VIR_DOMAIN_HYPERV_VENDOR_ID (there is no CPUID bit we could check). We +could theoretically check all 96 bits corresponding to the vendor +string, but luckily we don't have to check the feature at all. If QEMU +is too old to support hyperv features, the domain won't even start. +Otherwise, it is always supported. + +Without this patch, libvirt refuses to start a domain which contains + + + + + + + +reporting internal error: "unknown CPU feature __kvm_hv_vendor_id. + +This regression was introduced by commit v3.1.0-186-ge9dbe7011, which +(by fixing the virCPUDataCheckFeature condition in +qemuProcessVerifyHypervFeatures) revealed an old bug in the feature +verification code. It's been there ever since the verification was +implemented by commit v1.3.3-rc1-5-g95bbe4bf5, which effectively did not +check VIR_DOMAIN_HYPERV_VENDOR_ID at all. + +https://bugzilla.redhat.com/show_bug.cgi?id=1439424 + +Signed-off-by: Jiri Denemark +--- + src/qemu/qemu_process.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c +index e450d06..8323a18 100644 +--- a/src/qemu/qemu_process.c ++++ b/src/qemu/qemu_process.c +@@ -3793,6 +3793,10 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def, + int rc; + + for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { ++ /* always supported string property */ ++ if (i == VIR_DOMAIN_HYPERV_VENDOR_ID) ++ continue; ++ + if (def->hyperv_features[i] != VIR_TRISTATE_SWITCH_ON) + continue; + +@@ -3821,13 +3825,13 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def, + case VIR_DOMAIN_HYPERV_SYNIC: + case VIR_DOMAIN_HYPERV_STIMER: + case VIR_DOMAIN_HYPERV_RESET: +- case VIR_DOMAIN_HYPERV_VENDOR_ID: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("host doesn't support hyperv '%s' feature"), + virDomainHypervTypeToString(i)); + return -1; + + /* coverity[dead_error_begin] */ ++ case VIR_DOMAIN_HYPERV_VENDOR_ID: + case VIR_DOMAIN_HYPERV_LAST: + break; + } +-- +1.7.1 + diff --git a/libvirt.changes b/libvirt.changes index 4a12c7f..2161ccc 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 12 22:06:09 UTC 2017 - petracvv@opensuse.org + +- qemu: Fix regression when hyperv/vendor_id feature is used + Added patch: + ae102b5d7-qemu-fix-regression-when-hyperv-vendor_id-feature-is-used.patch + boo#1033893 + ------------------------------------------------------------------- Mon Apr 3 04:40:57 UTC 2017 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index fa9aad1..b2e14c3 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -317,6 +317,7 @@ Source4: libvirtd-relocation-server.fw Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches +Patch0: ae102b5d7-qemu-fix-regression-when-hyperv-vendor_id-feature-is-used.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -885,6 +886,7 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q +%patch0 -p1 %patch100 -p1 %patch101 -p1 %patch150 -p1