Re: Qemu crash when trying to boot a VM with 4 NVME in PCI passthrough with KVM internal error. Suberror: 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 02, 2020 at 02:09:09PM +0200, Quentin Grolleau wrote:
> Hello,
> 
> 
> I wanted to know where i can file a bug about "KVM internal error. Suberror: 1"
> 
> Is it on Qemu side, Kernel side or Kvm one ?

The error itself doesn't assign blame to any one component, KVM is simply
stating that it failed instruction emulation.  Emulation can fail for a
number of reasons, in this case it fails because the guest code stream is
garbage.  But, _why_ the guest code stream is garbage is unknown.

> More details :
> 
> 
> I having problems getting VM to run with QEMU 4.0 and 4 NVME in PCI passthrough
> When I create a VM, it quickly goes into a paused state and never
> seems to start working.
> 
> Log shows emulation failure :
> 
> KVM internal error. Suberror: 1
> emulation failure
> EAX=00000086 EBX=000041d8 ECX=00000001 EDX=00008e68
> ESI=00000f01 EDI=00000000 EBP=0000004f ESP=00008e4e
> EIP=00000000 EFL=00210093 [--S-A-C] CPL=0 II=0 A20=1 SMM=0 HLT=0
> ES =9000 00090000 0000ffff 00009300
> CS =bffc 000bffc0 0000ffff 00009f00

I believe 0xb0000 - 0xbffff is used for expansion/option ROMs.

> SS =9000 00090000 0000ffff 00009300
> DS =9000 00090000 0000ffff 00009300
> FS =9000 00090000 0000ffff 00009300
> GS =9000 00090000 0000ffff 00009300
> LDT=0000 00000000 0000ffff 00008200
> TR =0000 00000000 0000ffff 00008b00
> GDT=     00008160 00000028
> 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=<20> 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20
> 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07 20 07
> 20 07 20 07 20 07

This is the direct cause of emulation failure, the guest code stream is
junk.  That could be due to guest BIOS jumping to the wrong location, QEMU
not correctly setting up guest memory, incorrect configuration of memory,
etc...

Given the above EIP=0 and a CS:EIP pointing at expansion memory, my best
guest is that the guest BIOS jumped into an option ROM and gets garbage.

One thought would be to disable option ROMs for all devices by overriding
each device's romfile to be null, e.g.

  -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:55:8e:0d,bus=pci.0,addr=0x3,romfile=

That's not necessarily a solution, but it might help get a better idea of
what's going wrong.  Note, not all devices support "romfile", my super
sophisticated method for disabling option ROMs has been to add "romfile="
for every device and then remove the ones QEMU complains about :-)

Further debug/insight in this area is well beyond my area of expertise.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux