Bug 215870 - unchecked MSR access error: RDMSR from 0x620 at rIP: 0xffffffff8b07a862 (native_read_msr+0x2/0x10)
Summary: unchecked MSR access error: RDMSR from 0x620 at rIP: 0xffffffff8b07a862 (nati...
Status: NEEDINFO
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-21 13:49 UTC by sander44
Modified: 2022-05-02 14:07 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.18.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
boot vm (84.21 KB, text/plain)
2022-04-21 13:51 UTC, sander44
Details
Prevent loading of intel-uncore_frequency driver (1.36 KB, application/mbox)
2022-04-21 18:45 UTC, Srinivas Pandruvada
Details

Description sander44 2022-04-21 13:49:13 UTC
Hi Kernel Team,

I notice this today:

Using 5.18.0-rc3 kernel version.

QEMU HV:
 qemu-system-x86_64 --version
QEMU emulator version 6.2.0 (pve-qemu-kvm_6.2.0)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

[    2.576039] unchecked MSR access error: RDMSR from 0x620 at rIP: 0xffffffff8b07a862 (native_read_msr+0x2/0x10)
[    2.576046] Call Trace:
[    2.576055]  <TASK>
[    2.576056]  __rdmsr_on_cpu+0x2a/0x30
[    2.576066]  generic_exec_single+0x85/0xc0
[    2.576073]  smp_call_function_single+0xb8/0x170
[    2.576076]  ? pldmfw_flash_image+0xbb0/0xbb0
[    2.576078]  rdmsrl_on_cpu+0x52/0x80
[    2.576081]  uncore_read_control_freq+0x30/0x80 [intel_uncore_frequency]
[    2.576088]  uncore_freq_add_entry+0x62/0x1d0 [intel_uncore_frequency_common]
[    2.576090]  cpuhp_thread_fun+0x78/0x150
[    2.576094]  smpboot_thread_fn+0x180/0x220
[    2.576099]  ? sort_range+0x20/0x20
[    2.576101]  kthread+0x153/0x170
[    2.576104]  ? kthread_complete_and_exit+0x20/0x20
[    2.576107]  ret_from_fork+0x1f/0x30
[    2.576112]  </TASK>
[    2.576378] Call Trace:
[    2.576380]  <IRQ>
[    2.576380]  __rdmsr_on_cpu+0x2a/0x30
[    2.576383]  flush_smp_call_function_queue+0x11d/0x170
[    2.576385]  sysvec_call_function_single+0x9d/0xd0
[    2.576396]  </IRQ>
[    2.576397]  <TASK>
[    2.576397]  asm_sysvec_call_function_single+0x12/0x20
[    2.576409] RIP: 0010:native_safe_halt+0xb/0x10
[    2.576412] Code: 48 8b 00 a8 08 74 82 eb c1 cc cc cc cc cc cc eb 07 0f 00 2d a9 ba 4e 00 f4 c3 0f 1f 44 00 00 eb 07 0f 00 2d 99 ba 4e 00 fb f4 <c3> cc cc cc cc 53 e8 ea e3 fe ff e8 95 94 41 ff fb 0f 1f 44 00 00
[    2.576413] RSP: 0018:ffffffff8c803e98 EFLAGS: 00000202
[    2.576416] RAX: ffffffff8bd21350 RBX: ffffffff8c81a580 RCX: 0000000000000000
[    2.576417] RDX: ffff9fa0024cd660 RSI: ffffffff8c525b53 RDI: ffffffff8c52d1b6
[    2.576418] RBP: 0000000000000000 R08: 000001f5fd8d97a0 R09: 0000000000000000
[    2.576419] R10: 00000000fffc1ad3 R11: 0000000000000008 R12: 0000000000000000
[    2.576420] R13: 0000000000000000 R14: ffffffff8c81a118 R15: 00000000000000c9
[    2.576422]  ? mwait_idle+0x70/0x70
[    2.576425]  default_idle+0x5/0x10
[    2.576427]  default_idle_call+0x24/0x50
[    2.576429]  do_idle+0x1d9/0x220
[    2.576432]  cpu_startup_entry+0x14/0x20
[    2.576434]  start_kernel+0x8f9/0x920
[    2.576442]  secondary_startup_64_no_verify+0xd5/0xdb
[    2.576445]  </TASK>
Comment 1 sander44 2022-04-21 13:51:16 UTC
Created attachment 300782 [details]
boot vm
Comment 2 Borislav Petkov 2022-04-21 15:11:54 UTC
Srinivas,

should that uncore frequency thing even be exposed to guests? Does it make sense there?
Comment 3 Srinivas Pandruvada 2022-04-21 16:38:33 UTC
Borislav,
This doesn't make sense to expose to guest.
Comment 4 Srinivas Pandruvada 2022-04-21 16:51:21 UTC
What do I have to do prevent loading in guest?
Comment 5 Borislav Petkov 2022-04-21 17:46:36 UTC
if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
      return -EINVAL;

somewhere in the init function, I'd say.
Comment 6 Srinivas Pandruvada 2022-04-21 18:03:09 UTC
OK I I will post this change ASAP.
Comment 7 Srinivas Pandruvada 2022-04-21 18:44:23 UTC
Posted the patch. Also attached here.
Comment 8 Srinivas Pandruvada 2022-04-21 18:45:46 UTC
Created attachment 300785 [details]
Prevent loading of intel-uncore_frequency driver
Comment 9 Borislav Petkov 2022-04-27 10:57:32 UTC
sander44, can you run it pls?
Comment 10 zhenzhong.duan 2022-04-29 02:46:51 UTC
I reproduced the same issue. After Srinivas's patch, the warning disappeared.

Tested-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Comment 11 Srinivas Pandruvada 2022-05-02 14:07:07 UTC
Thanks Zhenzhong. Patch is applied to 5.18-rc5.

Note You need to log in before you can comment on or make changes to this bug.