2018-02-09 2:12 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>:
> On Thu, Feb 08, 2018 at 05:44:20PM +0800, Wanpeng Li wrote:
>> From: Wanpeng Li <wanpen...@tencent.com>
>>
>> Add PV_DEDICATED hint cpuid feature bit.
>>
> [...]
>> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
>> index d70954b..cf48931 100644
>> --- a/target/i386/cpu.c
>> +++ b/target/i386/cpu.c
>> @@ -4076,6 +4076,9 @@ static int x86_cpu_filter_features(X86CPU *cpu)
>>              x86_cpu_get_supported_feature_word(w, false);
>>          uint32_t requested_features = env->features[w];
>>          env->features[w] &= host_feat;
>> +        if (cpu->pv_dedicated && (w == FEAT_KVM)) {
>> +            env->features[w] |= CPUID_PV_DEDICATED;
>> +        }
>
> Why do this trick here instead of just adding "pv-dedicated" to
> feature_word_info[FEAT_KVM].feat_names?

Actually this hint doesn't depend on KVM, just qemu command-line gives
a hint and then guest kernel can recognize it. Is there a nicer
proposal in qemu? Paolo?

Regards,
Wanpeng Li

Reply via email to