Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nvmm/x86 Take RAX from the VMCB and not the VCPU sta...
details: https://anonhg.NetBSD.org/src/rev/1867718b222f
branches: trunk
changeset: 445838:1867718b222f
user: maxv <maxv%NetBSD.org@localhost>
date: Wed Nov 14 19:14:40 2018 +0000
description:
Take RAX from the VMCB and not the VCPU state, the latter is not
synchronized and contains old values.
diffstat:
sys/dev/nvmm/x86/nvmm_x86_svm.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 9c14e1e9a5b5 -r 1867718b222f sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c Wed Nov 14 18:28:18 2018 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c Wed Nov 14 19:14:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_x86_svm.c,v 1.2 2018/11/10 09:42:42 maxv Exp $ */
+/* $NetBSD: nvmm_x86_svm.c,v 1.3 2018/11/14 19:14:40 maxv Exp $ */
/*
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.2 2018/11/10 09:42:42 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.3 2018/11/14 19:14:40 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -843,7 +843,7 @@
case NVMM_EXIT_MSR_RDMSR:
if (exit->u.msr.msr == MSR_CR_PAT) {
pat = cpudata->vmcb->state.g_pat;
- state->gprs[NVMM_X64_GPR_RAX] = (pat & 0xFFFFFFFF);
+ cpudata->vmcb->state.rax = (pat & 0xFFFFFFFF);
state->gprs[NVMM_X64_GPR_RDX] = (pat >> 32);
goto handled;
}
@@ -949,7 +949,7 @@
exit->reason = NVMM_EXIT_NONE;
val = (state->gprs[NVMM_X64_GPR_RDX] << 32) |
- (state->gprs[NVMM_X64_GPR_RAX] & 0xFFFFFFFF);
+ (vmcb->state.rax & 0xFFFFFFFF);
if (__predict_false(state->gprs[NVMM_X64_GPR_RCX] != 0)) {
goto error;
Home |
Main Index |
Thread Index |
Old Index