156 Star 390 Fork 1.3K

openEuler/community

 / 详情

OpenEuler 23.09 虚拟机 Fatal glibc error: CPU does not support x86-64-v2

待办的
任务
创建于  
2023-12-27 11:02

When I have libvirt xml cpu mode for OpenEuler 23.09 virtual machine as below:

 <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>qemu64</model>
    <feature policy='require' name='x2apic'/>
    <feature policy='require' name='popcnt'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='lahf_lm'/>
    <feature policy='disable' name='svm'/>
    <feature policy='disable' name='abm'/>
    <feature policy='disable' name='sse4a'/>
  </cpu>

the virtual machine console keeps panic with

[    0.733578][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
Fatal glibc error: CPU does not support x86-64-v2
[    0.740053][    T1] CPU: 1 PID: 1 Comm: init Not tainted 6.4.0-10.1.0.20.oe2309.x86_64 #1
[    0.745832][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
[    0.751836][    T1] Call Trace:
[    0.754226][    T1]  <TASK>
[    0.756302][    T1]  dump_stack_lvl+0x43/0x60
[    0.759134][    T1]  panic+0x31e/0x340
[    0.761648][    T1]  do_exit+0x4d9/0x500
[    0.763830][    T1]  do_group_exit+0x2d/0x80
[    0.765247][    T1]  __x64_sys_exit_group+0x14/0x20
[    0.766832][    T1]  do_syscall_64+0x3a/0x90
[    0.768176][    T1]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[    0.769910][    T1] RIP: 0033:0x7f6e924ae025
[    0.771211][    T1] Code: ba 01 00 00 00 b8 ca 00 00 00 0f 05 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa ba e7 00 00 00 eb 06 0f 1f 44 00 00 f4 89 d0 0f 05 <48> 3d 00 f0 ff ff 76 f3 f7 d8 89 05 4b 02 01 00 eb e9 66 0f 1f 84
[    0.776495][    T1] RSP: 002b:00007ffc3db65df8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7
[    0.778778][    T1] RAX: ffffffffffffffda RBX: 00007f6e924a95c0 RCX: 00007f6e924ae025
[    0.780891][    T1] RDX: 00000000000000e7 RSI: 00007ffc3db654c0 RDI: 000000000000007f
[    0.782942][    T1] RBP: 00007ffc3db65fd0 R08: 0000000000000010 R09: ffffffffffffffff
[    0.784967][    T1] R10: 0000000000000001 R11: 0000000000000202 R12: 00007f6e924bdab0
[    0.786904][    T1] R13: 0000000000000000 R14: 0000000000000000 R15: 00007f6e9248e000
[    0.788821][    T1]  </TASK>
[    0.789740][    T1] Kernel Offset: 0x33e00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.792386][    T1] Rebooting in 3 seconds..

I had to change cpu mode to

  <cpu mode='host-model' check='none'>
    <model fallback='forbid'>qemu64</model>
  </cpu>

then it works

评论 (3)

vincentmli 创建了任务

Hi vincentmli, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: TC, and any of the maintainers: @relue0z , @stonefly128 , @biannm , @Fengguang , @木得感情的openEuler机器人 , @hjimmy , @myeuler , @Jianmin , @solarhu , @Charlie_Li , @ZhiGang , @Xie XiuQi , @陈棋德 , @Wayne Ren , @cf-zhao , @juntian , @胡亚弟 , @Lvcongqing , @zhujianwei001 , @George.Cao

openeuler-ci-bot 添加了
 
sig/TC
标签
vincentmli 修改了描述
  1. Open a terminal window.

  2. Type the following command: “sysctl -a | grep brand”

  3. This command will display your CPU brand and model

  4. Search for your PC generation among the available options, and choose the one that includes “V2.” For example, if you are using a fifth-generation CPU like the Intel Core Processor (Broadwell) without TSX, select “Intel Core Processor (Broadwell, no TSX) (Broadwell-v2).”

  5. After selecting the appropriate CPU configuration, save your settings.

@我也想认真学习

I am not sure how 'sysctl -a' would show the host CPU model, sysctl is for kernel knobs, not for hardware information, cat /proc/cpuinfo on host would give CPU information, for example my host /proc/cpuinfo:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping	: 7
microcode	: 0x2f
cpu MHz		: 1633.644
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 h
t tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclm
ulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave
 avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts md_clear flus
h_l1d
vmx flags	: vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown
bogomips	: 6399.89
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

I wonder if just set the virtual machine to cpu mode='host-model' is recommended or use a generic cpu model that virtual machine would likely to support

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
Go
1
https://gitee.com/openeuler/community.git
git@gitee.com:openeuler/community.git
openeuler
community
community

搜索帮助

A270a887 8829481 3d7a4017 8829481