From b5408666f19cc16ea07c3eb333007d4883e6f4a2 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 2 May 2022 16:03:53 +0530 Subject: [PATCH 1/2] gpio: Enable REPLY_ACK protocol feature The virtio-gpio driver at the guest performs virtio transaction right from its probe() routine and without this patch, there is a chance that the backend may miss the notification from the guest, as the notification may be sent before the eventfd is set at the backend. This flag makes the master side wait for reply from backend before proceeding further for each operation. Signed-off-by: Viresh Kumar --- gpio/src/vhu_gpio.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gpio/src/vhu_gpio.rs b/gpio/src/vhu_gpio.rs index 67774f5..bbcd492 100644 --- a/gpio/src/vhu_gpio.rs +++ b/gpio/src/vhu_gpio.rs @@ -391,7 +391,9 @@ impl VhostUserBackendMut } fn protocol_features(&self) -> VhostUserProtocolFeatures { - VhostUserProtocolFeatures::MQ | VhostUserProtocolFeatures::CONFIG + VhostUserProtocolFeatures::MQ + | VhostUserProtocolFeatures::CONFIG + | VhostUserProtocolFeatures::REPLY_ACK } fn get_config(&self, offset: u32, size: u32) -> Vec { @@ -1098,7 +1100,9 @@ mod tests { assert_eq!(backend.features(), 0x171000001); assert_eq!( backend.protocol_features(), - VhostUserProtocolFeatures::MQ | VhostUserProtocolFeatures::CONFIG + VhostUserProtocolFeatures::MQ + | VhostUserProtocolFeatures::CONFIG + | VhostUserProtocolFeatures::REPLY_ACK ); assert_eq!(backend.queues_per_thread(), vec![0xffff_ffff]); From f68f6b5fdf5ab94d6cbb2f12f509119d54ecaacf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 09:34:45 +0000 Subject: [PATCH 2/2] build(deps): bump log from 0.4.16 to 0.4.17 Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/commits/0.4.17) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0b5b17..7049dfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ]