]> xenbits.xensource.com Git - seabios.git/commit
virtio: finalize features before using device rel-1.16.1
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Mon, 14 Nov 2022 03:58:18 +0000 (11:58 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 23 Nov 2022 08:28:54 +0000 (09:28 +0100)
commit3208b098f51a9ef96d0dfa71d5ec3a3eaec88f0a
tree686cd8dbf262bd4fff2a588d825257d242828342
parent5ea5c64c20e97e962c520af3f4e413d4b1b98dea
virtio: finalize features before using device

Under the standard of Virtio 1.0, the initialization process of the
device must first write sub-features back to device before
using device, such as finding vqs.

There are four places using vp_find_vq().

1. virtio-blk.pci:    put the code of finalizing features in front of using device
2. virtio-blk.mmio:   put the code of finalizing features in front of using device
3. virtio-scsi.pci:   is ok
4. virtio-scsi.mmio:  add the code of finalizing features before vp_find_vq()

Link: https://www.mail-archive.com/qemu-devel@nongnu.org/msg920776.html
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20221114035818.109511-3-xuanzhuo@linux.alibaba.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/hw/virtio-blk.c
src/hw/virtio-scsi.c