From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch 3] thread/core siblings info for guests Date: Sun, 16 Nov 2008 15:26:38 +0200 Message-ID: <49201F8E.9010709@redhat.com> References: <8EA2C2C4116BF44AB370468FBF85A7779B418DEF@orsmsx504.amr.corp.intel.com> <48E88C62.9030103@redhat.com> <1224283519.18637.23.camel@lnitindesktop.sc.intel.com> <48FAFE0B.5030209@redhat.com> <1225471648.1521.7.camel@lnitindesktop.sc.intel.com> <49106364.1070909@redhat.com> <1225825339.23171.25.camel@lnitindesktop.sc.intel.com> <49113F82.5050409@redhat.com> <1225931121.18973.11.camel@lnitindesktop.sc.intel.com> <4912EF2A.5030402@redhat.com> <8EA2C2C4116BF44AB370468FBF85A777A68E2655@orsmsx504.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Nakajima, Jun" , "kvm@vger.kernel.org" , "kraxel@redhat.com" , "chrisw@sous-sol.org" To: "Kamble, Nitin A" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57703 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbYKPN0v (ORCPT ); Sun, 16 Nov 2008 08:26:51 -0500 In-Reply-To: <8EA2C2C4116BF44AB370468FBF85A777A68E2655@orsmsx504.amr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Kamble, Nitin A wrote: >> The capability itself can return the count; for example >> >> case KVM_CAP_NR_CPUID_LEAVES: >> return KVM_MAX_CPUID_ENTRIES; >> >> which is simpler to use and shorter. >> > > Avi, > Yes, it is simpler and shorter, but is returning a constant. It will be wasting space for the unused entries. Also it put's a restriction that the list count can not go more than that. > The dynamic size finding, the patch I sent, is not complicated or long to be an issue. Would you like to give another consideration for the same patch (patch-3) I sent earlier? > > Oh, I confused the sizing code with something else. We can add this, but older kernels will still miss the code so we have to work around it. I guess userspace can start with a large number, and double it each time the ioctl fails. -- error compiling committee.c: too many arguments to function