On Mon, Feb 22, 2016 at 09:02:10PM +0000, Joao Martins wrote: > Introduce internal cpuid routine for setting the topology > as seen by the guest. The topology is made based on > leaf 1 and leaf 4 for Intel, more specifically setting: > > Number of logical processors: > proccount (CPUID.1:EBX[16:24]) > > Number of physical cores - 1: > procpkg (CPUID.(4,0):EBX[26:32]) > > cache core count - 1: > proccountX (CPUID.(4,Y):EBX[14:26]) > > given that X is l1d, l1i, l2 or l3 > and Y the correspondent subleave [0-3] > > Signed-off-by: Joao Martins <joao.m.mart...@oracle.com> > --- > CC: Ian Jackson <ian.jack...@eu.citrix.com> > CC: Stefano Stabellini <stefano.stabell...@eu.citrix.com> > CC: Ian Campbell <ian.campb...@citrix.com> > CC: Wei Liu <wei.l...@citrix.com> > --- > tools/libxl/libxl_cpuid.c | 38 ++++++++++++++++++++++++++++++++++++++ > tools/libxl/libxl_internal.h | 2 ++ > 2 files changed, 40 insertions(+) > > diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c > index deb81d2..e220566 100644 > --- a/tools/libxl/libxl_cpuid.c > +++ b/tools/libxl/libxl_cpuid.c > @@ -352,6 +352,44 @@ void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, > (const char**)(cpuid[i].policy), cpuid_res); > } > > +static int libxl_cpuid_parse_list(libxl_cpuid_policy_list *topo, > + char **keys, int *vals, size_t sz)
Just call it cpuid_parse_list is fine. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel