]> xenbits.xensource.com Git - xen.git/commit
xen/arm: traps: Don't ignore invalid value for serrors=
authorJulien Grall <julien.grall@arm.com>
Mon, 21 Oct 2019 12:28:36 +0000 (13:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 27 Nov 2019 22:31:00 +0000 (14:31 -0800)
commit2caa4192cd243a9e7258a6d97226e15e56756a28
tree4b97778e97ed08120c7b357510e0c8d382b757d6
parent26d307a322ed9ccc62aa18db632f9dd4611934ce
xen/arm: traps: Don't ignore invalid value for serrors=

serrors= only supports 3 values "diverse", "forward" and "panic".

The current implementation of parse_serrors_behavior() will default to
"diverse" for any invalid value and not tell the users.

Rather than ignore the invalid input, return an error to the caller so
it can decides the be approach.

This will be useful after a follow-up patch where the number of options
will be reduced.

Take the opportunity to initialize serrors_op to SERRORS_DIVERSE rather
than relying on the item to be the first in the enum and therefore
equal to 0.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellin <sstabellini@kernel.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
(cherry picked from commit 92f91d283d8149dbd6a083589ec6d73c34c06459)
xen/arch/arm/traps.c