Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1518127

Summary: smap shouldn't be found inside guest when boot cpu EPYC and machine type 6
Product: Red Hat Enterprise Linux 7 Reporter: Guo, Zhiyi <zhguo>
Component: qemu-kvm-rhevAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED WONTFIX QA Contact: Guo, Zhiyi <zhguo>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: chayang, jinzhao, juzhang, knoel, michen, pbonzini, virt-maint, zhguo
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-30 19:35:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Guo, Zhiyi 2017-11-28 09:25:48 UTC
Description of problem:
smap shouldn't be found inside guest when boot cpu EPYC and machine type 6

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-8.el7.x86_64
kernel-3.10.0-799.el7(host & guest)

How reproducible:
100%

Steps to Reproduce:
1.Boot a rhel7.5 guest with qemu cli:
/usr/libexec/qemu-kvm -name input-test -m 8G \
-cpu EPYC \
-smp 4,cores=2 \
-device VGA \
-netdev tap,id=idinWyYp,vhost=on -device e1000,mac=d2:ce:a9:d2:4e:dd,id=idlbq7eA
,netdev=idinWyYp \
-uuid 215e11b2-a869-41b5-91cd-6a32a907be7e \
-device ich9-usb-uhci6 \
-drive file=rhel75.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cach
e=none,werror=stop,rerror=stop  -device ide-drive,drive=drive-scsi-disk0 \
-qmp unix:/tmp/input-port,server,nowait \
-monitor stdio \
-vnc :0 \
-machine rhel6.6.0 \

2.Check smap flag inside guest by lscpu
3.

Actual results:
smap is found inside guest

Expected results:
smap cannot be found inside guest

Additional info:

Comment 2 Eduardo Habkost 2017-12-01 19:09:17 UTC
(In reply to Guo, Zhiyi from comment #0)
> Actual results:
> smap is found inside guest
> 
> Expected results:
> smap cannot be found inside guest
> 

I'm confused.  Why is this the expected result?

Comment 3 Guo, Zhiyi 2017-12-05 15:08:32 UTC
(In reply to Eduardo Habkost from comment #2)
> (In reply to Guo, Zhiyi from comment #0)
> > Actual results:
> > smap is found inside guest
> > 
> > Expected results:
> > smap cannot be found inside guest
> > 
> 
> I'm confused.  Why is this the expected result?

Hmm.. I may missunderstand the expect result of Bug 1155903 - cpu flag smap is not exported to guest for Machine type 6.5.0. Flag SMAP cannot be enabled only when cpu model is Broadwell/Broadwell-noTSX and machine type is rhel6.x, am I correct?
If so, feel free to close this bug:) Sorry for confusion!

BR/
Guo, Zhiyi

Comment 4 Eduardo Habkost 2017-12-09 00:26:36 UTC
(In reply to Guo, Zhiyi from comment #3)
> (In reply to Eduardo Habkost from comment #2)
> > (In reply to Guo, Zhiyi from comment #0)
> > > Actual results:
> > > smap is found inside guest
> > > 
> > > Expected results:
> > > smap cannot be found inside guest
> > > 
> > 
> > I'm confused.  Why is this the expected result?
> 
> Hmm.. I may missunderstand the expect result of Bug 1155903 - cpu flag smap
> is not exported to guest for Machine type 6.5.0. Flag SMAP cannot be enabled
> only when cpu model is Broadwell/Broadwell-noTSX and machine type is
> rhel6.x, am I correct?

Actually, you assumption was correct.  This is just not a problem in practice because we don't have Skylake* and EPYC CPU models in RHEL-6, so one could claim it's not a bug.  But it may become a problem if we decide to add new CPU models to RHEL-6 in the future.  It's simple to fix that, so I will keep the bug open and send a fix.

Comment 5 Eduardo Habkost 2018-05-30 19:35:32 UTC
Closing as WONTFIX because it would cause problems only if we add new CPU models to RHEL-6.