xen/arm: Relax ARM_SMCCC_ARCH_WORKAROUND_1 discovery
authorJulien Grall <julien.grall@arm.com>
Mon, 12 Mar 2018 13:19:35 +0000 (13:19 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 16 Mar 2018 20:25:24 +0000 (13:25 -0700)
commit6b270fae7ad462687550a875f714bff18d764416
treec0b7802058bb83c90fe52c9d739123ed70cd6d29
parentb8577547236ff7abaf59bd2dfd4c60c257089abb
xen/arm: Relax ARM_SMCCC_ARCH_WORKAROUND_1 discovery

A recent update to the ARM SMCCC_ARCH_WORKAROUND_1 specification (see [1])
allows firmware to return a non zero, positive value, to describe that
although the mitigation is implemented at the higher exception level,
the CPU on which the call is made is not affected.

Relax the check on the return value from ARM_WORKAROUND_1 so that we
only error out if the returned value is negative.

[1] https://developer.arm.com/support/security-update/downloads
"Firmware interfaces for mitigating CVE-2017-5715 System Software on Arm
Systems"

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/cpuerrata.c