All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 2/4] libxl: implementing legacy xm cpuid parser
Date: Wed, 22 Sep 2010 14:45:02 +0200	[thread overview]
Message-ID: <4C99FA4E.8070504@amd.com> (raw)
In-Reply-To: <4C99F9CB.20408@amd.com>

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

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

[-- Attachment #2: dumb_multicore.patch --]
[-- Type: text/x-patch, Size: 941 bytes --]

commit a228ae7ec9f585959aebb9987861fc6482e142f1
Author: Andre Przywara <andre.przywara@amd.com>
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)) {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

      reply	other threads:[~2010-09-22 12:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 13:26 [PATCH 2/4] libxl: implementing legacy xm cpuid parser Andre Przywara
2010-09-21 15:39 ` Ian Jackson
2010-09-22 12:42   ` Andre Przywara
2010-09-22 12:45     ` Andre Przywara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C99FA4E.8070504@amd.com \
    --to=andre.przywara@amd.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.