@@ -1035,6 +1035,21 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
.type = CPUID_FEATURE_WORD,
.cpuid = { .eax = 0x4000000A, .reg = R_EAX, },
},
+ [FEAT_HV_NESTED_EBX] = {
+ .type = CPUID_FEATURE_WORD,
+ /* reserved */
+ .cpuid = { .eax = 0x4000000A, .reg = R_EBX, },
+ },
+ [FEAT_HV_NESTED_ECX] = {
+ .type = CPUID_FEATURE_WORD,
+ /* reserved */
+ .cpuid = { .eax = 0x4000000A, .reg = R_ECX, },
+ },
+ [FEAT_HV_NESTED_EDX] = {
+ .type = CPUID_FEATURE_WORD,
+ /* reserved */
+ .cpuid = { .eax = 0x4000000A, .reg = R_EDX, },
+ },
[FEAT_SVM] = {
.type = CPUID_FEATURE_WORD,
.feat_names = {
@@ -527,6 +527,9 @@ typedef enum FeatureWord {
FEAT_HV_RECOMM_ECX, /* CPUID[4000_0004].ECX */
FEAT_HV_RECOMM_EDX, /* CPUID[4000_0004].EDX */
FEAT_HV_NESTED_EAX, /* CPUID[4000_000A].EAX */
+ FEAT_HV_NESTED_EBX, /* CPUID[4000_000A].EBX */
+ FEAT_HV_NESTED_ECX, /* CPUID[4000_000A].ECX */
+ FEAT_HV_NESTED_EDX, /* CPUID[4000_000A].EDX */
FEAT_SVM, /* CPUID[8000_000A].EDX */
FEAT_XSAVE, /* CPUID[EAX=0xd,ECX=1].EAX */
FEAT_6_EAX, /* CPUID[6].EAX */
@@ -1274,6 +1274,9 @@ static int hyperv_handle_properties(CPUState *cs,
c = cpuid_find_entry(cpuid, HV_CPUID_NESTED_FEATURES, 0);
if (c) {
env->features[FEAT_HV_NESTED_EAX] = c->eax;
+ env->features[FEAT_HV_NESTED_EBX] = c->ebx;
+ env->features[FEAT_HV_NESTED_ECX] = c->ecx;
+ env->features[FEAT_HV_NESTED_EDX] = c->edx;
}
}
@@ -1384,6 +1387,9 @@ static int hyperv_handle_properties(CPUState *cs,
c = &cpuid_ent[cpuid_i++];
c->function = HV_CPUID_NESTED_FEATURES;
c->eax = env->features[FEAT_HV_NESTED_EAX];
+ c->ebx = env->features[FEAT_HV_NESTED_EBX];
+ c->ecx = env->features[FEAT_HV_NESTED_ECX];
+ c->edx = env->features[FEAT_HV_NESTED_EDX];
}
r = cpuid_i;
As a preparation to expanding Hyper-V CPU features early, add reserved FEAT_HV_NESTED_EBX/ECX/EDX CPUID leaves. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> --- target/i386/cpu.c | 15 +++++++++++++++ target/i386/cpu.h | 3 +++ target/i386/kvm.c | 6 ++++++ 3 files changed, 24 insertions(+)