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 928651

Summary: q35 machine type cause qemu-kvm core dump on an AMD machine
Product: Red Hat Enterprise Linux 7 Reporter: FuXiangChun <xfu>
Component: qemu-kvmAssignee: Marcel Apfelbaum <marcel>
Status: CLOSED WORKSFORME QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: acathrow, hhuang, juzhang, knoel, kraxel, marcel, michen, mst, pbonzini, rhod, virt-bugs, virt-maint, xfu
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-07-14 15:16:22 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
lspci infomation
none
dmidecode info
none
cpu info none

Description FuXiangChun 2013-03-28 07:02:01 UTC
Description of problem:
Just hit this issue on an AMD machine. Tested another AMD and Intel machines, Both don't hit this issue. I will add hardware info of machine to attachment. If don't use q35 machine type to boot guest, then qemu-kvm work well.

Version-Release number of selected component (if applicable):
# uname -r
3.9.0-0.rc4.45.el7.x86_64

#qemu-kvm
qemu-kvm-1.4.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1./usr/libexec/qemu-kvm -M q35 -enable-kvm -cpu Opteron_G3 -m 4096 -smp 2,sockets=2,cores=1,threads=1 -monitor stdio -vnc :1

2.
3.
  
Actual results:
qemu core dump:

(gdb) bt 
#0  0x00007ffff2b4d66c in __memcmp_sse2 () from /lib64/libc.so.6
#1  0x0000555555793f92 in patch_hypercalls (s=0x5555565298f0) at /usr/src/debug/qemu-1.4.0/hw/kvmvapic.c:544
#2  vapic_prepare (s=s@entry=0x5555565298f0) at /usr/src/debug/qemu-1.4.0/hw/kvmvapic.c:609
#3  0x0000555555794316 in vapic_write (opaque=0x5555565298f0, addr=<optimized out>, data=<optimized out>, 
    size=<optimized out>) at /usr/src/debug/qemu-1.4.0/hw/kvmvapic.c:646
#4  0x00005555557c2942 in access_with_adjusted_size (addr=addr@entry=0, value=value@entry=0x7fffec97eae8, size=2, 
    access_size_min=<optimized out>, access_size_max=<optimized out>, 
    access=access@entry=0x5555557c2f60 <memory_region_write_accessor>, opaque=opaque@entry=0x55555652bc18)
    at /usr/src/debug/qemu-1.4.0/memory.c:364
#5  0x00005555557c3fb7 in memory_region_iorange_write (iorange=<optimized out>, offset=0, width=2, data=32)
    at /usr/src/debug/qemu-1.4.0/memory.c:439
#6  0x00005555557c0d85 in kvm_handle_io (count=1, size=2, direction=1, data=<optimized out>, port=126)
    at /usr/src/debug/qemu-1.4.0/kvm-all.c:1429
#7  kvm_cpu_exec (env=env@entry=0x55555650f790) at /usr/src/debug/qemu-1.4.0/kvm-all.c:1581
#8  0x000055555576a871 in qemu_kvm_cpu_thread_fn (arg=0x55555650f790) at /usr/src/debug/qemu-1.4.0/cpus.c:759
#9  0x00007ffff6487d15 in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff2bb746d in clone () from /lib64/libc.so.6


Expected results:
qemu work well

Additional info:

Comment 1 FuXiangChun 2013-03-28 07:03:18 UTC
Created attachment 717461 [details]
lspci infomation

Comment 2 FuXiangChun 2013-03-28 07:03:49 UTC
Created attachment 717462 [details]
dmidecode info

Comment 3 FuXiangChun 2013-03-28 07:05:40 UTC
Created attachment 717463 [details]
cpu info

I attached information of lspci dmidecode and cpuinfo

Comment 5 FuXiangChun 2013-03-28 08:16:23 UTC
Found root reason of this issue, seabios(seabios-1.7.1-4.el7) cause this issue. seabios-1.7.2-0.2.gita810e4e7.el7 support q35 machine type work well. Since I used a wrong seabios to boot qemu. so lead to qemu core dump. 

Although the latest seabios version have fixed this issue,and UI won't hit issue, but from qemu point of view, It shouldn't core dump, perhaps some users also will hit this problem. so I set this bug as low low.

Comment 7 Ronen Hod 2014-07-13 13:51:28 UTC
Since we did not officially release Q35 with the old BIOS, it is enough if this bug is fixed in 7.1.
QE, please verify and close.

Comment 8 juzhang 2014-07-14 03:42:05 UTC
Hi Xiangchun, 

Can you handle this issue?

Best Regards,
Junyi

Comment 9 FuXiangChun 2014-07-14 04:24:57 UTC
QE tested this bug with the latest qemu-kvm * seabios as below.  qemu-kvm works well.  Don't hit this issue.

# rpm -qa|grep seabios
seabios-1.7.5-1.el7.x86_64
seabios-bin-1.7.5-1.el7.x86_64

# rpm -qa|grep qemu-kvm
qemu-kvm-1.5.3-66.el7.x86_64

Comment 10 Ronen Hod 2014-07-14 15:16:22 UTC
(In reply to FuXiangChun from comment #9)
> QE tested this bug with the latest qemu-kvm * seabios as below.  qemu-kvm
> works well.  Don't hit this issue.

Thanks. Closing this bug.