x86/vvmx: Switch nested MSR intercept handling to use struct vmx_msr_bitmap
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Jul 2017 14:55:03 +0000 (14:55 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Jul 2017 10:39:57 +0000 (11:39 +0100)
commit4da2fe19232e37d3699cd0f4964915dc00b40b58
tree0bfda82be43716e595b0619da27cf6846f082b5c
parent62999081ca27f1a6e3020f0b566fe5b660b19a60
x86/vvmx: Switch nested MSR intercept handling to use struct vmx_msr_bitmap

Rename vmx_check_msr_bitmap() to vmx_msr_is_intercepted() in order to more
clearly identify what the boolean return value means.  Change the int
access_type to bool is_write.

The NULL pointer check is moved out, as it doesn't pertain to whether the MSR
is intercepted or not.  The check is moved into nvmx_n2_vmexit_handler(),
where it becomes a hard error in the case that ACTIVATE_MSR_BITMAP is set.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vmx/vmcs.h