From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH 2/4] libxl: implementing legacy xm cpuid parser Date: Wed, 22 Sep 2010 14:45:02 +0200 Message-ID: <4C99FA4E.8070504@amd.com> References: <4C98B294.4000909@amd.com> <19608.53676.446126.946833@mariner.uk.xensource.com> <4C99F9CB.20408@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030606040104080601040902" Return-path: In-Reply-To: <4C99F9CB.20408@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Ian Campbell , xen-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --------------030606040104080601040902 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Andre Przywara wrote: > ... > To see the direction I am going to I attached the first draft version of > my upcoming multicore patch. This uses the interface provided by > libxl_cpuid_parse_config(). IMHO this is a very readable and > maintainable approach, and it can be overridden by cpuid lines (or > forced again later by being called after the cpuid= parsing). Now actually attached. Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 448-3567-12 --------------030606040104080601040902 Content-Type: text/x-patch; name="dumb_multicore.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dumb_multicore.patch" commit a228ae7ec9f585959aebb9987861fc6482e142f1 Author: Andre Przywara Date: Fri Sep 17 14:22:04 2010 +0200 first version of multicore patch diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 2c90c2b..e633c7b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1012,6 +1012,17 @@ skip_vfb: } } + if (!xlu_cfg_get_long (config, "nr_cores", &l)) { + char str[32]; + + snprintf(str, 32, "proccount=%ld", l); + libxl_cpuid_parse_config(&b_info->cpuid, str); + snprintf(str, 32, "nc=%ld", l - 1); + libxl_cpuid_parse_config(&b_info->cpuid, str); + libxl_cpuid_parse_config(&b_info->cpuid, "htt=1"); + libxl_cpuid_parse_config(&b_info->cpuid, "cmplegcay=1"); + } + switch (xlu_cfg_get_type(config, "cpuid")) { case XLU_CFG_LIST: if (!xlu_cfg_get_list(config, "cpuid", &cpuids, 0)) { --------------030606040104080601040902 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030606040104080601040902--