summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/vmm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index c1e34233543..cee2d1955f7 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.203 2018/06/29 04:50:47 mlarkin Exp $ */
+/* $OpenBSD: vmm.c,v 1.204 2018/06/30 19:24:07 guenther Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -1971,7 +1971,7 @@ vcpu_reset_regs_svm(struct vcpu *vcpu, struct vcpu_reg_state *vrs)
ret = vcpu_writeregs_svm(vcpu, VM_RWREGS_ALL, vrs);
/* xcr0 power on default sets bit 0 (x87 state) */
- vcpu->vc_gueststate.vg_xcr0 = XCR0_X87;
+ vcpu->vc_gueststate.vg_xcr0 = XCR0_X87 & xsave_mask;
exit:
return ret;
@@ -2764,7 +2764,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_reg_state *vrs)
/* XXX CR4 shadow */
/* xcr0 power on default sets bit 0 (x87 state) */
- vcpu->vc_gueststate.vg_xcr0 = XCR0_X87;
+ vcpu->vc_gueststate.vg_xcr0 = XCR0_X87 & xsave_mask;
/* Flush the VMCS */
if (vmclear(&vcpu->vc_control_pa)) {