mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vm-virtio: vhost-user: Rely on acked features to setup backend
At this point in the code, the acked features have been provided by the guest and they can be set back to the backend. There's no need to retrieve one more time the backend features for this purpose. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
97699a521f
commit
772191b409
@ -100,8 +100,8 @@ pub fn setup_vhost_user(
|
||||
queue_evts: Vec<EventFd>,
|
||||
acked_features: u64,
|
||||
) -> Result<Vec<(EventFd, Queue)>> {
|
||||
let backend_features = vu.get_features().unwrap();
|
||||
vu.set_features(acked_features & backend_features)
|
||||
// Set features based on the acked features from the guest driver.
|
||||
vu.set_features(acked_features)
|
||||
.map_err(Error::VhostUserSetFeatures)?;
|
||||
|
||||
setup_vhost_user_vring(vu, mem, queues, queue_evts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user