Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1046907

Summary: Virtual FreeBSD boot hang on CPU XEON E5-1620 v2
Product: Red Hat Enterprise Linux 6 Reporter: Stanislav Petr <glux>
Component: qemu-kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5CC: acathrow, bdas, bsarathy, chayang, glux, iec23801, mkenneth, qzhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-27 20:02:52 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:
Embargoed:
Attachments:
Description Flags
dmesg log
none
cpuinfo in proc none

Description Stanislav Petr 2013-12-27 11:01:07 UTC
Description of problem:

Boot of FreeBSD (8.3, 8.4, 9.1, 9.2) from virtual CD hang after 10 seconds countdown when running on new XEON E5-1620 v2. Boot on previous model without v2 in his name is OK (tested alson on i7-950 and also OK). 

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

Kernel: 2.6.32-431.1.2.0.1.el6.x86_64
Qemu-kvm: 0.12.1.2-2.415.el6_5.3.x86_64


How reproducible:

Try to boot FreeBSD as KVM quest on server with XEON E5-1620 v2.


Actual results:

Boot hang.

Comment 1 Stanislav Petr 2013-12-27 11:15:54 UTC
When i try add
        <qemu:commandline>
                <qemu:arg value='-no-kvm'/>
        </qemu:commandline>
do virtual definition, guest can boot correctly (but slow).

Comment 2 Stanislav Petr 2013-12-27 15:27:08 UTC
After installing kernel 3.8.13-16.3.1.el6uek.x86_64 (from Oracle Linux), FreeBSD guest on XEON E5-1620 v2 is booting correctly.

Comment 4 Ademar Reis 2014-04-11 16:00:34 UTC
Stanislav: thanks for taking the time to enter a bug report with us. We appreciate the feedback and look to use reports such as this to guide our efforts at improving our products. That being said, we're not able to guarantee the timeliness or suitability of a resolution for issues entered here because this is not a mechanism for requesting support.

If this issue is critical or in any way time sensitive, please raise a ticket through your regular Red Hat support channels to make certain  it receives the proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please
visit: https://www.redhat.com/support/process/production/#howto


Eduardo: maybe a dupe of Bug 1084200, or at least related.

Comment 5 Eduardo Habkost 2014-04-11 17:16:28 UTC
Very likely to be due to missing SCAS instruction emulation, like on bug 1084200. More information is needed to confirm that:
 * The libvirt XML data for the VM;
 * The data from /var/log/libvirt/qemu/*.log;
 * dmesg output from host;
 * /proc/cpuinfo output from both hosts (the one where it worked, and the new one where it didn't work).

Comment 6 Eduardo Habkost 2014-05-27 20:02:52 UTC
Not enough information to investigate, but maybe it is a know bug related to SMEP. Using "nosmep" on the host kernel command-line and using "SandyBridge,-smep" as the CPU model may be a workaround for it.

Comment 8 michael 2014-05-29 03:46:48 UTC
Created attachment 900216 [details]
dmesg log

Comment 9 michael 2014-05-29 03:47:32 UTC
Created attachment 900217 [details]
cpuinfo in proc

Comment 10 michael 2014-05-29 03:51:18 UTC
I also hit the bug on Xeon(R) CPU E5-2690 v2 when installing freebsd 64 bits. The above workaround doesn't work.

Any suggestions?

Because I use the qemu-kvm command to start vm, the libvirt xml and /var/log/libvirt/qemu/*.log don't exist. my command is:
 /usr/libexec/qemu-kvm -name testbsd -M rhel6.5.0 -cpu SandyBridge,-smep -enable-kvm -m 2048 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 7f68743b-d725-4c7d-dc7e-9aa6712584b3 -drive file=/home/test.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -vnc 0.0.0.0:0 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 --cdrom /home/downloads/FreeBSD-10.0-RC3-amd64-dvd1.iso

PS, it works when install 32 bits freebsd such as 7.0-RELEASE-i386-livefs.

Comment 11 Bandan Das 2014-05-29 16:40:19 UTC
(In reply to michael from comment #10)
> I also hit the bug on Xeon(R) CPU E5-2690 v2 when installing freebsd 64
> bits. The above workaround doesn't work.

Your cpuinfo in comment 9 still shows the smep flag. Please boot your host with "nosmep" in the kernel cmdline as Eduardo mentioned in comment 6. 

> Any suggestions?
> 
> Because I use the qemu-kvm command to start vm, the libvirt xml and
> /var/log/libvirt/qemu/*.log don't exist. my command is:
>  /usr/libexec/qemu-kvm -name testbsd -M rhel6.5.0 -cpu SandyBridge,-smep
> -enable-kvm -m 2048 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1
> -uuid 7f68743b-d725-4c7d-dc7e-9aa6712584b3 -drive
> file=/home/test.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -vnc
> 0.0.0.0:0 -device
> ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 --cdrom
> /home/downloads/FreeBSD-10.0-RC3-amd64-dvd1.iso
> 
> PS, it works when install 32 bits freebsd such as 7.0-RELEASE-i386-livefs.

Comment 12 michael 2014-05-30 02:41:16 UTC
(In reply to Bandan Das from comment #11)
> (In reply to michael from comment #10)
> > I also hit the bug on Xeon(R) CPU E5-2690 v2 when installing freebsd 64
> > bits. The above workaround doesn't work.
> 
> Your cpuinfo in comment 9 still shows the smep flag. Please boot your host
> with "nosmep" in the kernel cmdline as Eduardo mentioned in comment 6. 
> 
After correcting my argument in kernel command line, the workaround works. thanks.

> > Any suggestions?
> > 
> > Because I use the qemu-kvm command to start vm, the libvirt xml and
> > /var/log/libvirt/qemu/*.log don't exist. my command is:
> >  /usr/libexec/qemu-kvm -name testbsd -M rhel6.5.0 -cpu SandyBridge,-smep
> > -enable-kvm -m 2048 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1
> > -uuid 7f68743b-d725-4c7d-dc7e-9aa6712584b3 -drive
> > file=/home/test.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -vnc
> > 0.0.0.0:0 -device
> > ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
> > -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 --cdrom
> > /home/downloads/FreeBSD-10.0-RC3-amd64-dvd1.iso
> > 
> > PS, it works when install 32 bits freebsd such as 7.0-RELEASE-i386-livefs.