Reinitialize all the registers
This fixes vtnet operation with virtio-net-device of latest QEMU.
Differential D15821
Reinitialize virtqueues br on Jun 15 2018, 11:57 AM. Authored by Tags None Referenced Files
Subscribers
Details
Reinitialize all the registers This fixes vtnet operation with virtio-net-device of latest QEMU. Tested with MMIO bus on FreeBSD/RISC-V: qemu-system-riscv64 -machine virt -m 2048M -kernel bbl -nographic -netdev tap,ifname=tap0,script=no,id=net0 -device virtio-net-device,netdev=net0 -smp cpus=8
Diff Detail
Event TimelineComment Actions I don't follow why qemu clearing "pointers" means that we realloc the virtqueues in the guest. The host virtqueue state is reinitialized as part of the reinit process. Also, what do you believe has "recently" changed in qemu's virtio_reset? The blame shows very little changes in the last several years. I didn't write the MMIO driver and am not as familiar the spec, but perhaps your issue is because vtmmio_reinit_virtqueue() does not replicate all the steps that vtmmio_alloc_virtqueues() perform. Namely, it is missing vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_NUM, size); vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_ALIGN, VIRTIO_MMIO_VRING_ALIGN); that I could see being otherwise reset by qemu because of a reset status.
|