Skip to content
  • Alex Bennée's avatar
    56534930
    hw/virtio/vhost-user: don't suppress F_CONFIG when supported · 56534930
    Alex Bennée authored
    
    
    Previously we would silently suppress VHOST_USER_PROTOCOL_F_CONFIG
    during the protocol negotiation if the QEMU stub hadn't implemented
    the vhost_dev_config_notifier. However this isn't the only way we can
    handle config messages, the existing vdc->get/set_config can do this
    as well.
    
    Lightly re-factor the code to check for both potential methods and
    instead of silently squashing the feature error out. It is unlikely
    that a vhost-user backend expecting to handle CONFIG messages will
    behave correctly if they never get sent.
    
    Fixes: 1c3e5a26 ("vhost-user: back SET/GET_CONFIG requests with a protocol feature")
    Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    
    Message-Id: <20220321153037.3622127-13-alex.bennee@linaro.org>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    56534930
    hw/virtio/vhost-user: don't suppress F_CONFIG when supported
    Alex Bennée authored
    
    
    Previously we would silently suppress VHOST_USER_PROTOCOL_F_CONFIG
    during the protocol negotiation if the QEMU stub hadn't implemented
    the vhost_dev_config_notifier. However this isn't the only way we can
    handle config messages, the existing vdc->get/set_config can do this
    as well.
    
    Lightly re-factor the code to check for both potential methods and
    instead of silently squashing the feature error out. It is unlikely
    that a vhost-user backend expecting to handle CONFIG messages will
    behave correctly if they never get sent.
    
    Fixes: 1c3e5a26 ("vhost-user: back SET/GET_CONFIG requests with a protocol feature")
    Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    
    Message-Id: <20220321153037.3622127-13-alex.bennee@linaro.org>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Loading