This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH 2/4] libxl: implementing legacy xm cpuid parser

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/4] libxl: implementing legacy xm cpuid parser
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Wed, 22 Sep 2010 14:45:02 +0200
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Sep 2010 05:46:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C99F9CB.20408@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C98B294.4000909@xxxxxxx> <19608.53676.446126.946833@xxxxxxxxxxxxxxxxxxxxxxxx> <4C99F9CB.20408@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20090820)
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.


Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
commit a228ae7ec9f585959aebb9987861fc6482e142f1
Author: Andre Przywara <andre.przywara@xxxxxxx>
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)) {
Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>