Emerald Rapids cannot be used as Sapphire Rapids on Ubuntu due to TSX features
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Confirmed
|
Undecided
|
Hector CAO | ||
Noble |
Confirmed
|
Undecided
|
Hector CAO | ||
Oracular |
Won't Fix
|
Undecided
|
Hector CAO | ||
Plucky |
Confirmed
|
Undecided
|
Hector CAO | ||
Questing |
Confirmed
|
Undecided
|
Hector CAO |
Bug Description
[ Impact ]
* libvirt cannot detect all features (e.g. vmx-* features) on recent Intel CPUs
* The reason is that it tries to read msr content which without the msr module
(or builtin) being loaded will not deliver the right results, leading
to mis-detect and mis to use features a CPU would have
* Load the module at boot and install to overcome that
[ Test Plan ]
On recent Intel CPU (Granite Rapids, Sierra Forest)
$ apt install --yes qemu-system-x86 libvirt-
# For the module, should be loaded
$ lsmod | grep msr
For the actual now better output detecting CPU features in libvirt
$ virsh capabilities
Some of the vmx-* features are missing in the features list and libvirt cannot output the right CPU model name. Be aware that capabilities can be cached,
so if you want to also compare with/without loaded module you need to clean the cache.
[ Where problems could occur ]
The fix only loads the msr module at boot and on install of libvirt.
Doing so is a no-op other than the bit of memory usage.
No issue is expected to happen elsewhere, if anything then something else
that also behaves differently if that is loaded or not, but we'd not be aware of such a program - and if they insist on not having it loaded it can be blocked in module configuration.
[ Other Info ]
Recently, some x86 features (vmx-*) are listed as part of the MSR registers instead of the traditional CPUID instruction.
The MSR is exposed to userspace via device /dev/cpu/*/msr managed by the MSR kernel module
As of now, this kernel module is not loaded by default on Ubuntu, as a consequence, libvirt cannot access the MSR registers and is unable to detect some of the CPU features.
Related branches
- Christian Ehrhardt (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 82 lines (+51/-0)4 files modifieddebian/changelog (+8/-0)
debian/libvirt0.postinst (+34/-0)
debian/local/modules-load.conf (+1/-0)
debian/rules (+8/-0)
- Christian Ehrhardt: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 84 lines (+53/-0)4 files modifieddebian/changelog (+9/-0)
debian/libvirt0.postinst (+34/-0)
debian/local/modules-load.conf (+1/-0)
debian/rules (+9/-0)
- Christian Ehrhardt (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 84 lines (+53/-0)4 files modifieddebian/changelog (+9/-0)
debian/libvirt0.postinst (+34/-0)
debian/local/modules-load.conf (+1/-0)
debian/rules (+9/-0)
- Christian Ehrhardt (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 82 lines (+51/-0)4 files modifieddebian/changelog (+9/-0)
debian/libvirt0.postinst (+34/-0)
debian/local/modules-load.conf (+1/-0)
debian/rules (+7/-0)
- Christian Ehrhardt (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 82 lines (+52/-0)4 files modifieddebian/changelog (+9/-0)
debian/libvirt0.postinst (+34/-0)
debian/local/modules-load.conf (+1/-0)
debian/rules (+8/-0)
description: | updated |
summary: |
- Support for Emerald Rapids is missing, related to TSX + Emerald Rapids cannot be recognised as Sapphire Rapids due to TSX + features |
summary: |
- Emerald Rapids cannot be recognised as Sapphire Rapids due to TSX + Emerald Rapids cannot be used as Sapphire Rapids on Ubuntu due to TSX features |
description: | updated |
tags: | added: server-triage-discuss |
tags: | removed: server-triage-discuss |
description: | updated |
Changed in libvirt (Ubuntu): | |
assignee: | nobody → Hector CAO (hectorcao) |
Changed in libvirt (Ubuntu Plucky): | |
assignee: | nobody → Hector CAO (hectorcao) |
Changed in libvirt (Ubuntu Noble): | |
assignee: | nobody → Hector CAO (hectorcao) |
Changed in libvirt (Ubuntu Oracular): | |
assignee: | nobody → Hector CAO (hectorcao) |
description: | updated |
Hey hector, I subscribed you as this is all related to the topic you already work on.