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 Reset DR7 before loading DR0-3, to prevent ...
details: https://anonhg.NetBSD.org/src/rev/7f2cdc857cff
branches: trunk
changeset: 995982:7f2cdc857cff
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Jan 13 10:07:50 2019 +0000
description:
Reset DR7 before loading DR0-3, to prevent a fault if the host process
has dbregs enabled.
diffstat:
sys/dev/nvmm/x86/nvmm_x86_svm.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r c3dd75e08b2d -r 7f2cdc857cff sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c Sun Jan 13 10:01:07 2019 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c Sun Jan 13 10:07:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_x86_svm.c,v 1.14 2019/01/10 06:58:36 maxv Exp $ */
+/* $NetBSD: nvmm_x86_svm.c,v 1.15 2019/01/13 10:07:50 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.14 2019/01/10 06:58:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.15 2019/01/13 10:07:50 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1128,6 +1128,8 @@
x86_dbregs_save(curlwp);
+ ldr7(0);
+
ldr0(cpudata->drs[NVMM_X64_DR_DR0]);
ldr1(cpudata->drs[NVMM_X64_DR_DR1]);
ldr2(cpudata->drs[NVMM_X64_DR_DR2]);
Home |
Main Index |
Thread Index |
Old Index