aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vmx
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-06-04 17:25:41 +0200
committerJan Beulich <jbeulich@suse.com>2013-06-04 17:25:41 +0200
commit10b2b21a241795394637167bd4b076f2de17741f (patch)
tree1c69c4e55a295502a3c6c92e5dd359862a95865c /xen/arch/x86/hvm/vmx
parent10f969150025498fe27d985f9021a68f8c7acc31 (diff)
downloadxen-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/vmx')
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index d0de44a2ae..059d258d2d 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2827,12 +2827,10 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
break;
case EXIT_REASON_XSETBV:
- {
- u64 new_bv = (((u64)regs->edx) << 32) | regs->eax;
- if ( hvm_handle_xsetbv(new_bv) == 0 )
+ if ( hvm_handle_xsetbv(regs->ecx,
+ (regs->rdx << 32) | regs->_eax) == 0 )
update_guest_eip(); /* Safe: XSETBV */
break;
- }
case EXIT_REASON_APIC_WRITE:
if ( vmx_handle_apic_write() )