x86/HVM: consolidate and sanitize CR4 guest reserved bit determination
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Jun 2014 12:40:34 +0000 (14:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Jun 2014 12:40:34 +0000 (14:40 +0200)
commitdab11417da4e21f43625f4ebbb68158f07003d04
treed94d17b7a0c83d7edcdf543231b748e99f13f3b0
parentddb4aa5dfa13781e8f31ba20923c14c1a083ce83
x86/HVM: consolidate and sanitize CR4 guest reserved bit determination

First of all, this is needed by just a single source file, so it gets
moved there instead of getting fed to the compiler for most other
source files too. With that it becomes sensible for this to no longer
be a macro, allowing elimination of the mostly redundant helpers
hvm_vcpu_has_{smep,smap}(). And finally, following the model SMEP and
SMAP already used, tie the determination of reserved bits to the
features the guest is shown rather than the host's.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/include/asm-x86/hvm/hvm.h