[Rust-VMM] [RFC PATCH] vhost_user/slave_reg_handler: relax the reply_ack_flag test

Alex Bennée alex.bennee at linaro.org
Thu Feb 25 14:21:56 UTC 2021


In reality the real guest may never see PROTOCOL_FEATURES bit when it
probes the device configuration. It shouldn't matter to it anyway as
they details of reply acknowledgement have already been negotiated
between the two ends of the vhost-user protocol having been advertised
by the backend on start-up. 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:

    bool reply_supported = 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 at linaro.org>
Cc: Michael S. Tsirkin <mst at redhat.com>
---
 src/vhost_user/slave_req_handler.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/vhost_user/slave_req_handler.rs b/src/vhost_user/slave_req_handler.rs
index f3b0770..f7c9aeb 100644
--- a/src/vhost_user/slave_req_handler.rs
+++ b/src/vhost_user/slave_req_handler.rs
@@ -537,7 +537,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
         {
-- 
2.20.1




More information about the Rust-vmm mailing list