Bug 1320360

Summary: lscpu shows wrong "Virtualization type" on Xen paravirtualization guest (PV)
Product: Red Hat Enterprise Linux 6 Reporter: Dongli Zhang <dongli.zhang>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: psklenar, vdanek
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: util-linux-ng-2.17.2-12.26.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 11:27:37 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:
Bug Depends On:    
Bug Blocks: 1356047, 1359260    

Description Dongli Zhang 2016-03-23 01:43:45 UTC
Description of problem:
The lscpu command shows "full" but not "para" as "Virtualization type" on Xen PV domain guest.


Version-Release number of selected component (if applicable):


How reproducible:
Run lscpu on Xen PV guest on any Xen server with the feature cpuid-faulting supported.


Steps to Reproduce:
1. Boot the guest as PV domain on Xen (e.g., Xen 4.3.0)
2. Run "lscpu"


Actual results:
[root@localhost ~]# lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Stepping:              3
CPU MHz:               3392.210
BogoMIPS:              6784.42
Hypervisor vendor:     Xen
Virtualization type:   full  <-------------- full, should be para
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0

Expected results:
[zhang@localhost util-linux]$ ./lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Stepping:              3
CPU MHz:               3392.210
BogoMIPS:              6784.42
Hypervisor vendor:     Xen
Virtualization type:   para  <----------------- para
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0


Additional info:
This is because Xen with cpuid-faulting supported will trap the execution of "cpiud" with GP fault. However, lscpu still assumes cpuid instruction will never be trapped by Xen hypervisor on paravirtualization guest.

The patch has been applied to util-linux upstream.

https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=0ebbe9f1048e1c7ef7d74034bd3b092fd0ef4d3e

and 

https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=b4d1fbda1efdc6444f79c5e15e4ec6c74bbb5601

Comment 2 Mike McCune 2016-03-28 22:54:17 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 7 errata-xmlrpc 2017-03-21 11:27:37 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://rhn.redhat.com/errata/RHBA-2017-0747.html