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 1155903 - cpu flag smap is not exported to guest for Machine type 6.5.0
Summary: cpu flag smap is not exported to guest for Machine type 6.5.0
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-23 06:56 UTC by FuXiangChun
Modified: 2016-03-28 06:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-23 13:38:32 UTC


Attachments (Terms of Use)

Description FuXiangChun 2014-10-23 06:56:55 UTC
Description of problem:
Boot RHEL7.1 guest with -M rhel6.5.0 & -cpu Broadwell,enforce.  can not find flag smap inside guest.


Version-Release number of selected component (if applicable):
host and guest kernel version;
3.10.0-187.el7.x86_64

qemu-kvm-rhev;
qemu-kvm-1.5.3-76.el7.x86_64
qemu-kvm-rhev-2.1.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot RHEL7.1 guest on Broadwell host.
/usr/libexec/qemu-kvm -name RHEL-Server-7.1-64 -m 4G -smp 2,cores=1,threads=1,sockets=2,maxcpus=160 -cpu Broadwell,enforce -nodefconfig -numa node,cpus=0,nodeid=0 -numa node,cpus=1,nodeid=1 -spice port=5909,disable-ticketing -drive file=/home/rhel7_1.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,media=disk,snapshot=off,bus=1,unit=1 -device ide-drive,drive=drive-virtio-disk,id=virtio-disk,bootindex=1,physical_block_size=512,logical_block_size=512 -monitor stdio -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup,downscript=no,ifname=chenlin -device rtl8139,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:04:06,bus=pci.0,addr=0x9 -vga qxl -monitor stdio  -vnc :1 -spice port=5909,disable-ticketing -M rhel6.5.0

2.#cat /proc/cpuinfo|grep smap
nothing
3.#x86info -a -v (part)
eax in: 0x00000007, eax = 00000000 ebx = 000c0fb9 ecx = 00000000 edx = 00000000

Actual results:
#x86info -a -v(full)
eax in: 0x00000000, eax = 0000000d ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 000306d2 ebx = 00000800 ecx = 9ffa3203 edx = 078bfbfd
eax in: 0x00000002, eax = 00000001 ebx = 00000000 ecx = 00000000 edx = 002c307d
eax in: 0x00000003, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000004, eax = 00000121 ebx = 01c0003f ecx = 0000003f edx = 00000001
eax in: 0x00000005, eax = 00000000 ebx = 00000000 ecx = 00000003 edx = 00000000
eax in: 0x00000006, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000007, eax = 00000000 ebx = 000c0fb9 ecx = 00000000 edx = 00000000
eax in: 0x00000008, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000009, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000a, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000b, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000c, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000d, eax = 00000007 ebx = 00000340 ecx = 00000340 edx = 00000000

eax in: 0x80000000, eax = 8000000a ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x80000001, eax = 000306d2 ebx = 00000000 ecx = 00000101 edx = 20100800
eax in: 0x80000002, eax = 65746e49 ebx = 6f43206c ecx = 50206572 edx = 65636f72
eax in: 0x80000003, eax = 726f7373 ebx = 72422820 ecx = 7764616f edx = 296c6c65
eax in: 0x80000004, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000005, eax = 01ff01ff ebx = 01ff01ff ecx = 40020140 edx = 40020140
eax in: 0x80000006, eax = 00000000 ebx = 42004200 ecx = 02008140 edx = 00000000
eax in: 0x80000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000008, eax = 00003027 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000009, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x8000000a, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000

Expected results:


Additional info:
1. for -M 7.1 & 7.0.  smap is exported to guest.
2. for -M 6.5.0 & 6.4.0. smap isn't exported to guest.
3. If this is expect result. please free to close this bug.
4. If it is a valid bug. QE will clone it to qemu-kvm

Comment 2 Eduardo Habkost 2014-10-23 13:38:32 UTC
Not a bug. See bug 1111351.

Comment 3 FuXiangChun 2014-10-24 02:43:03 UTC
Eduardo,
You mentioned two the points in this comment.
https://bugzilla.redhat.com/show_bug.cgi?id=1111351#c8

1. This is the expected behavior for RHEL-6 machine-types.

2. As this BZ is about RHEL-6 compatibility, the missing SMAP feature on RHEL-7 needs a new BZ.

question:
1) How to understand #2 ? seem my understanding is not correct.
my understanding : Boot RHEL7.1 guest with Machine type 6.5.0 & -cpu Broadwell,enforce on RHEL7.1 host. If missing SMAP flag inside guest. it is an issue. 

2) why Machine type 6.5.0 can not export smap flag to guest?

Comment 4 Paolo Bonzini 2014-10-24 13:54:40 UTC
Because the 6.5 kernel never supported SMAP, so it is not possible to have SMAP enabled on the guest when running on 6.5 kernel.

If 7.1 enabled SMAP on the 6.5 machine type, we would have a change in the guest hardware (and in the guest ABI) after 6.5->7.1 migration or after 6.5->7.1 host updates.

Comment 5 FuXiangChun 2014-10-27 02:22:47 UTC
(In reply to Paolo Bonzini from comment #4)
> Because the 6.5 kernel never supported SMAP, so it is not possible to have
> SMAP enabled on the guest when running on 6.5 kernel.

QE knows 6.5 kernel really doesn't support. 
 
> 
> If 7.1 enabled SMAP on the 6.5 machine type, we would have a change in the
> guest hardware (and in the guest ABI) after 6.5->7.1 migration or after
> 6.5->7.1 host updates.

Currently. As 6.5 machine type doesn't SMAP. so stable ABI test doesn't have any problems(6.5->7.1 migration). If 6.5 machine type supports SMAP, maybe guest there will be SMAP in des host(e.g for RHEL7 guest).  Do we plan to support SMAP for 6.5 machine type in the future?

Comment 6 Paolo Bonzini 2014-10-27 11:48:35 UTC
Machine types never change, so no.


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