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 nvmm-x86-svm: don't forget to intercept INVD



details:   https://anonhg.NetBSD.org/src/rev/75679e9c0b1d
branches:  trunk
changeset: 943096:75679e9c0b1d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Aug 26 16:29:19 2020 +0000

description:
nvmm-x86-svm: don't forget to intercept INVD

INVD executed in the guest can be dangerous for the host, due to CPU
caches being flushed without write-back.

diffstat:

 sys/dev/nvmm/x86/nvmm_x86_svm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r bb8f12a05625 -r 75679e9c0b1d sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c   Wed Aug 26 16:28:17 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c   Wed Aug 26 16:29:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_svm.c,v 1.71 2020/08/22 10:59:05 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_svm.c,v 1.72 2020/08/26 16:29:19 maxv Exp $   */
 
 /*
  * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.71 2020/08/22 10:59:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.72 2020/08/26 16:29:19 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2118,7 +2118,6 @@
         *  - POPF [popf instruction]
         *  - IRET [iret instruction]
         *  - INTN [int $n instructions]
-        *  - INVD [invd instruction]
         *  - PAUSE [pause instruction]
         *  - INVLPG [invplg instruction]
         *  - TASKSW [task switches]
@@ -2132,6 +2131,7 @@
            VMCB_CTRL_INTERCEPT_RDPMC |
            VMCB_CTRL_INTERCEPT_CPUID |
            VMCB_CTRL_INTERCEPT_RSM |
+           VMCB_CTRL_INTERCEPT_INVD |
            VMCB_CTRL_INTERCEPT_HLT |
            VMCB_CTRL_INTERCEPT_INVLPGA |
            VMCB_CTRL_INTERCEPT_IOIO_PROT |



Home | Main Index | Thread Index | Old Index