lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/7] hyperv: Detect Nested virtualization support for SVM
From
Date
Hi Vitaly,

On 4/8/21 7:06 AM, Vitaly Kuznetsov wrote:
> - 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.

Yes, you are right. I was referring to the fact that we cant use normal
memory accesses, but is a bit mis-worded.

>
>> We need to get the nested
>> + * features if SVM is enabled.
>> + */
>> + if (boot_cpu_has(X86_FEATURE_SVM) ||
>> + ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) {
> Do I understand correctly that we can just look at CPUID.0x40000000.EAX
> and in case it is >= 0x4000000A we can read HYPERV_CPUID_NESTED_FEATURES
> leaf? I'd suggest we do that intead then.
I agree, that is a better way to consolidate both the cases.
Will change it in the next iteration. Probably the above code
comment is not needed when we consolidate the cases here.

Thanks,
Vineeth

\
 
 \ /
  Last update: 2021-04-08 15:16    [W:0.070 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site