summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2021-02-25 14:12:17 +0000
committerSergio Lopez <slp@sinrega.org>2021-06-17 15:19:00 +0200
commit2e4396c9ccd38afa05078826e41857ed03559b23 (patch)
tree618d21b875530e427ff9e7fd9416e63dd1f1aedb
parente294ed66fcc12e033957f20034ae5fef5bb9eeac (diff)
downloadvmm_vhost-2e4396c9ccd38afa05078826e41857ed03559b23.tar.gz
slave_req_handler: relax reply_ack_flag test
In reality the real guest may never see the VHOST_USER_F_PROTOCOL_FEATURES bit during the device feature negotiation. It is explicitly marked as UNUSED in the VirtIO spec so the it would be perfectly valid for it to be ignored by the virtio driver. The vhost-user spec explicitly states about the GET/SET PROTOCOL FEATURES messages: Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support this message even before ``VHOST_USER_SET_FEATURES`` was called. which implies the final acked feature set shouldn't impact on the negotiated VHOST_USER_PROTOCOL_F_REPLY_ACK feature. This prevents a hang with the QEMU remote end which makes it's determination to ask for a reply based only on the negotiated protocol feature set: virtio_has_feature(dev->protocol_features, VHOST_USER_PROTOCOL_F_REPLY_ACK); Let's be liberal in what we accept. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--src/vhost_user/slave_req_handler.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/vhost_user/slave_req_handler.rs b/src/vhost_user/slave_req_handler.rs
index f2130b7..f899bd6 100644
--- a/src/vhost_user/slave_req_handler.rs
+++ b/src/vhost_user/slave_req_handler.rs
@@ -777,7 +777,6 @@ impl<S: VhostUserSlaveReqHandler> SlaveReqHandler<S> {
let vflag = VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits();
let pflag = VhostUserProtocolFeatures::REPLY_ACK;
if (self.virtio_features & vflag) != 0
- && (self.acked_virtio_features & vflag) != 0
&& self.protocol_features.contains(pflag)
&& (self.acked_protocol_features & pflag.bits()) != 0
{