Bug 1378704 - Flag smap should not be enabled in rhel6 machine type
Summary: Flag smap should not be enabled in rhel6 machine type
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.3
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Amnon Ilan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-23 06:59 UTC by Guo, Zhiyi
Modified: 2016-09-23 12:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-23 12:41:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Guo, Zhiyi 2016-09-23 06:59:51 UTC
Description of problem:
Flag smap should not be enabled not be enabled in rhel6 machine type

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-126.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot rhel7.3 guest with cli:
/usr/libexec/qemu-kvm -name rhel7.3 -m 2048 \
        -smp 6,threads=2,cores=1,sockets=3,maxcpus=6 \
        -vga qxl\
        -spice port=3001,disable-ticketing \
        -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent \
        -serial unix:/tmp/m,server,nowait \
        -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
        -drive file=/home/skylake.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0 -device scsi-hd,drive=drive-scsi-disk0,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk0,bootindex=1 \
        -monitor stdio \
        -usb -device usb-kbd,id=input0 \
        -netdev tap,id=idinWyYp,vhost=on -device virtio-net-pci,mac=42:ce:a9:d2:4d:d7,id=idlbq7eA,netdev=idinWyYp \
        -qmp tcp:localhost:4444,server,nowait \
	-machine rhel6.6.0\
	-cpu Skylake-Client,check,enforce \
2. Check flags inside guest by cat /proc/cpuinfo
3.

Actual results:
smap flag can be found 

Expected results:
smap flag cannot be found

Additional info:
If boot guest with -cpu Broadwell,check,enforce -machine rhel6.6.0, smap flag cannot be found inside guest.
guest cpuinfo:
# cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 94
model name	: Intel Core Processor (Skylake)
stepping	: 3
microcode	: 0x1
cpu MHz		: 2903.996
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap xsaveopt xsavec xgetbv1
bogomips	: 5807.99
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

Comment 2 Paolo Bonzini 2016-09-23 12:41:55 UTC
The Skylake Client CPU model never existed in RHEL 6.6, so you cannot execute "/usr/libexec/qemu-kvm -m rhel6.6.0 -cpu Skylake-client" on RHEL6.6.

So there is no need for compatibility measures to disable SMAP.


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