-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netkvm stops working, connectivity loss #402
Comments
Hello Peter, Can you please share network topology of the host and elaborate on the network setup on the host as well. Also if you can share ${KVM_ROOT}/scripts/vm_ifup_brlan. In general, the symptom of the driver failing to unload in case of the network traffic stopped being active indicates that the transmit packet was not returned by the host (just one of the recent cases issue #396). Thanks, |
On the host the interface vm is added to a bridge: ip link show ip addr show cat vm_ifup_brlan BRIDGE=brlan echo "Executing $0" echo "Bringing up $1 for bridged mode..." echo "Disabling STP for bridge $BRIDGE" echo "Adding $1 to $BRIDGE ..." sleep 2 Thanks. |
Peter, |
I don't have the log messages. Thanks. |
Yes, it seems the same problem. Tested with qemu 4.0: |
@peter-held Is it possible to check with addition of 'hv-stimer-direct'? |
Sure, |
If your qemu version does not contain 'hv-stimer-direct', let's postpone this check for now. |
In this moment I'm using the following config (very stable): `#!/bin/sh VM=$(basename $0) KVM_ROOT='/srv/vms/deps' DEVS='01:00.0,01:00.1' "$KVM_ROOT/scripts/unbind_devices" ${DEVS} qemu-system-x86_64 If I change ioeventfd=off to the current config it still works. |
@peter-held Can you please clarify "I'm using the following config (very stable):"? |
I tested some time ago and wrote in a previous post: Tested with qemu 4.0: |
@peter-held Can you please clarify: vhost=on & hv-stimer & ioeventfd=off - working or not? |
Hi, ioeventfd makes no difference: Thanks. |
@peter-held Did you try to remove "-mem-path /dev/hugepages -mem-prealloc"? |
No, why would I want that ? It will slow down the vm. Using -machine pc-i440fx-3.0, it works well with all the options enabled (vhost, hv-stimer, ioeventfd, hugepages). If you want me to test some scenario, just tell me the options and I will test. Thanks. |
Please clarify again: according to your previous message: |
pc-i440fx-3.0, vhost + hv-stimer - huge pages I have not tested this. I don't want to run the vm without huge pages. |
@peter-held I think this test is very important for making progress. |
If I remove hugepages, then is working fine. So, the combination that is not working is: |
Indeed, so this is more or less similar to https://bugs.launchpad.net/qemu/+bug/1811533 (but in our case happens with pc-i440fx-3.0, and their problem happens with pc-q35_3.1). We will continue investigating the problem. |
No, the problem is the same, starting with 3.1 (please see my first post). 3.0 is stable. |
You're right, so I suggest to try "x-hv-synic-kvm-only" with vhost + hv-stimer + huge pages |
Which qemu version implements this flag ? |
x-hv-synic-kvm-only should be added to qemu's -cpu parameter, i.e.: -cpu host,+x-hv-synic-kvm-only,... It is available since qemu 3.1 and switches synic to qemu 3.0 behavior. So far, this is the cheapest way to workaround this problem. |
Hi, yes, if I add 'x-hv-synic-kvm-only', then the problem does not manifest. Is this a bug of qemu or windows netkvm drivers ? Thanks. |
We do not believe it is somehow related to the windows drivers, seems as complicated conflict involving qemu and host kernel. We'll do our best to contact relevant people. |
Thank you. |
closing the issue, please reopen if needed |
Hi,
Starting with qemu-3.1 netkvm driver stops working on my setup, randomly, but very soon after boot on Windows 10. The network is not working anymore and I cannot disable the network interface or driver (waits forever to disable it).
Host OS:
Linux kvm 5.2.0-arch2-1-vfio #1 SMP PREEMPT Thu Jul 11 09:54:19 EEST 2019 x86_64 GNU/Linux
The problem is present also on older kernels (I observed the problem after upgrading to qemu 3.1).
Guest OS:
Windows 10 1809 LTSC (latest updates)
The problem is present also on older Windows versions (I observed the problem after upgrading to qemu 3.1).
Tried with virtio-win 0.1.160, 0.1.164, 0.1.171.
My VM config:
#!/bin/sh
VM=$(basename $0)
KVM_ROOT='/mnt/storage/kvm'
STORAGE_DIR="/dev/zvol/storage/kvm/vms/${VM}"
DEVS='01:00.0,01:00.1,0b:00.0,00:1a.0,0d:00.0,0d:00.1'
qemu-system-x86_64
-daemonize
-pidfile "/run/qemu-${VM}.pid"
-nodefaults -no-user-config
-name "${VM}",process="${VM}"
-accel kvm
-boot menu=on
-rtc base=localtime,clock=vm,driftfix=slew
-global kvm-pit.lost_tick_policy=discard -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1
-no-hpet
-machine pc-i440fx-3.0,accel=kvm,usb=off,vmport=off
-m 8192 -mem-path /dev/hugepages -mem-prealloc
-realtime mlock=off
-cpu host,hv-time,hv-relaxed,hv-vapic,hv-spinlocks=0x1fff,kvm=off,hv-vendor-id=none,hv-crash,hv-reset,hv-vpindex,hv-runtime,hv-synic,hv-stimer
-smp sockets=1,cores=2,threads=2
-drive if=pflash,file="OVMF_CODE-pure-efi.fd",format=raw,readonly
-drive if=pflash,file="OVMF_VARS-pure-efi.fd",format=raw
-debugcon file:ovmf.log -global isa-debugcon.iobase=0x402
-vga none
-nographic
-monitor unix:/run/qemu-${VM}.monitor,server,nowait
-serial none
-parallel none
-chardev socket,id=qga0,path=/run/qemu-${VM}.agent,server,nowait
-device virtio-serial
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
-device vfio-pci,host=01:00.0,bus=pci.0,addr=0x7,multifunction=on,x-no-kvm-intx=on
-device vfio-pci,host=01:00.1,bus=pci.0,addr=0x7.1,x-no-kvm-intx=on
-device vfio-pci,host=0b:00.0,bus=pci.0,x-no-kvm-intx=on
-device vfio-pci,host=00:1a.0,bus=pci.0,x-no-kvm-intx=on
-device vfio-pci,host=0d:00.0,bus=pci.0
-device vfio-pci,host=0d:00.1,bus=pci.0
-usb
-device usb-host,id='Logitech_Inc_G502_Proteus_Spectrum_Optical_Mouse',vendorid=0x046d,productid=0xc332
-device usb-host,id='Microsoft_Corp_Natural_Ergonomic_Keyboard_4000',vendorid=0x045e,productid=0x00db
-netdev tap,id=brlan,ifname=${VM},vhost=on,script=${KVM_ROOT}/scripts/vm_ifup_brlan -device virtio-net-pci,netdev=brlan,mac=52:54:00:00:00:71,ioeventfd=on
-object iothread,id=iothread1
-device virtio-scsi-pci,id=scsi0,iothread=iothread1,num_queues=4
-drive id=drive0,if=none,file="${STORAGE_DIR}/system",format=raw,cache=none,aio=native,discard=unmap,detect-zeroes=on -device scsi-hd,drive=drive0,scsi-id=0,bootindex=2
-drive id=drive1,if=none,file="${STORAGE_DIR}/data",format=raw,cache=none,aio=native,discard=unmap,detect-zeroes=on -device scsi-hd,drive=drive1,scsi-id=1
${OPTS}
Thanks.
The text was updated successfully, but these errors were encountered: