1 // SPDX-License-Identifier: GPL-2.0
14 int main(int argc
, char **argv
) {
17 char msr_file_name
[64];
23 cpu
= strtol(argv
[1], (char **) NULL
, 10);
28 sprintf(msr_file_name
, "/dev/cpu/%d/msr", cpu
);
29 fd
= open(msr_file_name
, O_RDONLY
);
32 perror("Failed to open");
36 pread(fd
, &msr
, sizeof(msr
), 0x199);
38 printf("msr 0x199: 0x%llx\n", msr
);