From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS Date: Thu, 19 Apr 2018 17:48:57 +0200 Message-ID: <02887fa6-d7c8-bc39-6e65-3c3caec5b903@redhat.com> References: <1523953455-28053-1-git-send-email-wanpengli@tencent.com> <20180417205913.GC29865@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: Eduardo Habkost , Wanpeng Li Return-path: In-Reply-To: <20180417205913.GC29865@localhost.localdomain> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On 17/04/2018 22:59, Eduardo Habkost wrote: >> + if (disable_exits) { >> + disable_exits &=3D (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 &=3D ~KVM_X86_DISABLE_EXITS_HLT; >> + } > > In the future, if we decide to enable kvm-pv-unhalt by default, > should "-cpu ...,kvm-hint-dedicated=3Don" disable kvm-pv-unhalt > automatically, or should we require an explicit > "kvm-hint-dedicated=3Don,kvm-pv-unhalt=3Doff" option? It should be automatic. > 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=3Don (I'm not sure if the best place for > this is qemu-options.hx, x86_cpu_list(), or somewhere else). I don't think we have a good place for this kind of documentation, unfortunately. Right now it is mentioned in Documentation/virtual/kvm/cpuid.txt. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9BoB-0007jU-JB for qemu-devel@nongnu.org; Thu, 19 Apr 2018 11:49:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9Bo5-0008Ot-NS for qemu-devel@nongnu.org; Thu, 19 Apr 2018 11:49:15 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49784 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f9Bo5-0008Gv-H5 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 11:49:09 -0400 References: <1523953455-28053-1-git-send-email-wanpengli@tencent.com> <20180417205913.GC29865@localhost.localdomain> From: Paolo Bonzini Message-ID: <02887fa6-d7c8-bc39-6e65-3c3caec5b903@redhat.com> Date: Thu, 19 Apr 2018 17:48:57 +0200 MIME-Version: 1.0 In-Reply-To: <20180417205913.GC29865@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Wanpeng Li Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= On 17/04/2018 22:59, Eduardo Habkost wrote: >> + if (disable_exits) { >> + disable_exits &=3D (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 &=3D ~KVM_X86_DISABLE_EXITS_HLT; >> + } > > In the future, if we decide to enable kvm-pv-unhalt by default, > should "-cpu ...,kvm-hint-dedicated=3Don" disable kvm-pv-unhalt > automatically, or should we require an explicit > "kvm-hint-dedicated=3Don,kvm-pv-unhalt=3Doff" option? It should be automatic. > 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=3Don (I'm not sure if the best place for > this is qemu-options.hx, x86_cpu_list(), or somewhere else). I don't think we have a good place for this kind of documentation, unfortunately. Right now it is mentioned in Documentation/virtual/kvm/cpuid.txt. Paolo