From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] tools/libxc: Improve efficiency of xc_cpuid_apply_policy() Date: Wed, 7 Oct 2015 12:52:29 +0100 Message-ID: <1444218749.1410.21.camel@citrix.com> References: <1444050737-8437-1-git-send-email-andrew.cooper3@citrix.com> <20151006091457.GP29124@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151006091457.GP29124@zion.uk.xensource.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: Wei Liu , Andrew Cooper Cc: Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, 2015-10-06 at 10:14 +0100, Wei Liu wrote: > On Mon, Oct 05, 2015 at 02:12:17PM +0100, Andrew Cooper wrote: > > Having the internals of xc_cpuid_policy() make hypercalls to collect > > domain > > information causes xc_cpuid_apply_policy() to be very inefficient. > > > > Re-order operations to collect all information at once at the outermost > > layer, > > and pass a structure in to all cpuid policy generation functions. > > > > This removes several hypercalls (4 from HVM, 3 from PV) for each of the > > up-to 108 leaves processed. > > > > No change in the eventual policy provided, although all the information > > gathering how has (or has correct) error checking. > > > > Signed-off-by: Andrew Cooper > > --- > > CC: Ian Campbell > > CC: Ian Jackson > > CC: Wei Liu > > Acked-by: Wei Liu Applied. > > + /* PV-only information. */ > > + bool pv64; > > + > > + /* HVM-only infomation. */ Typo fixed > > + bool pae; > > + bool nestedhvm; > > I would have used union for these fields. But I don't want to bikeshed > too much on this. Definitely not a blocker for this patch. :-) Indeed. Ian.