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)
committerJulien Grall <julien.grall@arm.com>
Fri, 1 Nov 2019 14:31:49 +0000 (14:31 +0000)
commit92f91d283d8149dbd6a083589ec6d73c34c06459
treed83efb0207ddd1d40f538d2b03aa49263e7726b8
parentefee8ba9bf84d54e752f2a44c510cdfb3cc0c282
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>
xen/arch/arm/traps.c