Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
libvirt
9cd03f79-cpu_map-Drop-pconfig-from-Icelake-Serv...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 9cd03f79-cpu_map-Drop-pconfig-from-Icelake-Server-CPU-model.patch of Package libvirt
commit 9cd03f7957e114892ae54e7ccb3758b6fb440644 Author: Jiri Denemark <jdenemar@redhat.com> Date: Fri Oct 18 14:33:00 2019 +0200 cpu_map: Drop pconfig from Icelake-Server CPU model The pconfig feature was enabled in QEMU by accident in 3.1.0. All other newer versions do not support it and it was removed from the Icelake-Server CPU model in QEMU. We don't normally change our CPU models even when QEMU does so to avoid breaking migrations between different versions of libvirt. But we can safely do so in this specific case. QEMU never supported enabling pconfig so any domain which was able to start has pconfig disabled. With a small compatibility hack which explicitly disables pconfig when CPU model equals Icelake-Server in migratable domain definition, only one migration scenario stays broken (and there's nothing we can do about it): from any host to a host with libvirt < 5.10.0 and QEMU > 3.1.0. https://bugzilla.redhat.com/show_bug.cgi?id=1749672 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Index: libvirt-5.1.0/src/cpu_map/x86_Icelake-Server.xml =================================================================== --- libvirt-5.1.0.orig/src/cpu_map/x86_Icelake-Server.xml +++ libvirt-5.1.0/src/cpu_map/x86_Icelake-Server.xml @@ -56,7 +56,6 @@ <feature name='pat'/> <feature name='pcid'/> <feature name='pclmuldq'/> - <feature name='pconfig'/> <feature name='pdpe1gb'/> <feature name='pge'/> <feature name='pku'/> Index: libvirt-5.1.0/src/qemu/qemu_domain.c =================================================================== --- libvirt-5.1.0.orig/src/qemu/qemu_domain.c +++ libvirt-5.1.0/src/qemu/qemu_domain.c @@ -7735,6 +7735,26 @@ qemuDomainDefCopy(virQEMUDriverPtr drive } +int +qemuDomainMakeCPUMigratable(virCPUDefPtr cpu) +{ + if (cpu->mode == VIR_CPU_MODE_CUSTOM && + STREQ_NULLABLE(cpu->model, "Icelake-Server")) { + /* Originally Icelake-Server CPU model contained pconfig CPU feature. + * It was never actually enabled and thus it was removed. To enable + * migration to QEMU 3.1.0 (with both new and old libvirt), we + * explicitly disable pconfig in migration XML (otherwise old libvirt + * would think it was implicitly enabled on the source). New libvirt + * will drop it from the XML before starting the domain on new QEMU. + */ + if (virCPUDefUpdateFeature(cpu, "pconfig", VIR_CPU_FEATURE_DISABLE) < 0) + return -1; + } + + return 0; +} + + static int qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver, virDomainDefPtr def, @@ -7911,6 +7931,9 @@ qemuDomainDefFormatBufInternal(virQEMUDr if (!(def->cpu = virCPUDefCopy(origCPU))) goto cleanup; } + + if (qemuDomainMakeCPUMigratable(def->cpu) < 0) + goto cleanup; } format: Index: libvirt-5.1.0/src/qemu/qemu_domain.h =================================================================== --- libvirt-5.1.0.orig/src/qemu/qemu_domain.h +++ libvirt-5.1.0/src/qemu/qemu_domain.h @@ -1109,4 +1109,7 @@ qemuDomainIsUsingNoShutdown(qemuDomainOb bool qemuDomainDiskIsMissingLocalOptional(virDomainDiskDefPtr disk); +int +qemuDomainMakeCPUMigratable(virCPUDefPtr cpu); + #endif /* LIBVIRT_QEMU_DOMAIN_H */ Index: libvirt-5.1.0/src/qemu/qemu_migration_cookie.c =================================================================== --- libvirt-5.1.0.orig/src/qemu/qemu_migration_cookie.c +++ libvirt-5.1.0/src/qemu/qemu_migration_cookie.c @@ -544,6 +544,9 @@ qemuMigrationCookieAddCPU(qemuMigrationC if (!(mig->cpu = virCPUDefCopy(vm->def->cpu))) return -1; + if (qemuDomainMakeCPUMigratable(mig->cpu) < 0) + return -1; + mig->flags |= QEMU_MIGRATION_COOKIE_CPU; return 0;
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