mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +00:00
Fixed a bug in Linux MSR readout. The address of the MSR is the msr_index, not msr_index*8
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@73 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
parent
4729960411
commit
277eb73da7
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ int cpu_rdmsr(struct msr_driver_t* driver, int msr_index, uint64_t* result)
|
|||
|
||||
if (!driver || driver->fd < 0)
|
||||
return set_error(ERR_HANDLE);
|
||||
ret = pread(driver->fd, result, 8, msr_index * 8);
|
||||
ret = pread(driver->fd, result, 8, msr_index);
|
||||
if (ret != 8)
|
||||
return set_error(ERR_INVMSR);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue