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 1079257

Summary: kvm unit test "emulator" fails
Product: Red Hat Enterprise Linux 7 Reporter: Shaolong Hu <shu>
Component: qemu-kvmAssignee: Hai Huang <hhuang>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, juzhang, knoel, michen, pbonzini, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-21 13:42:41 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:

Description Shaolong Hu 2014-03-21 10:10:08 UTC
Description of problem:
--------------------------
kvm unit test "emulator" fails, current we plan to add kvm unit test to qemu-kvm test plan, we are aware this may be qemu, kvm or kvm unit test suite problem, put in qemu-kvm component first, this bug is to track the issue, for future tester reference.


Version-Release number of selected component (if applicable):
---------------------------------------------------------------
3.10.0-101.el7.x86_64
qemu-kvm-rhev-1.5.3-55.el7.x86_64

I think for RHEL7, qemu has no longer much difference from upstream, which in any chance affects kvm unit test, so i use our qemu-kvm "QEMU=/usr/libexec/qemu-kvm ./run_tests.sh" to run the test, but if i am wrong, please correct me.


How reproducible:
-----------------
100%

Steps to Reproduce:
----------------------
use "QEMU=/usr/libexec/qemu-kvm ./run_tests.sh" to run the test, will run into:

KVM internal error. Suberror: 1
emulation failure
RAX=000000000000000a RBX=ffffffffffffe000 RCX=00000000000003fd RDX=00000000000003f8
RSI=0000000000410598 RDI=000000000045251c RBP=2222222222222222 RSP=0000000000451490
R8 =000000000000000a R9 =00000000000003f8 R10=0000000000000000 R11=0000000000000000
R12=ffffffffffffd000 R13=1111111111111111 R14=3333333333333333 R15=00000000a06d39e8
RIP=0000000000404743 RFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
CS =0008 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0000 0000000000000000 ffffffff 00c00000
DS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
FS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0010 0000000000450510 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
TR =0048 000000000040e452 0000ffff 00008b00 DPL=0 TSS64-busy
GDT=     000000000040e00a 00000447
IDT=     0000000000000000 00000fff
CR0=80010011 CR2=0000000000000000 CR3=0000000007fff000 CR4=00000220
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000500
Code=24 38 03 00 00 00 c7 44 24 3c 04 00 00 00 66 0f 6f 44 24 30 <0f> 29 03 48 8d 74 24 30 48 89 df e8 ad e8 ff ff 0f b6 f0 bf 4e 04 41 00 b8 00 00 00 00 e8
qemu: terminating on signal 2


test log:

/usr/libexec/qemu-kvm -enable-kvm -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio -device pci-testdev -kernel x86/emulator.flat -smp 1 -display none
enabling apic
paging enabled
cr0 = 80010011
cr3 = 7fff000
cr4 = 20
PASS: mov reg, r/m (1)
PASS: or
PASS: add
PASS: xor
PASS: sub
PASS: adc(0)
PASS: adc(0)
PASS: sbb(0)
PASS: sbb(1)
PASS: and
PASS: test
PASS: repe/cmpsb (1)
PASS: repe/cmpsb (1.zf)
PASS: repe/cmpsw (1)
PASS: repe/cmpll (1)
PASS: repe/cmpsq (1)
PASS: repe/cmpsb (2)
PASS: repe/cmpsw (2)
PASS: repe/cmpll (2)
PASS: repe/cmpsq (2)
PASS: repe/cmpsb (1)
PASS: repe/cmpsb (1.zf)
PASS: repe/cmpsw (1)
PASS: repe/cmpll (1)
PASS: repe/cmpsq (1)
PASS: repe/cmpsb (2)
PASS: repe/cmpsw (2)
PASS: repe/cmpll (2)
PASS: repe/cmpsq (2)
 PASS: scasb match
PASS: scasb mismatch
PASS: scasw match
PASS: scasw mismatch
PASS: scasd match
PASS: scasd mismatch
PASS: scasq match
PASS: scasq mismatch
PASS: push $imm8
PASS: push reg
PASS: push mem
PASS: push $imm
PASS: pop mem
PASS: pop mem (2)
PASS: pop reg
PASS: ret
PASS: leave
PASS: enter
PASS: xchg reg, r/m (1)
PASS: xchg reg, r/m (2)
PASS: xchg reg, r/m (3)
PASS: xchg reg, r/m (4)
PASS: xadd reg, r/m (1)
PASS: xadd reg, r/m (2)
PASS: xadd reg, r/m (3)
PASS: xadd reg, r/m (4)
PASS: mov ^Ar8
PASS: smsw (1)
PASS: smsw (2)
before 80010011 after 80010019
PASS: lmsw (1)
before 80010011 after 80010011
PASS: lmsw (2)
PASS: lmsw (3)
PASS: ljmp
PASS: outsb up
PASS: outsb down
PASS: incl
PASS: decl
PASS: incb
PASS: decb
PASS: lock incl
PASS: lock decl
PASS: lock incb
PASS: lock decb
PASS: lock negl
PASS: lock notl
PASS: lock negb
PASS: lock notb
PASS: btcl imm8, r/m
PASS: btcl reg, r/m
PASS: bsfw r/m, reg
PASS: bsfl r/m, reg
PASS: bsfq r/m, reg
PASS: bsfq r/m, reg
PASS: bsrw r/m, reg
PASS: bsrl r/m, reg
PASS: bsrq r/m, reg
PASS: bsrq r/m, reg
PASS: imul ax, mem
PASS: imul eax, mem
PASS: imul rax, mem
ASS: imul ax, mem, imm8
PASS: imul eax, mem, imm8
PASS: imul rax, mem, imm8
PASS: imul ax, mem, imm
PASS: imul eax, mem, imm
PASS: imul rax, mem, imm
PASS: divq (fault)
PASS: divq (1)
PASS: mulb mem
PASS: mulw mem
PASS: mull mem
PASS: mulq mem
PASS: movdqu (read)
PASS: movdqu (write)
Return value from qemu: 0

Comment 2 Paolo Bonzini 2014-03-21 13:42:41 UTC
The tests were added to cover instructions MOVAPS/MOVAPD.  These instruction have been backported to RHEL7 for bug 1052090.

*** This bug has been marked as a duplicate of bug 1052090 ***