mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
hw/virtio: incorporate backend features in features
There are some extra bits used over a vhost-user connection which are hidden from the device itself. We need to set them here to ensure we enable things like the protocol extensions. Currently net/vhost-user.c has it's own inscrutable way of persisting this data but it really should live in the core vhost_user code. Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
This commit is contained in:
1 parent
f1d33f55c4
commit
02b61f38d3
1 file changed
+8
-1
@@ -1460,7 +1460,14 @@ static int vhost_user_set_features(struct vhost_dev *dev,
|
||||
*/
|
||||
bool log_enabled = features & (0x1ULL << VHOST_F_LOG_ALL);
|
||||
|
||||
return vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, features,
|
||||
/*
|
||||
* We need to include any extra backend only feature bits that
|
||||
* might be needed by our device. Currently this includes the
|
||||
* VHOST_USER_F_PROTOCOL_FEATURES bit for enabling protocol
|
||||
* features.
|
||||
*/
|
||||
return vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES,
|
||||
features | dev->backend_features,
|
||||
log_enabled);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user