
Checking for the presence of Intel virtualization (VMX) help and it being enabled may be simply achieved by wanting on the flags in /proc/cpuinfo. However up to now AMD virtualization (SVM) has all the time been proven to user-space through /proc/cpuinfo even when the BIOS/platform has disabled SVM performance. Lastly for Linux 6.7 this oversight is being corrected.
Starting with the upcoming Linux 6.7 kernel cycle — although doubtlessly back-ported as a repair to present kernel sequence — is a patch from Crimson Hat to not promote SVM through /proc/cpuinfo for circumstances the place SVM is disabled within the BIOS. This matches the conduct of Intel VMX not showing through /proc/cpuinfo both when it has been disabled by the platform/BIOS, which makes it a lot simpler to verify if virtualization is out there through this handy and widely-used interface.
This patch by Crimson Hat’s Paolo Bonzini has been queued into TIP’s x86/cpu department forward of the Linux 6.7 merge window arising in about one month. For AMD (and Hygon) processors it’s going to now learn the suitable MSR to confirm whether or not SVM has been disabled — and in that case to clear the CPU functionality so it will not present in /proc/cpuinfo. To date the one indication of AMD SVM being disabled by the BIOS was showing within the kernel log — or just KVM virtualization failing to work. A small however helpful change.
