From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932425AbcBWEFy (ORCPT ); Mon, 22 Feb 2016 23:05:54 -0500 Received: from mga14.intel.com ([192.55.52.115]:26781 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757140AbcBWEFu (ORCPT ); Mon, 22 Feb 2016 23:05:50 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,487,1449561600"; d="scan'208";a="918942412" Subject: Re: [PATCH v3 04/11] KVM: page track: add the framework of guest page tracking To: Paolo Bonzini References: <1455449503-20993-1-git-send-email-guangrong.xiao@linux.intel.com> <1455449503-20993-5-git-send-email-guangrong.xiao@linux.intel.com> <56C6FB7A.8060706@redhat.com> Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kai.huang@linux.intel.com, jike.song@intel.com From: Xiao Guangrong Message-ID: <56CBD89F.1090202@linux.intel.com> Date: Tue, 23 Feb 2016 11:57:19 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56C6FB7A.8060706@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/19/2016 07:24 PM, Paolo Bonzini wrote: > > > On 14/02/2016 12:31, Xiao Guangrong wrote: >> #define KVM_MAX_VCPUS 255 >> #define KVM_SOFT_MAX_VCPUS 160 >> @@ -650,6 +651,7 @@ struct kvm_lpage_info { >> struct kvm_arch_memory_slot { >> struct kvm_rmap_head *rmap[KVM_NR_PAGE_SIZES]; >> struct kvm_lpage_info *lpage_info[KVM_NR_PAGE_SIZES - 1]; >> + unsigned short *gfn_track[KVM_PAGE_TRACK_MAX]; > > Please add a comment at struct kvm_mmu_page_role mentioning that the > number of role bits for shadow pages (i.e. not counting direct and > invalid) must not exceed 15 (16 thoretically risks overflow already!), > and counting the 14 bits that are in use. > Okay, good idea, it can avoid the potential issue in the future development, will do it in the next version.