diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-06-04 17:25:41 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-06-04 17:25:41 +0200 |
commit | 10b2b21a241795394637167bd4b076f2de17741f (patch) | |
tree | 1c69c4e55a295502a3c6c92e5dd359862a95865c /xen/arch/x86/hvm/svm | |
parent | 10f969150025498fe27d985f9021a68f8c7acc31 (diff) | |
download | xen-10b2b21a241795394637167bd4b076f2de17741f.tar.gz xen-10b2b21a241795394637167bd4b076f2de17741f.tar.bz2 xen-10b2b21a241795394637167bd4b076f2de17741f.zip |
x86: fix XCR0 handling
- both VMX and SVM ignored the ECX input to XSETBV
- both SVM and VMX used the full 64-bit RAX when calculating the input
mask to XSETBV
- faults on XSETBV did not get recovered from
Also consolidate the handling for PV and HVM into a single function,
and make the per-CPU variable "xcr0" static to xstate.c.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/svm')
-rw-r--r-- | xen/arch/x86/hvm/svm/svm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index cdc176da3e..4a7aeeecf5 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2367,7 +2367,8 @@ void svm_vmexit_handler(struct cpu_user_regs *regs) case VMEXIT_XSETBV: if ( (inst_len = __get_instruction_length(current, INSTR_XSETBV))==0 ) break; - if ( hvm_handle_xsetbv((((u64)regs->edx) << 32) | regs->eax) == 0 ) + if ( hvm_handle_xsetbv(regs->ecx, + (regs->rdx << 32) | regs->_eax) == 0 ) __update_guest_eip(regs, inst_len); break; |