Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
libvirt
b1286526-qemu-Drop-qemuFeatureNoEffect.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File b1286526-qemu-Drop-qemuFeatureNoEffect.patch of Package libvirt
commit b12865260a0f24ab86ddaf3547b2f2e2c595d429 Author: Jiri Denemark <jdenemar@redhat.com> Date: Thu Jun 6 14:39:52 2019 +0200 qemu: Drop qemuFeatureNoEffect We already have virQEMUCapsCPUFilterFeatures for filtering features which QEMU does not know about. Let's move osxsave and ospke from qemuFeatureNoEffect there. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Index: libvirt-5.1.0/src/qemu/qemu_capabilities.c =================================================================== --- libvirt-5.1.0.orig/src/qemu/qemu_capabilities.c +++ libvirt-5.1.0/src/qemu/qemu_capabilities.c @@ -2745,6 +2745,11 @@ virQEMUCapsProbeQMPSEVCapabilities(virQE } +/* + * Filter for features which should never be passed to QEMU. Either because + * QEMU never supported them or they were dropped as they never did anything + * useful. + */ bool virQEMUCapsCPUFilterFeatures(const char *name, void *opaque) @@ -2756,7 +2761,9 @@ virQEMUCapsCPUFilterFeatures(const char if (STREQ(name, "cmt") || STREQ(name, "mbm_total") || - STREQ(name, "mbm_local")) + STREQ(name, "mbm_local") || + STREQ(name, "osxsave") || + STREQ(name, "ospke")) return false; return true; Index: libvirt-5.1.0/src/qemu/qemu_command.c =================================================================== --- libvirt-5.1.0.orig/src/qemu/qemu_command.c +++ libvirt-5.1.0/src/qemu/qemu_command.c @@ -6917,27 +6917,6 @@ qemuBuildGlobalControllerCommandLine(vir return 0; } -/** - * qemuFeatureNoEffect: - * @feature: CPU Feature - * - * Returns true, if the feature is known to have (never had) an effect on QEMU. - * Those features might be dropped in qemu without a longer deprecation cycle - * and must therefore be known e.g. to no more define them on command line. - */ -static bool -qemuFeatureNoEffect(virCPUFeatureDefPtr feature) -{ - if (!feature->name) - return false; - - if (STREQ(feature->name, "osxsave")) - return true; - if (STREQ(feature->name, "ospke")) - return true; - - return false; -} static int qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, @@ -7006,7 +6985,8 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr virBufferAsprintf(buf, ",vendor=%s", cpu->vendor_id); for (i = 0; i < cpu->nfeatures; i++) { - if (qemuFeatureNoEffect(&(cpu->features[i]))) + if (!virQEMUCapsCPUFilterFeatures(cpu->features[i].name, + (virArch *)&def->os.arch)) continue; switch ((virCPUFeaturePolicy) cpu->features[i].policy) { case VIR_CPU_FEATURE_FORCE:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor