** Description changed:

- [Environment]
- Tested platform and environments :
- * Ubuntu Jammy 22.04 LTS : 8.0.0-1ubuntu7.10 and 10.0.0-2ubuntu8.5~cloud0 
(Caracal UCA) with HWE kernel (6.8)
- * Ubuntu Noble 24.04 LTS : 10.0.0-2ubuntu8.6
- * Ubuntu Oracular 24.10 : 10.6.0-1ubuntu3.2
+ [ Impact ]
  
- Hardware :
- * HPE DL360 with Intel Xeon Gold 6542Y
+ libvirt cannot detect all features (e.g. vmx-* features) on recent Intel
+ CPUs
  
- [Issue]
- CPU is being recognised as Broadwell, thus missing either Skylake, 
Cascadelake, Icelake, SapphireRapids features.
+ [ Test Plan ]
  
- [Impact]
- It impacts deployments for any customers using Openstack with Nova and using 
any recent Intel CPU like Sapphire Rapids, Emerald Rapids, Granite Rapids and 
will prevent the user from using any instruction from anything more recent than 
Broadwell CPUs.
+ On recent Intel CPU (Granite Rapids, Sierra Forest)
  
- [Root cause]
- For SapphireRapids profile :
- 1. on 8.0.0-1ubuntu7.10 (Jammy) --> It doesn't match 
x86_SapphireRapids-noTSX.xml because of the missing feature "taa-no" (caused by 
TSX being off in the kernel, like "hle" and "rtm" features)
+ $ apt install --yes qemu-system-x86 libvirt-daemon-system libvirt-clients
+ $ virsh capabilities
  
- 2. from 10.0.0-2ubuntu8.6 (Noble), newer and even from upstream --> there 
isn't any "-noTSX.xml" profile variant available.
-    If copying the profile from x86_SapphireRapids.xml without hle, rtm and 
taa-no, the CPU gets recognised without issue by libvirt.
+ Some of the vmx-* features are missing in the features list and libvirt
+ cannot output the right CPU model name.
  
- 3. TSX is actually disabled by default on Ubuntu kernels, by enabling
- with "tsx=on" or "tsx=auto" in the kernel boot command, it allowed
- libvirt to recognise hle, rtm and taa-no features.
+ [ Where problems could occur ]
  
- [Potential improvements]
- 1. Decide what to do with TSX
-  a. it is currently disabled by default on Ubuntu's kernels and not even set 
to auto
-  It can be checked quickly by looking at the config of Ubuntu kernel like 
below :
-   $ grep TSX /boot/config-6.8.0-57-generic
-     CONFIG_X86_INTEL_TSX_MODE_OFF=y
-     # CONFIG_X86_INTEL_TSX_MODE_ON is not set
-     # CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
+ The fix only load the msr module at boot, no issue is expected to happen
+ elsewhere.
  
-  b. Ubuntu libvirt's packages from Noble 10.0.0-2ubuntu8.6, newer and even 
upstream don't include any noTSX profile for Rapids CPUs
-  --> meaning that even if we retrieve the current cpu_maps from upstream, the 
Sapphire/Emerald/Granite Rapids CPUs will never be recognised properly by 
libvirt as of now and in the future in Ubuntu.
+ [ Other Info ]
  
- 2. Add dedicated noTSX profiles for Sapphire Rapids and newer on Ubuntu 
packages and upstream
-  a. if noTSX profiles are created for Sapphire Rapids and newer, we should 
make sure the feature "taa-no" is removed as well since it will not be 
recognised with tsx=off in Ubuntu's kernels
+ 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2106791

Title:
  Emerald Rapids cannot be used as Sapphire Rapids on Ubuntu due to TSX
  features

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2106791/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to