@@ -1021,6 +1021,16 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
},
.cpuid = { .eax = 0x40000004, .reg = R_EAX, },
},
+ [FEAT_HV_RECOMM_ECX] = {
+ .type = CPUID_FEATURE_WORD,
+ /* reserved */
+ .cpuid = { .eax = 0x40000004, .reg = R_ECX, },
+ },
+ [FEAT_HV_RECOMM_EDX] = {
+ .type = CPUID_FEATURE_WORD,
+ /* reserved */
+ .cpuid = { .eax = 0x40000004, .reg = R_EDX, },
+ },
[FEAT_HV_NESTED_EAX] = {
.type = CPUID_FEATURE_WORD,
.cpuid = { .eax = 0x4000000A, .reg = R_EAX, },
@@ -524,6 +524,8 @@ typedef enum FeatureWord {
FEAT_HYPERV_ECX, /* CPUID[4000_0003].ECX */
FEAT_HYPERV_EDX, /* CPUID[4000_0003].EDX */
FEAT_HV_RECOMM_EAX, /* CPUID[4000_0004].EAX */
+ 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_SVM, /* CPUID[8000_000A].EDX */
FEAT_XSAVE, /* CPUID[EAX=0xd,ECX=1].EAX */
@@ -1267,7 +1267,10 @@ static int hyperv_handle_properties(CPUState *cs,
if (c) {
env->features[FEAT_HV_RECOMM_EAX] = c->eax;
cpu->hyperv_spinlock_attempts = c->ebx;
+ env->features[FEAT_HV_RECOMM_ECX] = c->ecx;
+ env->features[FEAT_HV_RECOMM_EDX] = c->edx;
}
+
c = cpuid_find_entry(cpuid, HV_CPUID_NESTED_FEATURES, 0);
if (c) {
env->features[FEAT_HV_NESTED_EAX] = c->eax;
@@ -1358,6 +1361,8 @@ static int hyperv_handle_properties(CPUState *cs,
c->function = HV_CPUID_ENLIGHTMENT_INFO;
c->eax = env->features[FEAT_HV_RECOMM_EAX];
c->ebx = cpu->hyperv_spinlock_attempts;
+ c->ecx = env->features[FEAT_HV_RECOMM_ECX];
+ c->edx = env->features[FEAT_HV_RECOMM_EDX];
c = &cpuid_ent[cpuid_i++];
c->function = HV_CPUID_IMPLEMENT_LIMITS;
As a preparation to expanding Hyper-V CPU features early, add reserved FEAT_HV_RECOMM_ECX/FEAT_HV_RECOMM_EDX CPUID leaves. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> --- target/i386/cpu.c | 10 ++++++++++ target/i386/cpu.h | 2 ++ target/i386/kvm.c | 5 +++++ 3 files changed, 17 insertions(+)