本文简单记录下kvm虚拟机使用物理CPU,不在使用qemu模拟
关闭虚拟机编辑虚机xml sudo virsh edit you-vm-domain-name 增加cpu的配置项 <cpu mode='host-passthrough' > </cpu> 重新启动,检查是否成功 cat /proc/cpuinfo processor : 0 vendor_id : xxxxxxx cpu family : 6 model : 60 model name : Intel Core Processor (Haswell) stepping : 1 microcode : 0x1 cpu MHz : 2095.307 cache size : 4096 KB 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 mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch xsaveopt fsgsbase bmi1 hle avx2 smep bmi2 erms rtm bogomips : 4190.61 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: