> On 14 Apr 2021, at 12:16, Julien Grall <jul...@xen.org> wrote:
>
> Hi Luca,
>
> On 14/04/2021 10:14, Luca Fancellu wrote:
>> Among the common and arm codebase there are few cases where
>> the hardware_domain variable is checked to see if the current
>> domain is equal to the hardware_domain, change this cases to
>> use is_hardware_domain() function instead. >
>> Signed-off-by: Luca Fancellu <luca.fance...@arm.com>
>> ---
>> v4 changes:
>> - removed unneeded check for domain NULL from is_hardware_domain
>> introduced in v3
>
> After this change, this patch is only avoid to open-code
> is_hardware_domain(). Although, it adds an extra speculation barrier.
>
> I am not against the change, however I think the commit message needs to
> updated to match what the patch is doing.
>
> Can you propose a new commit message?
Hi Julien,
Yes I agree, what about:
xen/arm: Reinforce use of is_hardware_domain
Among the common and arm codebase there are few cases where
the hardware_domain variable is checked to see if the current
domain is equal to the hardware_domain, change this cases to
use is_hardware_domain() function instead.
In the eventuality that hardware_domain is NULL, is_hardware_domain
will return false because an analysis of the common and arm codebase
shows that is_hardware_domain is called always with a non NULL
domain pointer.
Cheers,
Luca
>
> Cheers,
>
> --
> Julien Grall