|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] Infinte loop in RtlPrefetchMemoryNonTemporal underWindow
> I have been trying to track down a problem that occurs when my GPLPV
> drivers give Windows a packet with the NdisPacketTcpChecksumSucceeded
> flag set. The problem is that the machine locks hard.
>
> After some tedious work with the debugger, I have found that Windows
> makes a call to a routine called RtlPrefetchMemoryNonTemporal, which
> looks like this:
>
> 8088e579 mov eax,dword ptr [nt!KePrefetchNTAGranularity 8088e57e
> 0f184100 prefetchnta [ecx]
> 8088e582 add ecx,eax
> 8088e584 sub edx,eax
> 8088e586 ja nt!RtlPrefetchMemoryNonTemporal+0x6 (8088e57e)
> 8088e588 ret
>
> Unfortunately it appears that the value at nt!KePrefetchNTAGranularity
> is 0, hence the infinite loop.
>
A bit more debugging shows that RtlPrefectMemoryNonTemporal starts out
life like this:
nt!RtlPrefetchMemoryNonTemporal:
8088e578 ret
8088e579 mov eax,dword ptr [nt!KePrefetchNTAGranularity 8088e57e
0f184100 prefetchnta [ecx]
8088e582 add ecx,eax
8088e584 sub edx,eax
8088e586 ja nt!RtlPrefetchMemoryNonTemporal+0x6 (8088e57e)
8088e588 ret
But then for some reason becomes:
nt!RtlPrefetchMemoryNonTemporal:
8088e578 nop
8088e579 mov eax,dword ptr [nt!KePrefetchNTAGranularity 8088e57e
0f184100 prefetchnta [ecx]
8088e582 add ecx,eax
8088e584 sub edx,eax
8088e586 ja nt!RtlPrefetchMemoryNonTemporal+0x6 (8088e57e)
8088e588 ret
The difference being that the initial ret becomes a nop...
This is getting stranger and stranger.
James
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|