How to read MSR's from mutiple processors at one time

Suppose I have 48 logical processors and want to read MSR say 0x1234 then one way is keep doing ~# and doing rdmsr 0x1234 on 48 of them. However I recall I could read all the 48 processors MSR with one command like ~*rdmsr 0x1234 it would recursively read MSR 0x1234 on all processors. I have done it just cant recall it now:(. Can somebody help me? thanks

I think you must have a look at Laboskopia Scripts. They work quite well…

http://www.laboskopia.com/php/outils.php (download the second link) and use
display_msrs script

Best Regards,

*Emre TINAZTEPE***

On Fri, Oct 28, 2011 at 2:04 AM, wrote:

> Suppose I have 48 logical processors and want to read MSR say 0x1234 then
> one way is keep doing ~# and doing rdmsr 0x1234 on 48 of them. However I
> recall I could read all the 48 processors MSR with one command like ~*rdmsr
> 0x1234 it would recursively read MSR 0x1234 on all processors. I have done
> it just cant recall it now:(. Can somebody help me? thanks
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

My suspiction would be that you have a driver thread that changes its
thread affinity across all the processors, but there may another answer.
But that’s the first thing I would try when confronted with this question
(there may be a DDI call that does this)

I thihk you might be able to use one of the threads in the thread pool,
providing you reset that affinity mask to its original state. But it
strikes me that this might be contraindicated because you are messing with
areas that are probably best left untouched.
joe

Suppose I have 48 logical processors and want to read MSR say 0x1234 then
one way is keep doing ~# and doing rdmsr 0x1234 on 48 of them. However I
recall I could read all the 48 processors MSR with one command like
~*rdmsr 0x1234 it would recursively read MSR 0x1234 on all processors. I
have done it just cant recall it now:(. Can somebody help me? thanks


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

pavel lebedensky the other day illustrated some bruteforce debugging
using x *!*ip* wildcard to find the ip address

applying the same logic :slight_smile: i tried to see if there is anything related
to num of processors avl in taget

seems nt!keNumberprocessors is avl not sure atleast it is 1 for
uniprocessor in my present lap

so i cranked a script that might possibly loop through the the number
f processer and might spit out the msr registers :slight_smile:

check and see if it works

kd> .for (r $t0 = 0; $t0 < poi(nt!KeNumberProcessors) ; r $t0 = $t0+1)
{ .block {||[$t0] }; rdmsr 0x176}
. 0 Remote KD:
KdSrv:Server=@{},Trans=@{COM:Port=\.\pipe\debugPipe,Baud=19200,Pipe,Timeout=4000}
msr[176] = 00000000`804de6f0

after i wrote this i google to see what the variable is and it seems
it is obsolete in vista+
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552975(v=vs.85).aspx

The KeNumberProcessors kernel variable is obsolete in Windows Vista
SP1, Windows Server 2008, and later versions of Windows.
KeNumberProcessors does not appear in WDK headers for WDK releases
starting with Windows Vista SP1; however, the variable is still
exported from the kernel, so drivers built for earlier platforms will
not break.

On 10/28/11, xxxxx@flounder.com wrote:
> My suspiction would be that you have a driver thread that changes its
> thread affinity across all the processors, but there may another answer.
> But that’s the first thing I would try when confronted with this question
> (there may be a DDI call that does this)
>
>
> I thihk you might be able to use one of the threads in the thread pool,
> providing you reset that affinity mask to its original state. But it
> strikes me that this might be contraindicated because you are messing with
> areas that are probably best left untouched.
> joe
>
>> Suppose I have 48 logical processors and want to read MSR say 0x1234 then
>> one way is keep doing ~# and doing rdmsr 0x1234 on 48 of them. However I
>> recall I could read all the 48 processors MSR with one command like
>> ~*rdmsr 0x1234 it would recursively read MSR 0x1234 on all processors. I
>> have done it just cant recall it now:(. Can somebody help me? thanks
>>
>> —
>> WINDBG is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


thanks and regards

raj_r

>My suspiction would be that you have a driver thread that changes its

thread affinity across all the processors

The OP wants to be able to do this from a kernel debug session, not from a
driver. So, a WinDBG script or a debugger extension are the ways to go here
(as recommended by the list).

-scott


Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@windbg…

My suspiction would be that you have a driver thread that changes its
thread affinity across all the processors, but there may another answer.
But that’s the first thing I would try when confronted with this question
(there may be a DDI call that does this)

I thihk you might be able to use one of the threads in the thread pool,
providing you reset that affinity mask to its original state. But it
strikes me that this might be contraindicated because you are messing with
areas that are probably best left untouched.
joe

Suppose I have 48 logical processors and want to read MSR say 0x1234 then
one way is keep doing ~# and doing rdmsr 0x1234 on 48 of them. However I
recall I could read all the 48 processors MSR with one command like
~*rdmsr 0x1234 it would recursively read MSR 0x1234 on all processors. I
have done it just cant recall it now:(. Can somebody help me? thanks


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

“raj_r” wrote in message news:xxxxx@windbg…

The KeNumberProcessors kernel variable is obsolete in Windows Vista
SP1, Windows Server 2008, and later versions of Windows.

It’s obsolete because the number of processors may change during runtime, so
in a driver the number of processors is essentially useless. In something
like a WinDBG script though it’s probably fine because the machine state is
frozen at that point anyway (assuming that the variable continues to exist,
of course).

-scott


Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com