SEV-enabled guest is from 1 to a maximum value defined via CPUID
Fn8000_001f[ECX].
I'd rewrite that to:
"The range of allowed SEV guest ASIDs is [1 - CPUID_8000_001F[ECX][31:0]]".
+/* Secure Encrypted Virtualization */
If anything, this comment should explain what that variable is.
Basically the comment you have in sev_hardware_setup() now.
max_sev_asid is static and it is already initialized to 0 and thus this
function can be simplified to:
/*
* Get maximum number of encrypted guest supported: Fn8001_001F[ECX].
* [31:0]: Number of supported guests.
*/
static __init void sev_hardware_setup(void)
{
max_sev_asid = cpuid_ecx(0x8000001F);
}