[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86
From: |
Wanpeng Li |
Subject: |
Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS |
Date: |
Wed, 18 Apr 2018 09:20:29 +0800 |
2018-04-18 4:59 GMT+08:00 Eduardo Habkost <address@hidden>:
> On Tue, Apr 17, 2018 at 01:24:15AM -0700, Wanpeng Li wrote:
[.../...]
>>
>> + if (env->features[FEAT_KVM_HINTS] & KVM_HINTS_DEDICATED) {
>> + int disable_exits = kvm_check_extension(cs->kvm_state,
>> KVM_CAP_X86_DISABLE_EXITS);
>> +
>> + if (disable_exits) {
>> + disable_exits &= (KVM_X86_DISABLE_EXITS_MWAIT |
>> + KVM_X86_DISABLE_EXITS_HLT |
>> + KVM_X86_DISABLE_EXITS_PAUSE);
>> + if (env->user_features[FEAT_KVM] & KVM_PV_UNHALT) {
>> + disable_exits &= ~KVM_X86_DISABLE_EXITS_HLT;
>> + }
>
> In the future, if we decide to enable kvm-pv-unhalt by default,
> should "-cpu ...,kvm-hint-dedicated=on" disable kvm-pv-unhalt
> automatically, or should we require an explicit
> "kvm-hint-dedicated=on,kvm-pv-unhalt=off" option?
>
> For today's defaults, this patch solves the problem, only one
> thing is missing before I give my R-b: we need to clearly
> document what exactly are the consequences and requirements of
> setting kvm-hint-dedicated=on (I'm not sure if the best place for
> this is qemu-options.hx, x86_cpu_list(), or somewhere else).
What's your opinion, Paolo?
Regards,
Wanpeng Li