[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Description changed: + [Impact] + + * CPU definitions are added to libvirt as these CPUs are known +and added to qemu for execution. + And due to that over time some are considered missing in +former releases. + + * To really benefit from the new features of these chips + they have to be known, therefore new type additions done by + upstream should be backported if they generally apply and do + not depend on SRU-critical changes. + + * This backports three upstream fixes that just add definitions +(no control flow changes) + + [Test Case] + + * Check if it has an EPYC-Rome entry in +/usr/share/libvirt/cpu_map/index.xml and the file included +there exists. + + * Define a guest like: + + EPYC-Rome + +You can only "really" start this on a system with the +matching HW. But even on others it will change from: + error: internal error: Unknown CPU model EPYC-Rome +to being unable to start for some features missing. + + * libvirt probes a system if a named cpu can be used, after the +fix this should include EPYC-Rome +$ virsh domcapabilities | grep EPYC + EPYC-IBPB + EPYC + + [Regression Potential] + + * Usually these type additions are safe unless they add control flow +changes (e.g. to handle yet unknown types of registers or such) but +that isn't the case here. +A regression if any is to be expected on systems that are close to the +newly added type(s). Those will after the update be detected as such +if e.g. host-model is used. If then running on a mixed cluster of +updated/non-updated systems migrations will only work if the target is +updated as well. + + [Other Info] + + * This is the first build since glibc 2.32 arrived in groovy, hence we +need to revert the revert done for bug 1892826. It has to be checked +if the linking is fine afterwards. That adds two tests that shall be +done. +- check the linking to point to libtirpc instead of glibc + $ eu-readelf -a /usr/lib/libvirt/libvirt_lxc | grep xdr_uint64 | grep GLOBAL +- run the autopkgtest cases as the LXC tests would trigger an issue if + there is one + + + + ## Qemu SRU ## [Impact] - * CPU definitions are added to qemu as these CPUs are known. -And due to that over time are missing in former releases. + * CPU definitions are added to qemu as these CPUs are known. + And due to that over time are missing in former releases. - * To really benefit from the new features of these chips -they have to be known, therefore new type additions done by -upstream should be backported if they generally apply and do -not depend on SRU-critical changes. + * To really benefit from the new features of these chips + they have to be known, therefore new type additions done by + upstream should be backported if they generally apply and do + not depend on SRU-critical changes. - * This backports two upstream fixes that just add definitions (no -control flow changes) + * This backports two upstream fixes that just add definitions (no + control flow changes) [Test Case] - * Probe qemu for the known CPU types (works on all HW) -$ qemu-system-x86_64 -cpu ? | grep EPYC -Focal without fix: -x86 EPYC (alias configured by machine type) -x86 EPYC-IBPB (alias of EPYC-v2) -x86 EPYC-v1 AMD EPYC Processor -x86 EPYC-v2 AMD EPYC Processor (with IBPB) -Focal with fix also adds: -x86 EPYC-Rome (alias configured by machine type) -x86 EPYC-Rome-v1 AMD EPYC-Rome Processor -x86 EPYC-v3 AMD EPYC Processor + * Probe qemu for the known CPU types (works on all HW) + $ qemu-system-x86_64 -cpu ? | grep EPYC + Focal without fix: + x86 EPYC (alias configured by machine type) + x86 EPYC-IBPB (alias of EPYC-v2) + x86 EPYC-v1 AMD EPYC Processor + x86 EPYC-v2 AMD EPYC Processor (with IBPB) + Focal with fix also adds: + x86 EPYC-Rome (alias configured by machine type) + x86 EPYC-Rome-v1 AMD EPYC-Rome Processor + x86 EPYC-v3 AMD EPYC Processor - * Given such HW is available start a KVM guest using those new types -Since we don't have libvirt support (yet) do so directly in qemu -commandline like (bootloader is enough) -$ qemu-system-x86_64 -cpu EPYC-Rome -machine pc-q35-focal,accel=kvm -nographic -$ qemu-system-x86_64 -cpu EPYC-v3 -machine pc-q35-focal,accel=kvm -nographic + * Given such HW is available start a KVM guest using those new types + Since we don't have libvirt support (yet) do so directly in qemu + commandline like (bootloader is enough) +
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
libvirt changes accepted: https://www.redhat.com/archives/libvir-list/2020-October/msg00493.html And became https://gitlab.com/libvirt/libvirt/-/commit/e06590f1708a599286f3ee3690b3dc50ee525d40 https://gitlab.com/libvirt/libvirt/-/commit/f941639f86f4bc66c106eb1291f1b58cf9e24680 https://gitlab.com/libvirt/libvirt/-/commit/736b8637f691242fd688cf726d22f79d0eb300d3 These mostly apply as-is and one with minimal delta. They are SRUable and therefore not much of an FF problem, but might be stalled a bit. We need to be a bit extra careful for the rebuild with glibc 2.32 due to bug 1892826. But I'll test that ahead of the final upload to groovy. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Everything else seems to be soon to be released into Focal. I've seen v1 and v2 of the libvirt upstream series. Please just ping here once the libvirt changes were accepted so we can revisit the libvirt part of this. Thanks in advance! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
The new qemu version works as expected together with 5.4.0-49 kernel required for xsaves # grep -e 'model name' -e 'flags' /proc/cpuinfo model name : AMD EPYC-Rome Processor flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr wbnoinvd arat npt nrip_save umip rdpid Patches for libvirt are submitted upstream https://www.redhat.com/archives/libvir-list/2020-October/msg8.html A version fitting for the focal version is attached ** Patch added: "Add-EPYC-ROME-x86-CPU-model.patch" https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887490/+attachment/5416509/+files/Add-EPYC-ROME-x86-CPU-model.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Before: qemu-system-x86_64 -cpu ? | grep EPYC x86 EPYC (alias configured by machine type) x86 EPYC-IBPB (alias of EPYC-v2) x86 EPYC-v1 AMD EPYC Processor x86 EPYC-v2 AMD EPYC Processor (with IBPB) Upgrade: ... Setting up qemu-system-data (1:4.2-3ubuntu6.7) ... Setting up libgfortran5:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up libubsan1:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up python3.8-minimal (3.8.5-1~20.04) ... Setting up gdbserver (9.2-0ubuntu1~20.04) ... Setting up language-selector-common (0.204.2) ... Setting up build-essential (12.8ubuntu1.1) ... Setting up libpython3.8-stdlib:amd64 (3.8.5-1~20.04) ... Setting up python3.8 (3.8.5-1~20.04) ... Setting up python3-lib2to3 (3.8.5-1~20.04.1) ... find: ‘/usr/lib/python3.7/lib2to3’: No such file or directory find: ‘/usr/lib/python3.7/lib2to3’: No such file or directory find: ‘/usr/lib/python3.7’: No such file or directory Setting up qemu-block-extra:amd64 (1:4.2-3ubuntu6.7) ... Setting up libcc1-0:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up liblsan0:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up mdadm (4.1-5ubuntu1.2) ... update-initramfs: deferring update (trigger activated) Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer → /lib/systemd/system/mdcheck_continue.timer. Setting up libitm1:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up bolt (0.8-4ubuntu1) ... Setting up gcc-9-base:amd64 (9.3.0-17ubuntu1~20.04) ... Setting up libgcc-s1-arm64-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up libtsan0:amd64 (10.2.0-5ubuntu1~20.04) ... Setting up libatomic1-arm64-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up python3-distutils (3.8.5-1~20.04.1) ... find: ‘/usr/lib/python3.7/distutils’: No such file or directory find: ‘/usr/lib/python3.7/distutils’: No such file or directory find: ‘/usr/lib/python3.7’: No such file or directory Setting up libgomp1-armhf-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up liblsan0-arm64-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up libgomp1-arm64-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up qemu-system-common (1:4.2-3ubuntu6.7) ... Setting up cpp-9-arm-linux-gnueabihf (9.3.0-17ubuntu1~20.04cross2) ... Setting up libgcc-s1-armhf-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up qemu-system-mips (1:4.2-3ubuntu6.7) ... Setting up libpython3.8-dbg:amd64 (3.8.5-1~20.04) ... Setting up libtsan0-arm64-cross (10.2.0-5ubuntu1~20.04cross1) ... Setting up qemu-system-x86 (1:4.2-3ubuntu6.7) ... ... After: qemu-system-x86_64 -cpu ? | grep EPYC x86 EPYC (alias configured by machine type) x86 EPYC-IBPB (alias of EPYC-v2) x86 EPYC-Rome (alias configured by machine type) x86 EPYC-Rome-v1 AMD EPYC-Rome Processor x86 EPYC-v1 AMD EPYC Processor x86 EPYC-v2 AMD EPYC Processor (with IBPB) x86 EPYC-v3 AMD EPYC Processor Marking as verified. @Markus - if you could give this a better test on your systems with the respective HW as well that would be awesome. P.S. as expected libvirt can make use of EPYC-v3 but not Rome yet. $ virsh domcapabilities | grep EPYC EPYC-IBPB EPYC ** Tags removed: verification-needed verification-needed-focal ** Tags added: verification-done verification-done-focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Thanks. It does not look like the "regression" preventing proposed migration is caused by the qemu changes. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
FYI: Autopkgtest issues resolved -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Hello Markus, or anyone else affected, Accepted qemu into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:4.2-3ubuntu6.7 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-focal. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: qemu (Ubuntu Focal) Status: In Progress => Fix Committed ** Tags removed: verification-done-focal ** Tags added: verification-needed verification-needed-focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Description changed: + ## Qemu SRU ## + + [Impact] + + * CPU definitions are added to qemu as these CPUs are known. +And due to that over time are missing in former releases. + + * To really benefit from the new features of these chips +they have to be known, therefore new type additions done by +upstream should be backported if they generally apply and do +not depend on SRU-critical changes. + + * This backports two upstream fixes that just add definitions (no +control flow changes) + + [Test Case] + + * Probe qemu for the known CPU types (works on all HW) +$ qemu-system-x86_64 -cpu ? | grep EPYC +Focal without fix: +x86 EPYC (alias configured by machine type) +x86 EPYC-IBPB (alias of EPYC-v2) +x86 EPYC-v1 AMD EPYC Processor +x86 EPYC-v2 AMD EPYC Processor (with IBPB) +Focal with fix also adds: +x86 EPYC-Rome (alias configured by machine type) +x86 EPYC-Rome-v1 AMD EPYC-Rome Processor +x86 EPYC-v3 AMD EPYC Processor + + * Given such HW is available start a KVM guest using those new types +Since we don't have libvirt support (yet) do so directly in qemu +commandline like (bootloader is enough) +$ qemu-system-x86_64 -cpu EPYC-Rome -machine pc-q35-focal,accel=kvm -nographic +$ qemu-system-x86_64 -cpu EPYC-v3 -machine pc-q35-focal,accel=kvm -nographic + + [Regression Potential] + + * This adds new CPU types to the list of known CPUs defining their name +and features. Generally the changes are contained to those new types +and only active when selected - and usually only selectable on such new +machines. Therefore not a lot should change for other users. +One thing thou, if a user selected an unversioned type (which in this +case only can be "EPYC") by default it will pick the latest subversion +that applies. In this case the behavior will change and pick EPYC-v3 +after the fix. But this is the whole purpose of versioned (stay as is) +and unversioned (move with updates) CPU types - so that should be ok. +The EPYC-Rome type didn't exist in Focal before, so it can't "change" +for users. + + + [Other Info] + + * Depends on the new kernel 5.4.0-49 or later (Currently in +focal-proposed) + + --- + Qemu in focal has already support for most (except amd-stibp) flags of this model. Please backport the following patches: https://github.com/qemu/qemu/commit/a16e8dbc043720abcb37fc7dca313e720b4e0f0c https://github.com/qemu/qemu/commit/143c30d4d346831a09e59e9af45afdca0331e819 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
SRU Template for qemu added and MP linked to fix this in Ubuntu 20.04 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+merge/391348 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Changed in: qemu (Ubuntu Focal) Status: Incomplete => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Thanks for the extra reports - I'll take a look at these qemu cases and in that time you can try getting the libvirt Rome change upstream. Once everything is in place we can SRU libvirt sort of together on this. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Actually no. It builds and does not have any downsides, but does not resolve the issue. Sorry for that. When I looked at the history of cpu_map and this patch, I did not see that it would require further patches to actually make it work. So that would leave it at these four patches: Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILITIES-MSR.patch Request-test-files-update-when-adding-x86-features.patch Add-missing-x86-features-in-0x7-CPUID-leaf.patch Add-missing-x86-features-in-0x8008-CPUID-leaf.patch Add-missing-AMD-SVM-features.patch Plus the patch adding the EPYC-Rome model. I'll try to get it upstream, but it will take some time. From my side, it's totally fine from my side to go ahead with the update without it. My patch queue for qemu also has 2 more patches, reported as LP#1896751 and LP#1896751 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
The second one is: https://bugs.launchpad.net/qemu/+bug/1849644 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
@Markus - did the patch 5d6059f8ec cpu_map: Distinguish Cascadelake-Server from Skylake-Server really work for you without the changes to support stepping applies? Or does your own build have much more applied to make it work? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
I agree Markus. Not only does the Focal qemu miss the related changes, I also dived deeper through the "what exactly happened" to be sure. The added patches I picked make it more obvious (test breaks) that we would need cpu model "stepping" ranges to work. This would add the need for much more logic change: a8ec1d746 cpu_x86: Move and rename x86ModelCopySignatures 782be9f0a cpu_x86: Move and rename x86ModelHasSignature 7e0d351fa cpu_x86: Move and rename x86FormatSignatures 372b2cf1c cpu_x86: Introduce virCPUx86SignaturesFree 3b474c1f8 cpu_x86: Introduce virCPUx86SignatureFromCPUID 22bded201 cpu_x86: Replace 32b signatures in virCPUx86Model with a struct c7a279499 cpu_x86: Add support for stepping part of CPU signature ... Those then in turn depend on various switches to glib g_fee allocations and such. Unfortunately that isn't only true for my picked "Add-Cooperlake-x86 -CPU-model", but also for one of the suggested changes by Markus as "Distinguish Cascadelake-Server from Skylake-Server" adds stepping='5-7'. Let us keep them out for now (too much risk for an SRU, users strictly depending on this need to speak up to make a strong case or upgrade to newer Ubuntu versions) --- Also the Arm vendors changes were a nice try, but break other places as not only cpu_map but much more code changes would be needed. libvirt: CPU Driver error : internal error: Unexpected element 'vendor' in CPU map '/<>/debian/build/../../src/cpu_map/arm_vendors.xml' I'm not going to pull the source changes to work fine with that. Ok to postpone that to groovy where those changes are available already. --- A new upload that worked in a local build was pushed to the PPA -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Thanks for the update. It looks like your libvirt build fails. Most likely due to the following patch missing: https://github.com/libvirt/libvirt/commit/58691208e2063285d981a620873d48ddf8df8be5 That patch adds the CooperLake test data (wrongly as CascadeLake- Server), which is later fixed in https://github.com/libvirt/libvirt/commit/3944f6855b9d4df73754bb6e5c8023d77399879b that you have partially applied. I would howver not add the CooperLake patches because focal qemu does not have the required patches (yet). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Hmm, I spoke too soon ... :-/ Some of the self tests failed due to the changes - I'll fix them up and ping again once the builds complete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Thanks for the test of the new kernel Markus! I have respun the qemu build (the old one was outdated by a massive stable update - too bad this wasn't part of 4.2.1 already) with the patches we had before applied on top. Further I have reviewed the suggested libvirt changes and added a build of that. There is another AMD SVM change which makes sense in the same context and a few more. All those are in libvirt >=6.5 and therefore already in Groovy. But in the past it turned out useful for users to get all those changes as long as they are easy to backport and not conflicting (e.g. once we had a rework there). I agree with the "Distinguish" patch and have seen that in the wild. The drawback for this kind of patches usually was that migrations from new-to-old might fail specifying features unknown to the other peer, but that is ok as it can be safely considered required to update the target before migration as well (reverse migrations always work best-effort but never are guaranteed). That would overall be this list for libvirt: 5d6059f8 cpu_map: Distinguish Cascadelake-Server from Skylake-Server 59558518 cpu_map: Introduce ARM cpu models 12eb0c94 cpu_map: Add pschange-mc-no bit in IA32_ARCH_CAPABILITIES MSR 3944f685 cpu_map: Add Cooperlake x86 CPU model 1c425857 cpu_map: Distribute x86_Cooperlake.xml df69263c cpu_map: Request test files update when adding x86 features 6ea3bb19 cpu_map: Add missing x86 features in 0x7 CPUID leaf 892b7c70 cpu_map: Add missing x86 features in 0x8008 CPUID leaf 96a39aad cpu_map: Add missing AMD SVM features The PPA [1] still is the same and now contains: - qemu 1:4.2-3ubuntu6.7~ppa1 - libvirt 6.0.0-0ubuntu8.5~ppa1 @Markus: - If you could give those builds a try on your system, that would be helpful to see if we can/should go on this way? - Further if you would not mind upstreaming your x86_EPYC-Rome.xml change (CC me please) that would be great? Adding types matching what qemu already added should be fine and it would be great to have that added upstream before continuing (we also need this in groovy before a Focal SRU). Or as an alternative if from your tests you think the libvirt build as provided in the PPA is enough (without the Rome name but with the features) as-is then we can go with that. [1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4161 [2]: branch for libvirt "bug-1887490-new-cpu-handling" -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
With the 5.4.0-49 from focal-proposed the xsaves flag can now be passed into instances. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Tags removed: verification-needed-focal ** Tags added: verification-done-focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed- focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'. If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you! ** Tags added: verification-needed-focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Correct Stefan, this is for Focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Changed in: linux (Ubuntu Focal) Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
If I understand the comments correctly this should be irrellevant for groovy/devel using a v5.8 base. ** Changed in: linux (Ubuntu Focal) Importance: Undecided => Medium ** Changed in: linux (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Thanks for Reminding Markus, it might have missed their triage completely somehow. I'll ping a few people directly about it and hopefully they will insert it into the kernel queue and state here on the bug about it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Is there anything I can do, regarding the backport of 52297436199d into focal kernel? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Plain qemu with the EPYC-Rome model works without any problems. I already get xsave, xsaveopt, xsavec and xsaveerptr with the current focal kernel, which also means that gcc finally uses znver1 (for v3) and znver2 (for Rome) optimizations. Libvirt would require cherrypicking a number of commits to enable support for all CPU flags currently supported by focal qemu and for the additional AMD flags from the mentioned patched. I currently run a private build in production with the following patches added: https://github.com/libvirt/libvirt/commits/master/src/cpu_map: - cpu_map: Distinguish Cascadelake-Server from Skylake-Server (unrelated, but recommended) - cpu_map: Add pschange-mc-no bit in IA32_ARCH_CAPABILITIES MSR - cpu_map: Request test files update when adding x86 features - cpu_map: Add missing x86 features in 0x7 CPUID leaf - cpu_map: Add missing x86 features in 0x8008 CPUID leaf Plus the attached patch which defines an EPYC-Rome type (without any tests), so not quite ready for upstream ** Attachment added: "Add-EPYC-ROME-x86-CPU-model" https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887490/+attachment/5398119/+files/Add-EPYC-ROME-x86-CPU-model -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
# Kernel It lists a bunch of depending kernel changes 40bc47b08b6e ("kvm: x86: Enumerate support for CLZERO instruction") 504ce1954fba ("KVM: x86: Expose XSAVEERPTR to the guest") 6d61e3c32248 ("kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID") 52297436199d ("kvm: svm: Update svm_xsaves_supported") 504ce1954fba is odd as it is actually committed as 41cd02c6f7f6e66e7abf02a4379e355a7db89f78. All but 52297436199d are in Focal already. But that means to be fully working we need to ask the Kernel team to consider this into the next Kernel they build for Focal. @Kernel team - what do you tihnk about adding the following patch to the focal kernel? => https://github.com/torvalds/linux/commit/52297436199d -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
# Qemu We have done similar in the past for new CPU Models - and the changes apply cleanly to the qemu 4.2 in Focal. Preliminary I have opened a PPA with the fix https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4161 And a branch containing the (trivial) backport https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+ref/bug-1887490-EPYC-v3 That PPA can already be used for preliminary testing - feedback is welcome. But there are a few extras to consider here which I'll post in following comments: -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
On Qemu I'm waiting on: a) Kernel Teams statement on backporting the commit mentioned b) some testing (by the reporter if possible) of the referred PPA builds of Qemu. Setting to incomplete until we have that. ** Changed in: qemu (Ubuntu Focal) Status: Triaged => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
# Libvirt Depending on the case sometimes libvirt also needs changes - Focal already has /usr/share/libvirt/cpu_map/x86_EPYC.xml which contains the base version and v3 will plug in there. But for "Epic-Rome" there isn't anything upstream in libvirt. I think this will therefore be non-selectable through libvirt - it will still help qemu if called directly, but if you want this we might consider poking libvirt upstream together later on (after testing if it really is missing to us int he backports). ** Also affects: libvirt (Ubuntu) Importance: Undecided Status: New ** Changed in: libvirt (Ubuntu) Status: New => Incomplete ** Changed in: libvirt (Ubuntu Focal) Status: New => Incomplete ** Also affects: linux (Ubuntu) Importance: Undecided Status: New ** Changed in: linux (Ubuntu Focal) Status: New => Confirmed ** Changed in: linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Hi Rafael, thanks for the feedback. I would consider the patches to be non- invasive, but important enough to justify an SRU. There are a similar set of patches to add the missing bits to libvirt as well, except for the EPYC-Rome model. I'll try to submit a patch upstream to add this model. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
Hello Markus, Thanks for the report. I'm subscribing @ubuntu-virt here so @paelzer can take a look at this. He is the current maintainer for qemu $ git describe --tags a16e8dbc043720abcb37fc7dca313e720b4e0f0c v4.2.0-2476-ga16e8dbc04 $ git describe --tags 143c30d4d346831a09e59e9af45afdca0331e819 v4.2.0-2477-g143c30d4d3 $ git tag --contains a16e8dbc043720abcb37fc7dca313e720b4e0f0c | sort -n v5.0.0 v5.0.0-rc0 Looks like those were added in v5.0.0-rc0 and that we could add EPYC extra CPU features and the EPYC 2nd gen CPU model to Focal indeed. Marcus I'm afraid this will take around a week or more for feedback as @paelzer is out and there are some current on-going fixes landing qemu this week. Thank you! ** Changed in: qemu (Ubuntu) Status: New => Triaged ** Changed in: qemu (Ubuntu) Status: Triaged => Fix Released ** Changed in: qemu (Ubuntu Focal) Importance: Medium => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1887490] Re: Add/Backport EPYC-v3 and EPYC-Rome CPU model
** Also affects: qemu (Ubuntu Focal) Importance: Undecided Status: New ** Changed in: qemu (Ubuntu Focal) Status: New => Triaged ** Changed in: qemu (Ubuntu Focal) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1887490 Title: Add/Backport EPYC-v3 and EPYC-Rome CPU model To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887490/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs