common: map_vcpu_info() cosmetics
authorJan Beulich <jbeulich@suse.com>
Tue, 6 Apr 2021 14:17:42 +0000 (16:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Apr 2021 14:17:42 +0000 (16:17 +0200)
commit7ee7a3749bcb5d39ced5a1ee3e8284b2bb9abc29
treeb6bedbecb359bd864fbcfa0a000a7f676e4ab532
parent0435784cc75dcfef3b5f59c29deb1dbb84265ddb
common: map_vcpu_info() cosmetics

Use ENXIO instead of EINVAL to cover the two cases of the address not
satisfying the requirements. This will make an issue here better stand
out at the call site.

Also add a missing compat-mode related size check: If the sizes
differed, other code in the function would need changing. Accompany this
by a change to the initial sizeof() expression, tying it to the type of
the variable we're actually after (matching e.g. the alignof() added by
XSA-327).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/common/domain.c