diff options
author | Kevin Wolf <kwolf@redhat.com> | 2021-10-08 15:34:30 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-10-15 16:05:53 +0200 |
commit | ee8a1c63d337a893fa915dd263dfdaa272e1a76a (patch) | |
tree | dcb8ec4fe218fb68cbab9757305d91c5489937e4 /blockdev.c | |
parent | 5c485d51c4e2e8b3c78110a1a3f31f789c900d9d (diff) | |
download | qemu-ee8a1c63d337a893fa915dd263dfdaa272e1a76a.zip qemu-ee8a1c63d337a893fa915dd263dfdaa272e1a76a.tar.gz qemu-ee8a1c63d337a893fa915dd263dfdaa272e1a76a.tar.bz2 |
net/vhost-vdpa: Fix device compatibility check
vhost-vdpa works only with specific devices. At startup, it second
guesses what the command line option handling will do and error out if
it thinks a non-virtio device will attach to them.
This second guessing is not only ugly, it can lead to wrong error
messages ('-device floppy,netdev=foo' should complain about an unknown
property, not about the wrong kind of network device being attached) and
completely ignores hotplugging.
Drop the old checks and implement .check_peer_type() instead to fix
this. As a nice side effect, it also removes one more dependency on the
legacy QemuOpts infrastructure and even reduces the code size.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20211008133442.141332-4-kwolf@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
0 files changed, 0 insertions, 0 deletions