Bug 5817 - runqemu starts qemux86-64 with wrong CPU type
Summary: runqemu starts qemux86-64 with wrong CPU type
Status: RESOLVED FIXED
Alias: None
Product: General Runtime
Classification: Runtime
Component: General Runtime (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Medium normal
Target Milestone: 1.6 M3
Assignee: Cristian Iorga
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-02-13 09:34 UTC by Cristian Iorga
Modified: 2014-02-14 07:20 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Full boot log and info. (20.97 KB, text/plain)
2014-02-13 09:35 UTC, Cristian Iorga
no flags Details
Full log of testing related to properly CPU set for qemux86 and qemux86-64 (6.54 KB, text/plain)
2014-02-13 15:01 UTC, Cristian Iorga
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Iorga 2014-02-13 09:34:50 UTC
Test case:

Run a core-image-sato (or any other image) with a qemux86-64 machine.
Wrong arguments are passed to qemu related to cpu type:

/mnt/Yo/yoctoproject/build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-x86_64 -kernel /mnt/Yo/yoctoproject/build/tmp/deploy/images/qemux86-64/bzImage-qemux86-64.bin -net nic,model=virtio -net tap,vlan=0,ifname=tap0,script=no,downscript=no,vhost=on -cpu core2duo -drive file=/mnt/Yo/yoctoproject/build/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext3,if=virtio -show-cursor -usb -usbdevice wacom-tablet -vga vmware -no-reboot -enable-kvm -cpu kvm64 -m 256 --append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 "

CPU type is set twice, and the last setting is taken into consideration, defeating the right one (-cpu core2duo).

This is related to commit: 9532004b527fdf3a819b8b0e7e64833003a4b1d4 and commit b8819b02dc4ff29d678cc55887dfe6c2d109a67d.

After the guest Linux image starts, the wrong CPU is set:

root@qemux86-64:~# cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 6
model name	: Common KVM processor
stepping	: 1
microcode	: 0x1
cpu MHz		: 3392.066
cache size	: 4096 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm constant_tsc nopl pni cx16 hypervisor
bogomips	: 6784.13
clflush size	: 64
cache_alignment	: 128
address sizes	: 40 bits physical, 48 bits virtual
power management:

Full log attached
Comment 1 Cristian Iorga 2014-02-13 09:35:43 UTC
Created attachment 1768 [details]
Full boot log and info.
Comment 2 Cristian Iorga 2014-02-13 09:38:54 UTC
Investigation started.
Comment 3 Cristian Iorga 2014-02-13 09:39:48 UTC
kvm acceleration for qemu needs to be enabled in order for this issue to happen.
Comment 4 Cristian Iorga 2014-02-13 09:42:05 UTC
The complete command to test the issue:

runqemu qemux86-64 core-image-sato kvm
Comment 5 Cristian Iorga 2014-02-13 15:01:39 UTC
Created attachment 1770 [details]
Full log of testing related to properly CPU set for qemux86 and qemux86-64

Full log of testing related to properly CPU set for qemux86 and qemux86-64

Tested with qemux86* with and without KVM acceleration.
Comment 6 Cristian Iorga 2014-02-13 15:31:12 UTC
Patch sent in for review.