Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1464832
Summary: | host-model CPU with check='full' does not work well when the host-model cpu contains more fea-tures in the qemu | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Luyao Huang <lhuang> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.4 | CC: | cww, dgilbert, dyuan, fjin, lhuang, rbalakri, xuzhang, yalzhang |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.9.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 10:50:46 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1199452 |
Description
Luyao Huang
2017-06-26 02:04:57 UTC
Luyao could you please run an updated cpu-gather.sh script (https://gitlab.com/jirkade/libvirt/raw/cpu-fixes/tests/cputestdata/cpu-gather.sh) on the affected host (i.e., Xeon E7-4830) and attach the output here? (In reply to Jiri Denemark from comment #3) > Luyao could you please run an updated cpu-gather.sh script > (https://gitlab.com/jirkade/libvirt/raw/cpu-fixes/tests/cputestdata/cpu- > gather.sh) on the affected host (i.e., Xeon E7-4830) and attach the output > here? Hi Jirka, Here is the output of the updated cpu-gather.sh: model name : Intel(R) Xeon(R) CPU E7- 4830 @ 2.13GHz CPU: 0x00000000 0x00: eax=0x0000000b ebx=0x756e6547 ecx=0x6c65746e edx=0x49656e69 0x00000001 0x00: eax=0x000206f2 ebx=0x80400800 ecx=0x02bee3ff edx=0xbfebfbff 0x00000002 0x00: eax=0x55035a01 ebx=0x00f0b2ec ecx=0x00000000 edx=0x09ca212c 0x00000003 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x00000004 0x00: eax=0x7c004121 ebx=0x01c0003f ecx=0x0000003f edx=0x00000000 0x00000004 0x01: eax=0x7c004122 ebx=0x00c0003f ecx=0x0000007f edx=0x00000000 0x00000004 0x02: eax=0x7c004143 ebx=0x01c0003f ecx=0x000001ff edx=0x00000000 0x00000004 0x03: eax=0x7c0fc163 ebx=0x05c0003f ecx=0x00003fff edx=0x00000006 0x00000005 0x00: eax=0x00000040 ebx=0x00000040 ecx=0x00000003 edx=0x00001120 0x00000006 0x00: eax=0x00000007 ebx=0x00000001 ecx=0x00000009 edx=0x00000000 0x00000007 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x00000008 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x00000009 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x0000000a 0x00: eax=0x07300403 ebx=0x00000004 ecx=0x00000000 edx=0x00000603 0x0000000b 0x00: eax=0x00000001 ebx=0x00000002 ecx=0x00000100 edx=0x00000080 0x0000000b 0x01: eax=0x00000006 ebx=0x00000010 ecx=0x00000201 edx=0x00000080 0x80000000 0x00: eax=0x80000008 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x80000001 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000001 edx=0x2c100800 0x80000002 0x00: eax=0x20202020 ebx=0x49202020 ecx=0x6c65746e edx=0x20295228 0x80000003 0x00: eax=0x6e6f6558 ebx=0x20295228 ecx=0x20555043 edx=0x202d3745 0x80000004 0x00: eax=0x30333834 ebx=0x20402020 ecx=0x33312e32 edx=0x007a4847 0x80000005 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x80000006 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x01006040 edx=0x00000000 0x80000007 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000100 0x80000008 0x00: eax=0x0000302c ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x80860000 0x00: eax=0x00000001 ebx=0x00000002 ecx=0x00000100 edx=0x00000080 0xc0000000 0x00: eax=0x00000001 ebx=0x00000002 ecx=0x00000100 edx=0x00000080 {"QMP": {"version": {"qemu": {"micro": 0, "minor": 9, "major": 2}, "package": "(qemu-kvm-rhev-2.9.0-16.el7_4.8)"}, "capabilities": []}} {"return": {}} {"return": {"model": {"name": "base", "props": {"phys-bits": 0, "core-id": -1, "xlevel": 2147483656, "cmov": true, "ia64": false, "aes": true, "mmx": true, "arat": true, "rdpid": false, "pause-filter": false, "xsavec": false, "osxsave": false, "tsc-frequency": 0, "xd": true, "hv-vendor-id": "", "kvm-asyncpf": true, "kvm_asyncpf": true, "perfctr_core": false, "perfctr-core": false, "mpx": false, "avx512cd": false, "decodeassists": false, "pbe": false, "sse4_1": true, "sse4.1": true, "sse4-1": true, "family": 6, "vmware-cpuid-freq": true, "avx512f": false, "xcrypt": false, "msr": true, "mce": true, "mca": true, "thread-id": -1, "min-level": 11, "xgetbv1": false, "cid": false, "hv-relaxed": false, "fxsr": true, "ds": false, "hv-crash": false, "xsaveopt": false, "xtpr": false, "avx512-vpopcntdq": false, "phe": false, "avx512vl": false, "extapic": false, "3dnowprefetch": false, "cr8legacy": false, "cpuid-0xb": true, "xcrypt-en": false, "kvm_pv_eoi": true, "apic-id": 4294967295, "pn": false, "dca": false, "vendor": "GenuineIntel", "pku": false, "smx": false, "cmp-legacy": false, "cmp_legacy": false, "avx512-4fmaps": false, "vmcb-clean": false, "vmcb_clean": false, "3dnowext": false, "hle": false, "npt": false, "memory": "/machine/unattached/system[0]", "clwb": false, "lbrv": false, "adx": false, "ss": true, "pni": true, "svm_lock": false, "svm-lock": false, "smep": false, "pfthreshold": false, "smap": false, "x2apic": true, "avx512vbmi": false, "i64": true, "flushbyasid": false, "f16c": false, "ace2-en": false, "pat": true, "pae": true, "sse": true, "phe-en": false, "kvm-nopiodelay": true, "kvm_nopiodelay": true, "tm": false, "kvmclock-stable-bit": true, "hypervisor": true, "socket-id": -1, "pcommit": false, "syscall": true, "level": 11, "avx512dq": false, "svm": false, "full-cpuid-auto-level": true, "invtsc": false, "sse3": true, "sse2": true, "est": false, "avx512ifma": false, "tm2": false, "kvm-pv-eoi": true, "cx8": true, "kvm-mmu": false, "kvm_mmu": false, "sse4_2": true, "sse4.2": true, "sse4-2": true, "pge": true, "fill-mtrr-mask": true, "pdcm": false, "nodeid_msr": false, "model": 47, "movbe": false, "nrip-save": false, "nrip_save": false, "sse4a": false, "ssse3": true, "kvm_pv_unhalt": true, "invpcid": false, "pdpe1gb": true, "tsc-deadline": true, "fma": false, "cx16": true, "de": true, "enforce": false, "stepping": 2, "xsave": false, "clflush": true, "skinit": false, "tce": false, "tsc": true, "fpu": true, "ds-cpl": false, "ds_cpl": false, "ibs": false, "host-phys-bits": true, "fma4": false, "la57": false, "osvw": false, "check": true, "hv-spinlocks": -1, "pmm": false, "apic": true, "pmu": false, "min-xlevel2": 0, "tsc-adjust": true, "tsc_adjust": true, "kvm-steal-time": true, "kvm_steal_time": true, "kvmclock": true, "l3-cache": true, "lwp": false, "xop": false, "avx": false, "ospke": false, "ace2": false, "acpi": false, "avx512bw": false, "hv-vapic": false, "fsgsbase": false, "ht": false, "nx": true, "pclmulqdq": true, "mmxext": false, "popcnt": true, "xsaves": false, "lm": true, "umip": false, "avx2": false, "pse": true, "sep": true, "pclmuldq": true, "nodeid-msr": false, "kvm": true, "misalignsse": false, "min-xlevel": 2147483656, "bmi2": false, "bmi1": false, "kvm-pv-unhalt": true, "realized": false, "tsc-scale": false, "tsc_scale": false, "topoext": false, "xlevel2": 0, "clflushopt": false, "kvm-no-smi-migration": false, "monitor": false, "avx512er": false, "pmm-en": false, "pcid": true, "3dnow": false, "erms": false, "lahf-lm": true, "lahf_lm": true, "xstore": false, "fxsr-opt": false, "fxsr_opt": false, "rtm": false, "lmce": true, "hv-time": false, "perfctr-nb": false, "perfctr_nb": false, "ffxsr": false, "rdrand": false, "rdseed": false, "avx512-4vnniw": false, "vme": true, "vmx": false, "dtes64": false, "mtrr": true, "rdtscp": true, "pse36": true, "tbm": false, "wdt": false, "pause_filter": false, "model-id": " Intel(R) Xeon(R) CPU E7- 4830 @ 2.13GHz", "sha-ni": false, "abm": false, "avx512pf": false, "xstore-en": false}}}, "id": "model-expansion"} {"return": [{"name": "max", "typename": "max-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": false}, {"name": "host", "typename": "host-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": false}, {"name": "base", "typename": "base-x86_64-cpu", "unavailable-features": [], "static": true, "migration-safe": true}, {"name": "qemu64", "typename": "qemu64-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "qemu32", "typename": "qemu32-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "phenom", "typename": "phenom-x86_64-cpu", "unavailable-features": ["mmxext", "fxsr-opt", "3dnowext", "3dnow", "abm", "sse4a", "npt"], "static": false, "migration-safe": true}, {"name": "pentium3", "typename": "pentium3-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "pentium2", "typename": "pentium2-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "pentium", "typename": "pentium-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "n270", "typename": "n270-x86_64-cpu", "unavailable-features": ["movbe"], "static": false, "migration-safe": true}, {"name": "kvm64", "typename": "kvm64-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "kvm32", "typename": "kvm32-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "cpu64-rhel6", "typename": "cpu64-rhel6-x86_64-cpu", "unavailable-features": ["abm", "sse4a"], "static": false, "migration-safe": true}, {"name": "coreduo", "typename": "coreduo-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "core2duo", "typename": "core2duo-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "athlon", "typename": "athlon-x86_64-cpu", "unavailable-features": ["mmxext", "3dnowext", "3dnow"], "static": false, "migration-safe": true}, {"name": "Westmere", "typename": "Westmere-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "Skylake-Client", "typename": "Skylake-Client-x86_64-cpu", "unavailable-features": ["fma", "movbe", "xsave", "avx", "f16c", "rdrand", "fsgsbase", "bmi1", "hle", "avx2", "smep", "bmi2", "erms", "invpcid", "rtm", "mpx", "rdseed", "adx", "smap", "abm", "3dnowprefetch", "xsaveopt", "xsavec", "xgetbv1", "xsave", "xsave", "avx", "mpx", "mpx"], "static": false, "migration-safe": true}, {"name": "SandyBridge", "typename": "SandyBridge-x86_64-cpu", "unavailable-features": ["xsave", "avx", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Penryn", "typename": "Penryn-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "Opteron_G5", "typename": "Opteron_G5-x86_64-cpu", "unavailable-features": ["fma", "xsave", "avx", "f16c", "abm", "sse4a", "misalignsse", "3dnowprefetch", "xop", "fma4", "tbm", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Opteron_G4", "typename": "Opteron_G4-x86_64-cpu", "unavailable-features": ["xsave", "avx", "abm", "sse4a", "misalignsse", "3dnowprefetch", "xop", "fma4", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Opteron_G3", "typename": "Opteron_G3-x86_64-cpu", "unavailable-features": ["abm", "sse4a", "misalignsse"], "static": false, "migration-safe": true}, {"name": "Opteron_G2", "typename": "Opteron_G2-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "Opteron_G1", "typename": "Opteron_G1-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "Nehalem", "typename": "Nehalem-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "IvyBridge", "typename": "IvyBridge-x86_64-cpu", "unavailable-features": ["xsave", "avx", "f16c", "rdrand", "fsgsbase", "smep", "erms", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Haswell", "typename": "Haswell-x86_64-cpu", "unavailable-features": ["fma", "movbe", "xsave", "avx", "f16c", "rdrand", "fsgsbase", "bmi1", "hle", "avx2", "smep", "bmi2", "erms", "invpcid", "rtm", "abm", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Haswell-noTSX", "typename": "Haswell-noTSX-x86_64-cpu", "unavailable-features": ["fma", "movbe", "xsave", "avx", "f16c", "rdrand", "fsgsbase", "bmi1", "avx2", "smep", "bmi2", "erms", "invpcid", "abm", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Conroe", "typename": "Conroe-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}, {"name": "Broadwell", "typename": "Broadwell-x86_64-cpu", "unavailable-features": ["fma", "movbe", "xsave", "avx", "f16c", "rdrand", "fsgsbase", "bmi1", "hle", "avx2", "smep", "bmi2", "erms", "invpcid", "rtm", "rdseed", "adx", "smap", "abm", "3dnowprefetch", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "Broadwell-noTSX", "typename": "Broadwell-noTSX-x86_64-cpu", "unavailable-features": ["fma", "movbe", "xsave", "avx", "f16c", "rdrand", "fsgsbase", "bmi1", "avx2", "smep", "bmi2", "erms", "invpcid", "rdseed", "adx", "smap", "abm", "3dnowprefetch", "xsaveopt", "xsave", "xsave", "avx"], "static": false, "migration-safe": true}, {"name": "486", "typename": "486-x86_64-cpu", "unavailable-features": [], "static": false, "migration-safe": true}], "id": "definitions"} {"return": {}} {"timestamp": {"seconds": 1506477901, "microseconds": 244796}, "event": "SHUTDOWN", "data": {"guest": false}} Patches sent for review upstream: https://www.redhat.com/archives/libvir-list/2017-October/msg00134.html commit 9c9620af1d09efdc327c91d4e94e6ff9bc22c556 Refs: v3.8.0-99-g9c9620af1d Author: Jiri Denemark <jdenemar> AuthorDate: Fri Oct 13 18:17:52 2017 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Mon Oct 16 09:23:20 2017 +0200 cpu_x86: Disable blockers from unusable CPU models When decoding CPUID data to virCPUDef we need to be careful about using a CPU model which cannot be directly used on the current host. Normally, libvirt would notice the features which prevent the model from being usable and it would disable them in the computed virCPUDef, but this won't work in case the definition of the CPU model in QEMU contains more features than what we have in cpu_map.xml. We need to count with the usability blockers we got from QEMU and explicitly disable all of them to make the computed virCPUDef usable. https://bugzilla.redhat.com/show_bug.cgi?id=1464832 Signed-off-by: Jiri Denemark <jdenemar> Reviewed-by: John Ferlan <jferlan> Verify this bug with libvirt-3.9.0-8.el7.x86_64 on the same host: 1. check domcapabilities output (xsaveopt is disable): <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'> <model fallback='forbid'>SandyBridge</model> <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='arat'/> <feature policy='require' name='tsc_adjust'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='invtsc'/> <feature policy='disable' name='xsave'/> <feature policy='disable' name='avx'/> <feature policy='disable' name='xsaveopt'/> </mode> 2. start a guest with check is full: <cpu mode='host-model' check='full'> <model fallback='forbid'/> <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB'/> </numa> </cpu> 3. check guest running xml: <cpu mode='custom' match='exact' check='full'> <model fallback='forbid'>SandyBridge</model> <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ss'/> <feature policy='require' name='pcid'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='arat'/> <feature policy='require' name='tsc_adjust'/> <feature policy='require' name='pdpe1gb'/> <feature policy='disable' name='xsave'/> <feature policy='disable' name='avx'/> <feature policy='disable' name='xsaveopt'/> <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB'/> </numa> </cpu> 4. check guest log there is no log like this: warning: host doesn't support requested feature: CPUID.0DH:EAX.xsaveopt [bit 0] 5. change the guest cpu check to partial and none, and repeat the step 2-4, get the same result Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0704 |