简体   繁体   English

可以以及如何在 linux 中为 openstack 实时迁移实例更新 cpu 功能标志

[英]could and how update cpu features flags in linux for openstack live migrate instance

I have three hypervisor with two type CPU process:我有三个具有两种 CPU 进程的管理程序:

# hypervisor node-3:
cpu family  : 6
model       : 85
model name  : Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
stepping    : 7
microcode   : 0x5003003
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 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs taa itlb_multihit

# hypervisor node-4:
cpu family  : 6
model       : 85
model name  : Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz
stepping    : 7
microcode   : 0x5003102
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 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs taa itlb_multihit

# hypervisor node-5:
cpu family  : 6
model       : 85
model name  : Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz
stepping    : 7
microcode   : 0x5003003
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 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin mba tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local ibpb ibrs stibp dtherm ida arat pln pts pku ospke avx512_vnni arch_capabilities
bugs        : spectre_v1 spectre_v2

I could live migrate instances between node-3 and node-4 , but node-5 can't live migrate with all other hypervisors.我可以在node-3node-4之间实时迁移实例,但node-5不能与所有其他管理程序一起实时迁移。

I know that because of the flags are not consistent, check from Host model (default for KVM & QEMU) .我知道由于flags不一致,请从主机 model(KVM 和 QEMU 的默认值)检查。

Question:问题:

  • 1, could I update the CPU's flags ? 1,我可以更新CPU的flags吗? and HOW?如何?
  • 2, why node-3 has different cpu model could have the same flags with node-4 ? 2、为什么node-3有不同的cpu model可以和node-4有相同的flags node-4 and node-5 has the same cpu model but have the different flags ? node-4node-5具有相同的cpu model但具有不同的flags
  • 3, what's the microcode function? 3、 microcode function是什么? why only node-4 different with others?为什么只有node-4与其他节点不同?

The CPU model and flags are part of the guest visible ABI. CPU model 和标志是来宾可见 ABI 的一部分。 As such, they can only be set at cold boot.因此,它们只能在冷启动时设置。 IOW to change them, you'll need to power off the guest, update the <cpu> config as needed, and then boot the guest once more. IOW 要更改它们,您需要关闭客户机电源,根据需要更新<cpu>配置,然后再次启动客户机。 Of course if you're having to cold boot, then there's little point in live migration - just boot it on the required host.当然,如果您不得不冷启动,那么实时迁移就没有什么意义了——只需在所需的主机上启动它即可。

The microcode is something that is loaded into CPUs on host boot, essentially as a way to provide bug fixes to your physical CPUs.微码是在主机启动时加载到 CPU 中的东西,本质上是作为一种为物理 CPU 提供错误修复的方式。 Typically updated microcode either gets installed when you update your BIOS / firmware, or when the operating system vendor sends updated microcode packages.通常,更新的微码要么在您更新 BIOS/固件时安装,要么在操作系统供应商发送更新的微码包时安装。 Microcode can both add and remove CPU features, depending on what its trying to fix.微码可以添加和删除 CPU 功能,具体取决于它试图修复的内容。 Removing features is a problem for live migration, as it can prevent live migration from hosts without the microcode update, to hosts with the microcode udpate.删除功能是实时迁移的一个问题,因为它可以防止从没有微码更新的主机实时迁移到具有微码更新的主机。

Clearly some of your nodes have received updated microcode, but others have not.很明显,您的一些节点已经收到更新的微码,但其他节点没有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM