On 5/18/26 7:33 PM, Eliot Courtney wrote:
On Fri May 15, 2026 at 3:12 PM JST, Alexandre Courbot wrote:
...
@@ -129,6 +130,7 @@ pub(crate) fn unload(
          dev: &device::Device<device::Bound>,
          bar: &Bar0,
          gsp_falcon: &Falcon<Gsp>,
+        sec2_falcon: &Falcon<Sec2>,
      ) -> Result {
          // Shut down the GSP.
          Self::shutdown_gsp(
@@ -139,6 +141,18 @@ pub(crate) fn unload(
          )
          .inspect_err(|e| dev_err!(dev, "Unload guest driver failed: {:?}\n", 
e))?;

Suppose that shutdown_gsp fails. In that case, we early return and don't
try to reset. Is that the correct behaviour? Maybe we still want to try
to reset even though shutdown didn't work. OpenRM looks like it still
tries the reset even if shutdown fails.

For shutdown and teardown paths, a counter-intuitive bit of lore
exists, which is, as suggested above: try to tear everything down,
even if one part of the teardown fails. Just soldier on.

Sorry for the drive by comment. I have many reviews that I need to
*properly* get done and haven't yet. But this is worth pointing
out because it is such a common pitfall.



thanks,
--
John Hubbard

Reply via email to