Bug 1791648 - [RFE] Passthrough host CPU microcode version to KVM guest if using CPU passthrough
Summary: [RFE] Passthrough host CPU microcode version to KVM guest if using CPU passth...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: 8.2
Assignee: Paolo Bonzini
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On: 1801853
Blocks: 1720213 1791653 1794843 1801852
TreeView+ depends on / blocked
 
Reported: 2020-01-16 10:12 UTC by Nils Koenig
Modified: 2020-05-05 09:57 UTC (History)
17 users (show)

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:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:55:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:57:21 UTC

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


Note You need to log in before you can comment on or make changes to this bug.