Bug 1664793

Summary: mode="host-model" VMs include broken "arch-facilities" flag name [libvirt] [rhel-7.6.z]
Product: Red Hat Enterprise Linux 7 Reporter: RAD team bot copy to z-stream <autobot-eus-copy>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: jiyan <jiyan>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.6CC: jdenemar, smoroney, yalzhang
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.5.0-10.el7_6.4 Doc Type: Bug Fix
Doc Text:
Previously, it was not possible to migrate domains with a host-model guest CPU on systems with the arch-facilities CPU feature enabled, as the feature does not support migration. This update resolves the issue by marking the feature as non-migratable and verifying that libvirt does not use the feature when starting a domain with a host-model guest CPU. As a result, new domains with a host-model guest CPU migrate successfully, and existing domains migrate after they are stopped and restarted.
Story Points: ---
Clone Of: 1658406 Environment:
Last Closed: 2019-01-29 17:25:03 UTC Type: ---
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: 1658406    
Bug Blocks:    

Description RAD team bot copy to z-stream 2019-01-09 16:37:46 UTC
This bug has been copied from bug #1658406 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 6 jiyan 2019-01-17 07:02:40 UTC
Version:
libvirt-4.5.0-10.el7_6.4.x86_64
qemu-kvm-1.5.3-160.el7_6.1.x86_64
kernel-3.10.0-957.1.3.el7.x86_64

Steps:
1. Check the related cpu flags in physical host
# lscpu |grep arch
Flags:                 fpu vme de ... avx512_vnni spec_ctrl intel_stibp flush_l1d arch_capabilities

2. Prepare a shutdown VM with the following configuration
# virsh domstate rhel76
shut off

# virsh dumpxml rhel76 --inactive |grep "<cpu" -A3
  <cpu mode='host-model' check='partial'>
    <model fallback='allow'/>
  </cpu>

3. Start VM, check dumpxml file and qemu cmd line 
# virsh start rhel76
Domain rhel76 started

# virsh dumpxml rhel76 |grep "<cpu" -A30
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Skylake-Server-IBRS</model>
    <vendor>Intel</vendor>
    <feature policy='disable' name='ds'/>
    <feature policy='disable' name='acpi'/>
    <feature policy='require' name='ss'/>
    <feature policy='disable' name='ht'/>
    <feature policy='disable' name='tm'/>
    <feature policy='disable' name='pbe'/>
    <feature policy='disable' name='dtes64'/>
    <feature policy='disable' name='monitor'/>
    <feature policy='disable' name='ds_cpl'/>
    <feature policy='disable' name='vmx'/>
    <feature policy='disable' name='smx'/>
    <feature policy='disable' name='est'/>
    <feature policy='disable' name='tm2'/>
    <feature policy='disable' name='xtpr'/>
    <feature policy='disable' name='pdcm'/>
    <feature policy='disable' name='dca'/>
    <feature policy='disable' name='osxsave'/>
    <feature policy='disable' name='tsc_adjust'/>
    <feature policy='require' name='clflushopt'/>
    <feature policy='require' name='pku'/>
    <feature policy='disable' name='ospke'/>
    <feature policy='require' name='stibp'/>
    <feature policy='require' name='ssbd'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='disable' name='arat'/>
  </cpu>

# ps -ef |grep rhel76 
qemu     115044      1 99 01:52 ?        00:00:40 /usr/libexec/qemu-kvm -name rhel76 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off 
-cpu Skylake-Server-IBRS,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+dca,+osxsave,+tsc_adjust,+clflushopt,+pku,+ospke,+stibp,+ssbd ...

In step-2 and step-3, there is no 'arch-facilities' related info in dumpxml and qemu cmd line, which is expected.
Move this bug to be verified.

Comment 12 errata-xmlrpc 2019-01-29 17:25:03 UTC
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/RHBA-2019:0197