- if (ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) {
+ /*
+ * AMD does not need enlightened VMCS as VMCB is already a
+ * datastructure in memory.
Well, VMCS is also a structure in memory, isn't it? It's just that we
don't have a 'clean field' concept for it and we can't use normal memory
accesses.
I agree, that is a better way to consolidate both the cases.
We need to get the nestedDo I understand correctly that we can just look at CPUID.0x40000000.EAX
+ * features if SVM is enabled.
+ */
+ if (boot_cpu_has(X86_FEATURE_SVM) ||
+ ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) {
and in case it is >= 0x4000000A we can read HYPERV_CPUID_NESTED_FEATURES
leaf? I'd suggest we do that intead then.