Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1791648

Summary: [RFE] Passthrough host CPU microcode version to KVM guest if using CPU passthrough
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Nils Koenig <nkoenig>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
qemu-kvm sub component: General QA Contact: Yumei Huang <yuhuang>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aarnold, bhull, cbrune, chayang, cpelland, jinzhao, juzhang, kchamart, knoel, lconicel, loberman, mtessun, pbonzini, pchavva, ribarry, sfroemer, virt-maint
Version: 8.0Keywords: RFE
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.2   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 09:55:51 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: 1801853    
Bug Blocks: 1720213, 1791653, 1794843, 1801852    

Description Nils Koenig 2020-01-16 10:12:03 UTC
When using CPU passthrough the reported CPU microcode version in the guest is hard coded to 0x1:


# cat /proc/cpuinfo
...
processor    : 53
vendor_id    : GenuineIntel
cpu family    : 6
model        : 85
model name    : Intel(R) Xeon(R) Platinum 8180M CPU @ 2.50GHz
stepping    : 4
microcode    : 0x1
...


On the host it looks like this:
...
processor    : 223
vendor_id    : GenuineIntel
cpu family    : 6
model        : 85
model name    : Intel(R) Xeon(R) Platinum 8180M CPU @ 2.50GHz
stepping    : 4
microcode    : 0x2000064
...


This is a feature request (RFE) to passthrough the host value (0x2000064 in the above example) to the guest (read only). Background information: This would allow the guest to verify to run with a certain microcode version, e.g. if spectre/meltdown fixes are in place.

Discussed with Paolo Bonzini if that would make sense and he agreed.

Comment 7 Nils Koenig 2020-02-03 11:49:01 UTC
Any chance to get an ETA on this?

Comment 8 Paolo Bonzini 2020-02-04 16:55:11 UTC
Upstream patches were accepted.

Comment 9 Ademar Reis 2020-02-05 23:13:11 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 19 Yumei Huang 2020-03-04 10:37:07 UTC
Verify:
qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae
host kernel: 4.18.0-185.el8.x86_64
guest kernel: 4.18.0-183.el8.x86_64
microcode_ctl-20191115-4.el8.x86_64

Boot guest with '-cpu host', check if microcode version is same between guest and host.  

On host, 

# cat /proc/cpuinfo | grep micro 
microcode	: 0x500002c
microcode	: 0x500002c
..

Inside guest,

# cat /proc/cpuinfo | grep micro
microcode	: 0x500002c
microcode	: 0x500002c
..


The microcode version in guest is same to host, so the bug is fixed.

Comment 21 errata-xmlrpc 2020-05-05 09:55:51 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-2020:2017