KVM internal error with some amounts of guest memory
Now that's something else. Reported by a debian user, but trivially reproducible.
$ kvm -m 1.4g KVM internal error. Suberror: 1 emulation failure EAX=000e3c54 EBX=00000000 ECX=00000000 EDX=00000cfd ESI=00000000 EDI=00000000 EBP=00000000 ESP=00006fe8 EIP=000f309b EFL=00000016 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy GDT= 000fd3a8 00000037 IDT= 000fd3e6 00000000 CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=ff ff ba 59 00 00 00 a8 10 89 d8 75 09 b9 ef 2f ff ff ff d1 <eb> 23 59 5b 5e e9 4a ff ff ff 31 d2 89 f0 e8 6c fa ff ff 89 c6 85 c0 79 ab c7 04 24 8c 4c
This is 1.1.
-m 1.5g works. -no-kvm works.
What's that? :)
Thanks,
/mjt
Quoted 25 lines · Michael Tokarev
Now that's something else. Reported by a debian user, but trivially reproducible.
$ kvm -m 1.4g KVM internal error. Suberror: 1 emulation failure EAX=000e3c54 EBX=00000000 ECX=00000000 EDX=00000cfd ESI=00000000 EDI=00000000 EBP=00000000 ESP=00006fe8 EIP=000f309b EFL=00000016 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy GDT= 000fd3a8 00000037 IDT= 000fd3e6 00000000 CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=ff ff ba 59 00 00 00 a8 10 89 d8 75 09 b9 ef 2f ff ff ff d1 <eb> 23 59 5b 5e e9 4a ff ff ff 31 d2 89 f0 e8 6c fa ff ff 89 c6 85 c0 79 ab c7 04 24 8c 4c
Quoted 1 line
This is 1.1.
Qemu 1.1 with -enable-kvm also has this very issue. Switching to qemu-devel@.
Quoted 1 line
-m 1.5g works. -no-kvm works.
I can trivially reproduce this on two machines, both are AMD-based. I don't know if it is amd-specific or not.
/mjt
Quoted 17 lines · Michael Tokarev
Quoted 16 lines · Michael Tokarev
Now that's something else. Reported by a debian user, but trivially reproducible.
$ kvm -m 1.4g KVM internal error. Suberror: 1 emulation failure EAX=000e3c54 EBX=00000000 ECX=00000000 EDX=00000cfd ESI=00000000 EDI=00000000 EBP=00000000 ESP=00006fe8 EIP=000f309b EFL=00000016 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT
Quoted 8 lines
Quoted 8 lines
TR =0000 00000000
0000ffff00008b00DPL=0 TSS32-busy
GDT=000fd3a800000037
IDT=000fd3e600000000
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=ff ff ba 59 00 00 00 a8 10 89 d8 75 09 b9 ef 2f ff ff ff d1 <eb> 23 59 5b 5e e9 4a ff ff ff 31 d2 89 f0 e8 6c fa ff ff 89 c6 85 c0 79 ab c7 04 24 8c 4c
Bisected.
This is introduced by this commit:
8f6f962b994e1402935055ac7093ac977ccc9a5c is the first bad commit commit 8f6f962b994e1402935055ac7093ac977ccc9a5c
Author: Avi Kivity <[email protected]> Date: Wed Feb 29 13:22:12 2012 +0200
kvm: fix unaligned slots
kvm_set_phys_mem() may be passed sections that are not aligned to a page boundary. The current code simply brute-forces the alignment which leads to an inconsistency and an abort().
Fix by aligning the start and the end of the section correctly, discarding and unaligned head or tail.
This was triggered by a guest sizing a 64-bit BAR that is smaller than a page with PCI_COMMAND_MEMORY enabled and the upper dword clear.
:100644 100644 c4babdac0dd3335eab1a9e45371b7df2c0dd1c9c 4b7a4ae5dd6d9bd0b4cfa37159382654f0641e8d M kvm-all.c
Once again, this affects both qemu-kvm and qemu (with -enable-kvm) 1.1, at least on AMD host, and the issue gets reported immediately when starting the virtual machine with -m 1.4g (no other arguments).
Thanks,
/mjt
Quoted 48 lines · Michael Tokarev
Quoted 17 lines · Michael Tokarev
Quoted 16 lines · Michael Tokarev
Now that's something else. Reported by a debian user, but trivially reproducible.
$ kvm -m 1.4g KVM internal error. Suberror: 1 emulation failure EAX=000e3c54 EBX=00000000 ECX=00000000 EDX=00000cfd ESI=00000000 EDI=00000000 EBP=00000000 ESP=00006fe8 EIP=000f309b EFL=00000016 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDTQuoted 8 lines
Quoted 8 lines
TR =0000 00000000
0000ffff00008b00DPL=0 TSS32-busy
GDT=000fd3a800000037
IDT=000fd3e600000000
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=ff ff ba 59 00 00 00 a8 10 89 d8 75 09 b9 ef 2f ff ff ff d1 <eb> 23 59 5b 5e e9 4a ff ff ff 31 d2 89 f0 e8 6c fa ff ff 89 c6 85 c0 79 ab c7 04 24 8c 4cBisected.
This is introduced by this commit:
8f6f962b994e1402935055ac7093ac977ccc9a5cis the first bad commit commit8f6f962b994e1402935055ac7093ac977ccc9a5cAuthor: Avi Kivity <[email protected]> Date: Wed Feb 29 13:22:12 2012 +0200kvm: fix unaligned slots
kvm_set_phys_mem()may be passed sections that are not aligned to a page boundary. The current code simply brute-forces the alignment which leads to an inconsistency and anabort().Fix by aligning the start and the end of the section correctly, discarding and unaligned head or tail.
This was triggered by a guest sizing a 64-bit BAR that is smaller than a page with
PCI_COMMAND_MEMORYenabled and the upper dword clear.
Quoted 7 lines
Signed-off-by Avi Kivity <[email protected]>:100644 100644
c4babdac0dd3335eab1a9e45371b7df2c0dd1c9c4b7a4ae5dd6d9bd0b4cfa37159382654f0641e8dMkvm-all.cOnce again, this affects both qemu-kvm and qemu (with -enable-kvm) 1.1, at least on AMD host, and the issue gets reported immediately when starting the virtual machine with -m 1.4g (no other arguments).
Thanks for the clear report. The problem is that 1.4g is not aligned on a page boundary (in fact it's not even aligned to a byte boundary), and some bios code tries to execute off the partial page at the end. kvm doesn't support executing off partial pages, hence the breakage.
The proper fix is to align the memory size, but how? upwards or downwards? To a page boundary or something larger?
Signature · 1 line
error compiling committee.c: too many arguments to function