vhost-user: back SET/GET_CONFIG requests with a protocol feature
commit1c3e5a261709daee4a01f30b1534329b2eea386e
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 29 Mar 2018 07:52:33 +0000 (29 09:52 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 9 Apr 2018 14:35:46 +0000 (9 17:35 +0300)
tree89519017ce06eb0f639886a884a99735420bc2d7
parentbc6abcff7c608dba27962efa75f234c5dd10e290
vhost-user: back SET/GET_CONFIG requests with a protocol feature

Without a dedicated protocol feature, QEMU cannot know whether
the backend can handle VHOST_USER_SET_CONFIG and
VHOST_USER_GET_CONFIG messages.

This patch adds a protocol feature that is only advertised by
QEMU if the device implements the config ops. Vhost user init
fails if the device support the feature but the backend doesn't.

The backend should only send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG
requests if the protocol feature has been negotiated.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Changpeng Liu <changpeng.liu@intel.com>
docs/interop/vhost-user.txt
hw/virtio/vhost-user.c