Re: [PATCHv8 10/17] x86/tdx: Convert shared memory back to private on kexec

From: Huang, Kai
Date: Tue Feb 27 2024 - 18:33:08 EST



+/* Stop new private<->shared conversions */
+static void tdx_kexec_stop_conversion(bool crash)
+{
+ /*
+ * Crash kernel reaches here with interrupts disabled: can't wait for
+ * conversions to finish.
+ *
+ * If race happened, just report and proceed.
+ */
+ bool wait_for_lock = !crash;
+
+ if (!stop_memory_enc_conversion(wait_for_lock))
+ pr_warn("Failed to finish shared<->private conversions\n");

"Failed to finish" -> "Failed to stop"? stop_memory_enc_conversion() doesn't actually finish any conversion.

Other than that:

Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>