From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 6/6] KVM: VMX: Add PML support in VMX Date: Fri, 06 Feb 2015 17:00:14 +0100 Message-ID: <54D4E50E.2080508@redhat.com> References: <1422413668-3509-1-git-send-email-kai.huang@linux.intel.com> <1422413668-3509-7-git-send-email-kai.huang@linux.intel.com> <20150203151833.GD19731@potion.redhat.com> <54D30C5D.1000402@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, linux@arm.linux.org.uk, kvm@vger.kernel.org To: Kai Huang , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57125 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752752AbbBFQAj (ORCPT ); Fri, 6 Feb 2015 11:00:39 -0500 In-Reply-To: <54D30C5D.1000402@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/02/2015 07:23, Kai Huang wrote: >>> >>> + /* PML is enabled/disabled in creating/destorying vcpu */ >>> + exec_control &= ~SECONDARY_EXEC_ENABLE_PML; >> What is the harm of enabling it here? >> >> (SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES seems similar and does it.) > > Because the PML feature detection is unconditional (meaning > SECONDARY_EXEC_ENABLE_PML is always in > vmcs_config.cpu_based_2nd_exec_ctrl), but the PML buffer is only created > when vcpu is created, and it is controlled by 'enable_pml' module > parameter, if we always enable SECONDARY_EXEC_ENABLE_PML here, no PML > buffer will be created if PML is disabled by 'enable_pml' parameter, so > it's better to enable it along with creating PML buffer. I guess this is the most interesting comment from Radim. Paolo