x86/hvm: Improve CR4 verification using named features
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Jan 2017 11:59:02 +0000 (11:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Jan 2017 11:59:02 +0000 (11:59 +0000)
commitf0b043042e1d85b0d3f51a4a27c543b199c45a47
tree6dc9d1105c7d9bd30bb21ccadb734c3c6e24ecf5
parent9e081fbcd5f75a47f8c2e0a92dbaa427f31e9d48
x86/hvm: Improve CR4 verification using named features

Alter the function to return the valid CR4 bits, rather than the invalid CR4
bits.  This will allow reuse in other areas of code.

Pick the appropriate cpuid_policy object rather than using hvm_cpuid() or
boot_cpu_data.  This breaks the dependency on current.

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