port virtio_disk to virtio spec 1.0+

The legacy interface is confusing. It's better to make virtio_disk
conform to the virtio spec. This is supported in QEMU since 4.2 by
disabling force-legacy for virtio-mmio.
This commit is contained in:
Xi Wang 2021-10-17 22:33:39 -07:00
parent a1da53a5a1
commit cd00a8233a
3 changed files with 52 additions and 37 deletions

View file

@ -157,6 +157,7 @@ CPUS := 3
endif
QEMUOPTS = -machine virt -bios none -kernel $K/kernel -m 128M -smp $(CPUS) -nographic
QEMUOPTS += -global virtio-mmio.force-legacy=false
QEMUOPTS += -drive file=fs.img,if=none,format=raw,id=x0
QEMUOPTS += -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0