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>
Created attachment 300782 [details] boot vm
Srinivas, should that uncore frequency thing even be exposed to guests? Does it make sense there?
Borislav, This doesn't make sense to expose to guest.
What do I have to do prevent loading in guest?
if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) return -EINVAL; somewhere in the init function, I'd say.
OK I I will post this change ASAP.
Posted the patch. Also attached here.
Created attachment 300785 [details] Prevent loading of intel-uncore_frequency driver
sander44, can you run it pls?
I reproduced the same issue. After Srinivas's patch, the warning disappeared. Tested-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Thanks Zhenzhong. Patch is applied to 5.18-rc5.