http://bugs.winehq.org/show_bug.cgi?id=20098
--- Comment #7 from red-ray ray@pobox.co.uk 2009-09-22 05:43:08 --- (In reply to comment #6) Thank you for your reply. How much detial do you need to know, is this enough ? 1) get the thread affinity, so you know which CPU to read 2) ensure the appropiate /dev/cpu/<n>/msr exists, create with mknod() is needed 3) open the device for read 4) get the value of ECX and use that to position (SEEK_SET), needs to use _lseeki64() as could well be MSR 0xC0000080 5) read 8 bytes 6) close device 7) is read failed pass exception back (my code will catch this) 8) store the low order 4 bytes in EAX 9) store the high order 4 bytes in EDX 10) continue execution 11) on wine exit it's probably a good idea to remove any mknod created devices 12) it might be worth leaving the MSR devices open and closing them on exit 13) SIV will read a few MSRs from ALL the CPUs at regular 1 or 2 second intervals so it would be wise to leave ALL the MSR devices open 14) I looked in http://www.intel.com/Assets/PDF/manual/253667.pdf for detials of the RDMSR instruction operation. 15) Would you plan to just do the fixup just for "Kernel Drivers" ? If initially you did it for all I will hapilly write and supply source of a Windows Test program. I am also happy to implement an command similar to: siv -save=[wine-msrs]=stdout which would actually use my driver to read a standard set of MSRs and report the results. If you would like me to write both a driver and test program and give you the source this might be possible, but I doubt if I could port it to the Wine build environment.