summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2023-04-26 15:34:32 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2023-04-26 15:34:32 +0000
commitb4b05569db7e687bedeba554991de439185d1740 (patch)
treee9596d93e6493c5ccb5a380e3964d959689839e7 /sys/arch/amd64
parent01aef953d379852fe58e06dff1add12774c4e5a6 (diff)
Integrate r1.339 of vmm.c which I missed during the previous MI/MD split
--- revision 1.339 date: 2023/04/22 18:27:28; author: guenther; state: Exp; lines: +3 -3; commitid: ajtkYPSAhtJdB488; Rename the XCR0_* #defines to XFEATURE_* and add the new supervisor-state features: while all are appropriate for xsaves/xrstors, the supervisor-state features aren't for xcr0 but rather for the new XSS_MSR, making the current names kinda confusing. Add #defines for masking bits for xcr0 vs XSS. Add and report the new XSAVE_XFD xsave subfeature bit. ---
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/vmm_machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/vmm_machdep.c b/sys/arch/amd64/amd64/vmm_machdep.c
index 9f7129fcb5e..acfca6d2947 100644
--- a/sys/arch/amd64/amd64/vmm_machdep.c
+++ b/sys/arch/amd64/amd64/vmm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm_machdep.c,v 1.1 2023/04/26 15:11:21 mlarkin Exp $ */
+/* $OpenBSD: vmm_machdep.c,v 1.2 2023/04/26 15:34:31 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -2062,7 +2062,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 & xsave_mask;
+ vcpu->vc_gueststate.vg_xcr0 = XFEATURE_X87 & xsave_mask;
vcpu->vc_parent->vm_map->pmap->eptp = 0;
@@ -2863,7 +2863,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 & xsave_mask;
+ vcpu->vc_gueststate.vg_xcr0 = XFEATURE_X87 & xsave_mask;
/* XXX PAT shadow */
vcpu->vc_shadow_pat = rdmsr(MSR_CR_PAT);