x86/HVM: XSETBV intercept needs to check CPL on SVM only
authorJan Beulich <jbeulich@suse.com>
Wed, 2 Dec 2015 14:21:15 +0000 (15:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Dec 2015 14:21:15 +0000 (15:21 +0100)
commite513d8f7bc3db90e66bd2ed963b3142f412b770d
treeda4003c00bb7f5fbcc79be53d5e344beabf2c0df
parent484c14b7254e8d8936c05e3c28e332ea825c0155
x86/HVM: XSETBV intercept needs to check CPL on SVM only

VMX doesn't need a software CPL check on the XSETBV intercept, and
SVM can do that check without resorting to hvm_get_segment_register().

Clean up what is left of hvm_handle_xsetbv(), namely make it return a
proper error code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c