From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: xl: expose max_cpu_id from `xl info` Date: Wed, 14 Mar 2012 16:24:25 +0000 Message-ID: <4F60C639.1020307@citrix.com> References: <4F5F7B49.9040001@citrix.com> <4F5F9CCF.9000400@oracle.com> <4F6076D1.3000804@citrix.com> <4F60BDBA.3040209@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F60BDBA.3040209@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Zhigang Wang Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org >>> Is this true: nr_cpus = max_cpu_id + 1 ? >>> >>> Zhigang >> >> if and only if all cpus are online. >> >> nr_cpus is set to nr_online_cpus() in the hypercall, while max_cpu_id >> is set to nr_cpu_ids-1. >> >> nr_cpus is liable to change during runtime, while max_cpu_id is not. >> >> ~Andrew > > If this is the case, I think nr_cpus is a bit confusing. Can we make > it always representing the number of physical cpus (from hypervisor's > viewpoint, not dom0)? > > Zhigang > > No. The names here reflect the hypercall name parameters. The hypercall cant be changed because it is an ABI, and the "name : value" pairs here cant be changed because of backward compatibility with the previous toolstack. -- Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com