kvm_irqchip_commit_routes: Assertion `ret == 0' failed.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
During win8.1 boot on qemu.git eba05e922e8e7f3
qemu-system-x86_64: /net/gimli/
Bisected to:
commit 851c2a75a6e80c8
Author: Jason Wang <email address hidden>
Date: Thu Apr 23 14:21:47 2015 +0800
virtio-pci: speedup MSI-X masking and unmasking
This patch tries to speed up the MSI-X masking and unmasking through
the mapping between vector and queues. With this patch it will there's
no need to go through all possible virtqueues, which may help to
reduce the time spent when doing MSI-X masking/unmasking a single
vector when more than hundreds or even thousands of virtqueues were
supported.
Tested with 80 queue pairs virito-net-pci by changing the smp affinity
in the background and doing netperf in the same time:
Before the patch:
5711.70 Gbits/sec
After the patch:
6830.98 Gbits/sec
About 19.6% improvements in throughput.
Cc: Michael S. Tsirkin <email address hidden>
Signed-off-by: Jason Wang <email address hidden>
Reviewed-by: Michael S. Tsirkin <email address hidden>
Signed-off-by: Michael S. Tsirkin <email address hidden>
Backtrace:
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f32fffff700 (LWP 23059)]
0x00007f33187438d7 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f33187438d7 in raise () at /lib64/libc.so.6
#1 0x00007f331874553a in abort () at /lib64/libc.so.6
#2 0x00007f331873c47d in __assert_fail_base () at /lib64/libc.so.6
#3 0x00007f331873c532 in () at /lib64/libc.so.6
#4 0x000055e0252fed5b in kvm_irqchip_
at /net/gimli/
#5 0x000055e0252fef46 in kvm_update_
#6 0x000055e0252ff78e in kvm_irqchip_
#7 0x000055e0255899a0 in virtio_
#8 0x000055e025589b76 in virtio_
#9 0x000055e0255186f0 in msix_set_
#10 0x000055e0255187ee in msix_set_
#11 0x000055e02558a1f0 in virtio_
#12 0x000055e02533c2bc in vhost_net_start (dev=0x55e02a0e
at /net/gimli/
#13 0x000055e025336dce in virtio_
#14 0x000055e025336e78 in virtio_
#15 0x000055e0253504c6 in virtio_set_status (vdev=0x55e02a0
at /net/gimli/
#16 0x000055e025588d6d in virtio_ioport_write (opaque=
#17 0x000055e0255891d1 in virtio_
#18 0x000055e025303155 in memory_
at /net/gimli/
#19 0x000055e025303308 in access_
0x55e0253030d0 <memory_
#20 0x000055e025305b15 in memory_
at /net/gimli/
#21 0x000055e0252b68eb in address_space_rw (as=0x55e025b71a80 <address_space_io>, addr=49458, attrs=..., buf=0x7f3322f48000 "\a", len=1, is_write=true)
at /net/gimli/
#22 0x000055e02530041e in kvm_handle_io (port=49458, attrs=..., data=0x7f3322f4
at /net/gimli/
#23 0x000055e025300914 in kvm_cpu_exec (cpu=0x55e02a13
---Type <return> to continue, or q <return> to quit---
at /net/gimli/
#24 0x000055e0252e8062 in qemu_kvm_
at /net/gimli/
#25 0x00007f3321b2352a in start_thread () at /lib64/
#26 0x00007f331880f22d in clone () at /lib64/libc.so.6
VM XML (-snapshot added only for bisect):
<domain type='kvm' id='8' xmlns:qemu='http://
<name>
<uuid>
<memory unit='KiB'
<currentMemory unit='KiB'
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu placement=
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<vcpupin vcpu='2' cpuset='2'/>
<vcpupin vcpu='3' cpuset='3'/>
</cputune>
<resource>
<partition>
</resource>
<os>
<type arch='x86_64' machine=
<loader readonly='yes' type='pflash'
<nvram template=
</os>
<features>
<acpi/>
<apic/>
<pae/>
<kvm>
<hidden state='on'/>
</kvm>
</features>
<cpu mode='host-
<topology sockets='1' cores='4' threads='1'/>
</cpu>
<clock offset='localtime'>
<timer name='rtc' tickpolicy=
<timer name='pit' tickpolicy=
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>
<on_reboot>
<on_crash>
<devices>
<emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none' io='native'/>
<source file='/
<backingStore type='file' index='1'>
<format type='raw'/>
<source file='/
<
<target dev='sda' bus='scsi'/>
<boot order='2'/>
<alias name='scsi0-
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='
<alias name='scsi0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<controller type='usb' index='0' model='ich9-ehci1'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<alias name='usb0'/>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction=
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<alias name='usb0'/>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<alias name='usb0'/>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<interface type='bridge'>
<mac address=
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</source>
<alias name='hostdev0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
</source>
<alias name='hostdev1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</hostdev>
<memballoon model='none'>
<alias name='balloon0'/>
</memballoon>
</devices>
<qemu:
<qemu:arg value='-snapshot'/>
</qemu:
</domain>
From the trace, looks like the driver is trying to assign config vq (2) an vector(2). This is interesting.
I try to reproduce but fail. (The only difference is my guest does not have any vfio and ovmf was not used).
Can you reproduce it without ovmf and vfio?
Thanks