[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 5/5] xen: Use cpu_present_map instead of cpu_online_map



Newer Xen versions (at least 4.2) clear cpu_online_map during crash.
In this case it is not possible to check which CPUs were available.
cpu_present_map contains such information but it has different meaning.
However, we do not have a choice and we must use cpu_present_map instead
of cpu_online_map.

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>

diff -Npru crash-6.1.0.orig/xen_hyper.c crash-6.1.0/xen_hyper.c
--- crash-6.1.0.orig/xen_hyper.c        2012-11-13 15:08:41.000000000 +0100
+++ crash-6.1.0/xen_hyper.c     2012-11-13 15:09:03.000000000 +0100
@@ -1912,11 +1912,10 @@ xen_hyper_get_cpu_info(void)
        if((xht->cpumask = malloc(XEN_HYPER_SIZE(cpumask_t))) == NULL) {
                error(FATAL, "cannot malloc cpumask space.\n");
        }
-       /* kakuma: It may be better to use cpu_present_map. */
-       addr = symbol_value("cpu_online_map");
+       addr = symbol_value("cpu_present_map");
        if (!readmem(addr, KVADDR, xht->cpumask,
-               XEN_HYPER_SIZE(cpumask_t), "cpu_online_map", RETURN_ON_ERROR)) {
-               error(FATAL, "cannot read cpu_online_map.\n");
+               XEN_HYPER_SIZE(cpumask_t), "cpu_present_map", RETURN_ON_ERROR)) 
{
+               error(FATAL, "cannot read cpu_present_map.\n");
        }
        if (xht->cpu_idxs) {
                free(xht->cpu_idxs);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.