Bug 1074747

Summary: kvm unit test "realmode" fails
Product: Red Hat Enterprise Linux 7 Reporter: Shaolong Hu <shu>
Component: kernelAssignee: Paolo Bonzini <pbonzini>
kernel sub component: KVM QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: hhuang, juzhang, knoel, michen, pbonzini, rbalakri, Robert.Hu, virt-maint
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-3.10.0-143.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 11:41:50 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:
Bug Depends On: 1116936    
Bug Blocks:    

Description Shaolong Hu 2014-03-11 02:22:41 UTC
Description of problem:
-------------------------------------
For record, will fix in RHEL7.1:
https://bugzilla.redhat.com/show_bug.cgi?id=1025279#c4


Version-Release number of selected component (if applicable):
---------------------------------------------------------------
3.10.0-101.el7.x86_64


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


Steps to Reproduce:
----------------------
[root@localhost kvm-unit-tests]# QEMU=/usr/libexec/qemu-kvm ./x86-run ./x86/realmode.flat 
/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/realmode.flat
PASS: null
PASS: shld
PASS: push/pop 1
PASS: push/pop 2
PASS: push/pop 3
PASS: push/pop 4
PASS: push/pop 5
PASS: push/pop 6
PASS: push/pop with high bits set in %esp
PASS: pusha/popa 1
PASS: pusha/popa 1
PASS: mov 1
PASS: mov 2
PASS: mov 3
PASS: mov 4
PASS: mov 5
PASS: cmp 1
PASS: cmp 2
PASS: cmp 3
PASS: add 1
PASS: add 2
PASS: sub 1
PASS: sub 2
PASS: sub 3
PASS: sub 4
PASS: xor 1
PASS: xor 2
PASS: xor 3
PASS: xor 4
PASS: pio 1
PASS: pio 2
PASS: pio 3
PASS: pio 4
PASS: pio 5
PASS: pio 6
PASS: clc
PASS: stc
PASS: cli
PASS: sti
PASS: cld
PASS: std
PASS: jnz short 1
PASS: jnz short 2
PASS: jmp short 1
PASS: jnz near 1
PASS: jnz near 2
PASS: jmp near 1
PASS: call 1
PASS: call near 1
PASS: call near 2
PASS: call far 1
PASS: call far 2
PASS: ret imm 1
KVM internal error. Suberror: 1
emulation failure
EAX=00000000 EBX=00007e90 ECX=00000000 EDX=00000000
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00007e86
EIP=00004049 EFL=00000012 [----A--] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =0000 00000000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0010 00000000 ffffffff 00c09300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT=     00008048 00000017
IDT=     00000000 000003ff
CR0=00000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=00 00 00 fe 4f 52 e4 66 90 66 90 66 b8 34 12 00 00 66 c3 cb <ca> 0a 00 0f 01 15 14 80 00 00 ea 5a 40 00 00 08 00 66 b8 10 00 00 00 8e d8 8e c0 8e e0 8e

Comment 1 Shaolong Hu 2014-03-24 06:59:39 UTC
AMD host won't hit the problem, AMD G1.

Comment 2 Paolo Bonzini 2014-03-24 11:05:54 UTC
Also Westmere or more recent will not hit the problem.

Comment 4 Jarod Wilson 2014-08-07 20:54:30 UTC
Patch(es) available on kernel-3.10.0-143.el7

Comment 7 Shaolong Hu 2014-11-07 09:11:09 UTC
Veirfied on 3.10.0-187.el7.x86_64:

qemu-kvm-1.5.3-77.el7.x86_64 and qemu-kvm-rhev-2.1.2-7.el7


# QEMU=/usr/libexec/qemu-kvm ./x86-run ./x86/realmode.flat 
/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/realmode.flat
PASS: null
PASS: shld
PASS: push/pop 1
PASS: push/pop 2
PASS: push/pop 3
PASS: push/pop 4
PASS: push/pop 5
PASS: push/pop 6
PASS: push/pop with high bits set in %esp
PASS: pusha/popa 1
PASS: pusha/popa 1
PASS: mov 1
PASS: mov 2
PASS: mov 3
PASS: mov 4
PASS: mov 5
PASS: cmp 1
PASS: cmp 2
PASS: cmp 3
PASS: add 1
PASS: add 2
PASS: sub 1
PASS: sub 2
PASS: sub 3
PASS: sub 4
PASS: xor 1
PASS: xor 2
PASS: xor 3
PASS: xor 4
PASS: pio 1
PASS: pio 2
PASS: pio 3
PASS: pio 4
PASS: pio 5
PASS: pio 6
PASS: clc
PASS: stc
PASS: cli
PASS: sti
PASS: cld
PASS: std
PASS: jnz short 1
PASS: jnz short 2
PASS: jmp short 1
PASS: jnz near 1
PASS: jnz near 2
PASS: jmp near 1
PASS: call 1
PASS: call near 1
PASS: call near 2
PASS: call far 1
PASS: call far 2
PASS: ret imm 1
PASS: retf imm 1
PASS: jmp far 1
PASS: xchg 1
PASS: xchg 2
PASS: xchg 3
PASS: xchg 4
PASS: xchg 5
PASS: xchg 6
PASS: xchg 7
PASS: xchg 8
PASS: iret 1
PASS: iret 2
PASS: iret 3
FAIL: rflags.rf
PASS: iret 4
PASS: int 1
PASS: imul 1
PASS: imul 2
PASS: imul 3
PASS: imul 4
PASS: imul 5
PASS: imul 6
PASS: mul 1
PASS: mul 2
PASS: mul 3
PASS: div 1
PASS: div 2
PASS: div 3
PASS: idiv 1
PASS: idiv 2
PASS: idiv 3
PASS: LOOPcc short 1
PASS: LOOPcc short 2
PASS: LOOPcc short 3
PASS: cbq 1
PASS: cwde 1
PASS: cwd 1
PASS: cwd 2
PASS: cdq 1
PASS: cdq 2
PASS: DAS
PASS: lds
PASS: les
PASS: lfs
PASS: lgs
PASS: lss
PASS: jcxz short 1
PASS: jcxz short 2
PASS: jcxz short 3
PASS: jecxz short 1
PASS: jecxz short 2
PASS: cpuid
PASS: ss relative addressing (1)
PASS: ss relative addressing (2)
PASS: sgdt
PASS: sidt
PASS: lahf
PASS: sahf
PASS: movsx
PASS: movzx
PASS: movsx ah
PASS: movzx ah
PASS: bswap
PASS: aad
PASS: aam
PASS: xlat
PASS: salc (1)
PASS: salc (2)
PASS: fninit
PASS: mov dr with mod bits
FAIL: smsw
PASS: nopl
FAIL: xadd
3163 cycles/emulated jump instruction
3488 cycles/emulated move instruction
3263 cycles/emulated arithmetic instruction
3595 cycles/emulated memory load instruction
3828 cycles/emulated memory store instruction
4267 cycles/emulated memory RMW instruction
Return value from qemu: 3

Comment 9 errata-xmlrpc 2015-03-05 11:41:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0290.html