x86/domctl: rework XEN_DOMCTL_{set,get}_address_size
authorWei Liu <wei.liu2@citrix.com>
Fri, 2 Nov 2018 15:55:40 +0000 (15:55 +0000)
committerWei Liu <wei.liu2@citrix.com>
Mon, 5 Nov 2018 16:09:50 +0000 (16:09 +0000)
commitf969bc9fc966d3f00d756922f35c2b6ebf533967
treedb7bdafc43beadc79ab88adec802cee0d8829ea3
parentaa0816b74f1dffe2d9f3e159915f9a399379278a
x86/domctl: rework XEN_DOMCTL_{set,get}_address_size

Going through toolstack code, they are used for PV guests only.

Tighten their access to PV only. Return -EOPNOTSUPP if they are called
on HVM guests. Rewrite the code in a pattern that makes DCE work.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domctl.c