* [patch] cpuid size for x86_64
@ 2005-05-31 19:27 Scott Parish
0 siblings, 0 replies; only message in thread
From: Scott Parish @ 2005-05-31 19:27 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
As far as i can tell, cpuid only ever uses the first 32 bits for
result flags. In any case, x86_capability was defined as a long, but
constant_test_bit() was typecasting to an int before doing an array
dereference, so other then x86_capability[0] we were looking at the
wrong bits. (noticed when NX was not being detected)
sRp
--
Scott Parish
Signed-off-by: srparish@us.ibm.com
[-- Attachment #2: cpuid.diff --]
[-- Type: text/plain, Size: 1727 bytes --]
diff -rN -u -p old-xen-64-4/xen/arch/x86/cpu/common.c new-xen-64-4/xen/arch/x86/cpu/common.c
--- old-xen-64-4/xen/arch/x86/cpu/common.c 2005-05-31 16:15:06.000000000 +0000
+++ new-xen-64-4/xen/arch/x86/cpu/common.c 2005-05-31 19:06:17.000000000 +0000
@@ -331,7 +331,7 @@ void __init identify_cpu(struct cpuinfo_
#ifdef NOISY_CAPS
printk(KERN_DEBUG "CPU: After generic identify, caps:");
for (i = 0; i < NCAPINTS; i++)
- printk(" %08lx", c->x86_capability[i]);
+ printk(" %08x", c->x86_capability[i]);
printk("\n");
#endif
@@ -340,7 +340,7 @@ void __init identify_cpu(struct cpuinfo_
#ifdef NOISY_CAPS
printk(KERN_DEBUG "CPU: After vendor identify, caps:");
for (i = 0; i < NCAPINTS; i++)
- printk(" %08lx", c->x86_capability[i]);
+ printk(" %08x", c->x86_capability[i]);
printk("\n");
#endif
}
@@ -395,7 +395,7 @@ void __init identify_cpu(struct cpuinfo_
#ifdef NOISY_CAPS
printk(KERN_DEBUG "CPU: After all inits, caps:");
for (i = 0; i < NCAPINTS; i++)
- printk(" %08lx", c->x86_capability[i]);
+ printk(" %08x", c->x86_capability[i]);
printk("\n");
#endif
/*
diff -rN -u -p old-xen-64-4/xen/include/asm-x86/processor.h new-xen-64-4/xen/include/asm-x86/processor.h
--- old-xen-64-4/xen/include/asm-x86/processor.h 2005-05-31 16:15:06.000000000 +0000
+++ new-xen-64-4/xen/include/asm-x86/processor.h 2005-05-31 19:03:35.000000000 +0000
@@ -155,7 +155,7 @@ struct cpuinfo_x86 {
char hard_math;
char rfu;
int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */
- unsigned long x86_capability[NCAPINTS];
+ unsigned int x86_capability[NCAPINTS];
char x86_vendor_id[16];
char x86_model_id[64];
int x86_cache_size; /* in KB - valid for CPUS which support this
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-31 19:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-31 19:27 [patch] cpuid size for x86_64 Scott Parish
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.