x86: stop handling MSR_IA32_BNDCFGS save/restore in implementation code
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 14 Mar 2019 13:56:00 +0000 (14:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Apr 2019 13:06:40 +0000 (15:06 +0200)
commit832c1803ca71fdb1526384d43c24b158a25f4639
tree8f665d2053cea803f1b0e566dfd208ce635501be
parent5ba1c5d0641cf63086b3058e547fcd28c3c4a011
x86: stop handling MSR_IA32_BNDCFGS save/restore in implementation code

Saving and restoring the value of this MSR is currently handled by
implementation-specific code despite it being architectural. This patch
moves handling of accesses to this MSR from hvm.c into the msr.c, thus
allowing the common MSR save/restore code to handle it.

NOTE: Because vmx_get/set_guest_bndcfgs() call vmx_vmcs_enter(), the
      struct vcpu pointer passed in, and hence the vcpu pointer passed to
      guest_rdmsr() cannot be const.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/msr.c
xen/include/asm-x86/hvm/hvm.h