From: Dave Hansen <dave.hansen@linux.intel.com>
To: dave.hansen@linux.intel.com
Subject: Re: [PATCH v9 13/23] x86/virt/seamldr: Abort updates after a failed step
In-Reply-To: <20260513151045.1420990-14-chao.gao@intel.com>
References: <20260513151045.1420990-14-chao.gao@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[Draft review generated by x86-maintainer-agent applying Dave_Hansen.txt
 rules to the v9 series.  Strip this banner before sending.]

> +	ctrl->num_failed += !!result;
> +	ctrl->num_ack++;
> +	if (ctrl->num_ack == num_online_cpus() && !ctrl->num_failed)
> +		__set_target_state(ctrl, ctrl->state + 1);

Clean.  Counter-instead-of-flag is the right call -- thanks for taking
the v8 feedback.

> +	} while (curstate != MODULE_UPDATE_DONE && !READ_ONCE(update_ctrl.num_failed));

The READ_ONCE on the unlocked side is fine here: num_failed only ever
increases, so a stale-zero read just means one more iteration before
we exit, and the lock side never decrements it.

Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
