Add EPYC-Genoa model

Bug #2019971 reported by Markus Schade
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Kinetic
Won't Fix
Undecided
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
Mantic
Confirmed
Undecided
Unassigned
qemu (Ubuntu)
Triaged
Undecided
Sergio Durigan Junior
Jammy
Triaged
Undecided
Sergio Durigan Junior
Kinetic
Won't Fix
Undecided
Unassigned
Lunar
Triaged
Undecided
Sergio Durigan Junior
Mantic
Triaged
Undecided
Sergio Durigan Junior

Bug Description

[Impact]

 * To avoid bugs with newer Hardware and to allow users/admins to control
   the KVM guests correctly we usually try to backport major CPU-
   detect/control features back to at least the last LTS (currently jammy)
   In SRU Terms this is under the second entry in
   https://wiki.ubuntu.com/StableReleaseUpdates#Other_safe_cases

 * In this particular case it is about Support for EPYC Genoa chips
   https://en.wikipedia.org/wiki/Epyc#Fourth_generation_Epyc_(Genoa)

[Test Plan]

 * First of all we'll (and have in advance) run general regression tests

 * Second you'd want to run this with host-model and host-passthrough on
   Rome / Milan chips to ensure no case is now falling in to a totally
   dysfunctional state

 * Qemu shall show to be aware of the new types
   # qemu-system-x86_64 -cpu ? | grep EPYC-Genoa
    x86 EPYC-Genoa (alias configured by machine type)
    x86 EPYC-Genoa-v1 AMD EPYC-Genoa Processor

 * Finally migrations between old->new should be checked to work fine.

[Where problems could occur]

 * This kind of "add the new type" usually only s a problem in backward-
   migratebility which isn't supported anyway. Never the less the areas to
   look out for is behavior on various AMD EPYC chips. To ensure that old
   chips won't change in a breaking way (they might detect new features
   now, but not more) and that new Milan chips are now all detected
   properly.

[Other Info]

 * This is not the first time new AMD chips need to add their definitions,
   for example bug 1921880 was similar

----

QEMU added a separate model for EPYC-Genoa in

https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg02087.html

On the qemu side most bits are already present as far back as jammy. The only things missing are the vnmi and auto-ibrs flag.
The lfence-always-serializing, amd-psfd, no-nested-data-bp, null-sel-clr-base are part of the Milan-v2 patch set

https://github.com/qemu/qemu/commit/62a798d4bc2c3e767d94670776c77a7df274d7c5.patch
https://github.com/qemu/qemu/commit/166b1741884dd4fd7090b753cd7333868457a29b.patch

Kernel auto-ibrs et al:
https://<email address hidden>/

kvm: Add support for CPUID_80000021_EAX
* https://github.com/torvalds/linux/commit/8415a74852d7c24795007ee9862d25feb519007c.patch
kvm: Add the NO_NESTED_DATA_BP feature
* https://github.com/torvalds/linux/commit/a9dc9ec5a1fafc3d2fe7a7b594eefaeaccf89a6b.patch
kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf
* https://github.com/torvalds/linux/commit/84168ae786f8a15a7eb0f79d34f20b8d261ce2f5.patch
kvm: Add the Null Selector Clears Base feature
* https://github.com/torvalds/linux/commit/5b909d4ae59aedc711b7a432da021be0e82c95a0.patch
kvm: Add the SMM_CTL MSR not present feature
https://github.com/torvalds/linux/commit/faabfcb194a8d0686396e3fff6a5b42911f65191.patch
x86/cpu: Support AMD Automatic IBRS
https://github.com/torvalds/linux/commit/e7862eda309ecfccc36bb5558d937ed3ace07f3f.patch

KVM: Add common feature flag for AMD's PSFD
https://github.com/torvalds/linux/commit/3d8f61bf8bcd69bcd397276d53aa18f7ca8347f9.patch
Add support for virtual NMIs
https://github.com/torvalds/linux/commit/4a5fd419952e49ef870e9259d815718062871cc1.patch

Please consider adding/backporting these.

description: updated
description: updated
description: updated
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the bug report, Markus.

I noticed that bug #1921880 involved a lot of work before Christian was able to actually upload the packages. I will start taking a look at this bug and preparing the backports, hopefully by early next I should have something ready for you to test.

Changed in qemu (Ubuntu Jammy):
status: New → Triaged
Changed in qemu (Ubuntu Kinetic):
status: New → Triaged
Changed in qemu (Ubuntu Lunar):
status: New → Triaged
Changed in qemu (Ubuntu Mantic):
status: New → Triaged
Changed in qemu (Ubuntu Jammy):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in qemu (Ubuntu Kinetic):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in qemu (Ubuntu Lunar):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in qemu (Ubuntu Mantic):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Revision history for this message
Markus Schade (lp-markusschade) wrote :

Hi Sergio,

thanks for picking this up. I think this one should be done last as it builds on the patches for EPYC-Milan-v2. While the qemu patches were easy to be found, I haven't tracked down the kernel ones, yet. Also upstream libvirt is missing. I have a Genoa system to test, so trying to run just qemu on this system with the patches from #2019968 as well es this one results in:

# qemu-system-x86_64 -enable-kvm -cpu EPYC-Genoa-v1,enforce=on
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000008H:EBX.amd-psfd [bit 28]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000021H:EAX.no-nested-data-bp [bit 0]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000021H:EAX.lfence-always-serializing [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000021H:EAX.null-sel-clr-base [bit 6]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000021H:EAX.auto-ibrs [bit 8]

The #2019967 is on the other hand quite straightforward. So maybe start with this one.

description: updated
description: updated
description: updated
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

As far as I have researched, the Linux patches pointed by Markus haven't been backported to any of our kernels yet. As such, I am adding a Linux task to this bug so that the kernel team can chime in and provide some feedback as to whether these patches will be backported.

@Kernel team, could you please take a look and let us know? TIA.

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Ubuntu 22.10 (Kinetic Kudu) has reached end of life, so this bug will not be fixed for that specific release.

Changed in linux (Ubuntu Kinetic):
status: New → Won't Fix
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2019971

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Jammy):
status: New → Incomplete
Changed in linux (Ubuntu Lunar):
status: New → Incomplete
Changed in linux (Ubuntu Jammy):
status: Incomplete → New
Changed in linux (Ubuntu Lunar):
status: Incomplete → New
Changed in linux (Ubuntu Mantic):
status: Incomplete → New
Changed in qemu (Ubuntu Kinetic):
status: Triaged → Won't Fix
assignee: Sergio Durigan Junior (sergiodj) → nobody
Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Jammy):
status: New → Incomplete
Changed in linux (Ubuntu Lunar):
status: New → Incomplete
Changed in linux (Ubuntu Jammy):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Lunar):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Mantic):
status: Incomplete → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 23.04 (Lunar Lobster) has reached end of life, so this bug will not be fixed for that specific release.

Changed in linux (Ubuntu Lunar):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.