Add missing cpu feature bits in EPYC-Rome model
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* IBRS was forgotten in the initial Rome type definitions.
On one hand that makes the feature non exposed/
other it can lead to crashes like bug 1915063
* backport changes to teach:
- qemu about the IBRS feature existing in Rome chips and making it the
new default (-v2 and unspecified) type
- libvirt about the IBRS feature existign for that CPU
[Test Plan]
* First of all we'll (and have in advance) run general regression tests
* Qemu should list the new type (and the old one)
# qemu-system-x86_64 -cpu ? | grep EPYC-Rome
x86 EPYC-Rome (alias configured by machine type)
x86 EPYC-Rome-v1 AMD EPYC-Rome Processor
x86 EPYC-Rome-v2 AMD EPYC-Rome Processor
* Libvirt with the fix has the ability to control ibrs for Rome chips.
For example on a post Naples Epyc chip this is what host-model expands
(in my example) to - the exact list depends on your chip:
<cpu mode='custom' match='exact' check='full'>
<model fallback=
<vendor>
<feature policy='require' name='pcid'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='tsc-
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='invpcid'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='vaes'/>
<feature policy='require' name='vpclmulqdq'/>
<feature policy='require' name='fsrm'/>
<feature policy='require' name='spec-ctrl'/>
<feature policy='require' name='stibp'/>
<feature policy='require' name='arch-
<feature policy='require' name='ssbd'/>
<feature policy='require' name='xsaves'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='amd-ssbd'/>
<feature policy='require' name='virt-ssbd'/>
<feature policy='require' name='rdctl-no'/>
<feature policy='require' name='skip-
<feature policy='require' name='mds-no'/>
<feature policy='require' name='pschange-
<feature policy='require' name='topoext'/>
</cpu>
Neither the named type nor the added features define IBRS
Even if one manually adds
<feature policy='require' name='ibrs'/>
You'd get
error: unsupported configuration: unknown CPU feature: ibrs
With the fixes in place libvirt knows what bit to check and qemu can
(on the new v2) control that flag.
The above does no more return an error with the fix
[Where problems could occur]
* There are two areas to look at
a) compat behavior on old systems - e.g. libvirt would now detect IBRS
on such AMD chips and one might wonder about the change.
E.g. compatibility would exist between old-code/
code; but any action (e.g. suspend resume) from new to old code
might run into trouble (not supported that way but worth to mention
for awareness)
b) Migrations between systems - this should be covered by chip
versioning but still is worth to mention. Versioning will recognize
a formerly started system as v1 and continue to handle it that way.
Only new started guests would become v2 and behave the new and
improved way.
[Other Info]
* n/a
---
The EPYC-Rome model is missing the IBRS and SSBD flags due to an oversight
https:/
They have been added as a EPYC-Rome-v2 in
https:/
This patch depends on the IBRS and AMD SSBD definitions that were added as part of the EPYC-Milan patch:
https:/
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 8d599bb5b8.
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -816,8 +816,12 @@ typedef uint64_t FeatureWordArra
#define CPUID_8000_
/* Indirect Branch Prediction Barrier */
#define CPUID_8000_
+/* Indirect Branch Restricted Speculation */
+#define CPUID_8000_
/* Single Thread Indirect Branch Predictors */
#define CPUID_8000_
+/* Speculative Store Bypass Disable */
+#define CPUID_8000_
Related branches
- Robie Basak: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 423 lines (+371/-0)8 files modifieddebian/changelog (+10/-0)
debian/patches/series (+6/-0)
debian/patches/ubuntu/lp-1921754-cpumap-Add-support-for-ibrs-CPU-feature.patch (+59/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Add-EPYC-Milan-x86-CPU-model.patch (+136/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Fix-spelling-of-svme-addr-chk-feature.patch (+63/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Install-x86_EPYC-Milan.xml.patch (+31/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-sync_qemu_i386.py-Add-mapping-for-svme-addr-.patch (+33/-0)
debian/patches/ubuntu/lp-1921880-cpumap-Add-support-for-svme-addr-check-CPU-feature.patch (+33/-0)
- Robie Basak: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 380 lines (+346/-0)5 files modifieddebian/changelog (+10/-0)
debian/patches/series (+3/-0)
debian/patches/ubuntu/lp-1921754-Add-missing-cpu-feature-bits-in-EPYC-Rome-model.patch (+46/-0)
debian/patches/ubuntu/lp-1921880-i386-Add-the-support-for-AMD-EPYC-3rd-generation-pro.patch (+204/-0)
debian/patches/ubuntu/lp-1921880-x86-cpu-Populate-SVM-CPUID-feature-bits.patch (+83/-0)
- Robie Basak: Approve (sru)
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 452 lines (+400/-0)8 files modifieddebian/changelog (+10/-0)
debian/patches/series (+6/-0)
debian/patches/ubuntu/lp-1921754-cpumap-Add-support-for-ibrs-CPU-feature.patch (+59/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Add-EPYC-Milan-x86-CPU-model.patch (+129/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Add-support-for-fsrm-CPU-feature.patch (+73/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Fix-spelling-of-svme-addr-chk-feature.patch (+51/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Install-x86_EPYC-Milan.xml.patch (+39/-0)
debian/patches/ubuntu/lp-1921880-cpumap-Add-support-for-svme-addr-check-CPU-feature.patch (+33/-0)
- Robie Basak: Approve (sru)
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 428 lines (+388/-0)6 files modifieddebian/changelog (+10/-0)
debian/patches/series (+4/-0)
debian/patches/ubuntu/lp-1921754-Add-missing-cpu-feature-bits-in-EPYC-Rome-model.patch (+45/-0)
debian/patches/ubuntu/lp-1921880-i386-Add-the-support-for-AMD-EPYC-3rd-generation-pro.patch (+198/-0)
debian/patches/ubuntu/lp-1921880-target-i386-add-fast-short-REP-MOV-support.patch (+48/-0)
debian/patches/ubuntu/lp-1921880-x86-cpu-Populate-SVM-CPUID-feature-bits.patch (+83/-0)
- Robie Basak: Approve (sru)
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 435 lines (+395/-0)6 files modifieddebian/changelog (+10/-0)
debian/patches/series (+4/-0)
debian/patches/ubuntu/lp-1921754-Add-missing-cpu-feature-bits-in-EPYC-Rome-model.patch (+46/-0)
debian/patches/ubuntu/lp-1921880-i386-Add-the-support-for-AMD-EPYC-3rd-generation-pro.patch (+204/-0)
debian/patches/ubuntu/lp-1921880-target-i386-add-fast-short-REP-MOV-support.patch (+48/-0)
debian/patches/ubuntu/lp-1921880-x86-cpu-Populate-SVM-CPUID-feature-bits.patch (+83/-0)
- Robie Basak: Approve (sru)
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 7404 lines (+7112/-0)48 files modifieddebian/changelog (+12/-0)
debian/patches/series (+46/-0)
debian/patches/ubuntu/lp-1921754-cpumap-Add-support-for-ibrs-CPU-feature.patch (+59/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Add-EPYC-Milan-x86-CPU-model.patch (+129/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Add-support-for-fsrm-CPU-feature.patch (+73/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Fix-spelling-of-svme-addr-chk-feature.patch (+51/-0)
debian/patches/ubuntu/lp-1921880-cpu_map-Install-x86_EPYC-Milan.xml.patch (+39/-0)
debian/patches/ubuntu/lp-1921880-cpumap-Add-support-for-svme-addr-check-CPU-feature.patch (+33/-0)
debian/patches/ubuntu/lp-1922907-cleanup-test-data.patch (+28/-0)
debian/patches/ubuntu/lp-1922907-cpu_map-Distinguish-Cascadelake-Server-from-Skylake-.patch (+151/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Add-support-for-stepping-part-of-CPU-signatu.patch (+180/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Don-t-check-return-value-of-x86ModelCopy.patch (+71/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Drop-noTSX-hint-for-incompatible-CPUs.patch (+99/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Introduce-virCPUx86SignatureFromCPUID.patch (+68/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Introduce-virCPUx86SignaturesFree.patch (+61/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Move-and-rename-x86FormatSignatures.patch (+85/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Move-and-rename-x86ModelCopySignatures.patch (+97/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Move-and-rename-x86ModelHasSignature.patch (+98/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Replace-32b-signatures-in-virCPUx86Model-wit.patch (+317/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86Baseline.patch (+157/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86CheckFeature.patch (+51/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86Compare.patch (+66/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86CopyMigratable.patch (+51/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86DataParse.patch (+84/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86ExpandFeatures.patch (+83/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86GetHost.patch (+68/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86LoadMap.patch (+48/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86Translate.patch (+82/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86Update.patch (+70/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-virCPUx86UpdateLive.patch (+101/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86Compute.patch (+178/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86DataToCPU.patch (+68/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86Decode.patch (+96/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86Encode.patch (+138/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86EncodePolicy.patch (+43/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86FeatureParse.patch (+112/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86ModelFromCPU.patch (+71/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86ModelParse.patch (+77/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86UpdateHostModel.patch (+68/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-g_auto-in-x86VendorParse.patch (+73/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-for-virCPU-x86-Data.patch (+142/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-for-virCPUx86Feature.patch (+71/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-for-virCPUx86Map.patch (+66/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-for-virCPUx86Model.patch (+100/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-for-virCPUx86Vendor.patch (+50/-0)
debian/patches/ubuntu/lp-1922907-cpu_x86-Use-glib-allocation-in-virCPUx86GetModels.patch (+49/-0)
debian/patches/ubuntu/lp-1922907-cputest-Add-data-for-Intel-R-Xeon-R-Gold-6130-CPU.patch (+1460/-0)
debian/patches/ubuntu/lp-1922907-cputest-Add-data-for-Intel-R-Xeon-R-Platinum-9242-CP.patch (+1692/-0)
Changed in qemu (Ubuntu Groovy): | |
status: | New → Triaged |
Changed in libvirt (Ubuntu Groovy): | |
status: | New → Triaged |
Changed in qemu (Ubuntu Focal): | |
status: | New → Triaged |
Changed in libvirt (Ubuntu Focal): | |
status: | New → Triaged |
description: | updated |
description: | updated |
tags: |
added: verification-done-hirsute removed: verification-needed-hirsute |
Libvirt support for IBRS
https:/ /gitlab. com/libvirt/ libvirt/ -/commit/ 5c17a7ba41670f3 182186c06e62199 5b5d03fc95. patch