xen/domain: Introduce a new sanitise_domain_config() helper
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 2 Oct 2018 13:55:07 +0000 (13:55 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 15 Nov 2018 11:11:30 +0000 (11:11 +0000)
commit7c1a39fc51f0ce167c83fe4a195503e463388fc5
tree8426b9f7350d37daf5a9bd0ee28e9a04da10205c
parent5d797ee199b32e4a789b55ae2aed69561df1bdf4
xen/domain: Introduce a new sanitise_domain_config() helper

Call it from the head of domain_create() (before doing any memory
allocations), which will apply the checks to dom0 as well as domU's.

For now, just subsume the XEN_DOMCTL_CDF_* check from XEN_DOMCTL_createdomain.

In an effort to aid future developoment, leave a debug printk() identifying
the cause of sanitisation failures.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/common/domain.c
xen/common/domctl.c