Re: [PATCH 6/7] x86, lib: Add wbinvd and wbnoinvd helpers to target multiple CPUs
From: Huang, Kai
Date: Thu Mar 13 2025 - 06:20:21 EST
On Wed, 2025-02-26 at 17:48 -0800, Sean Christopherson wrote:
> From: Zheyun Shen <szy0127@xxxxxxxxxxx>
>
> Extract KVM's open-coded calls to do writeback caches on multiple CPUs to
> common library helpers for both WBINVD and WBNOINVD (KVM will use both).
> Put the onus on the caller to check for a non-empty mask to simplify the
> SMP=n implementation, e.g. so that it doesn't need to check that the one
> and only CPU in the system is present in the mask.
>
> Signed-off-by: Zheyun Shen <szy0127@xxxxxxxxxxx>
> Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
> Link: https://lore.kernel.org/r/20250128015345.7929-2-szy0127@xxxxxxxxxxx
> [sean: move to lib, add SMP=n helpers, clarify usage]
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Assume the issue pointed by Zheyun will be addressed:
Acked-by: Kai Huang <kai.huang@xxxxxxxxx>