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 Add definitions for RDPRU, MCOMMIT, GMET an...



details:   https://anonhg.NetBSD.org/src/rev/aca39905ee74
branches:  trunk
changeset: 845505:aca39905ee74
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Oct 04 12:11:38 2019 +0000

description:
Add definitions for RDPRU, MCOMMIT, GMET and VTE.

diffstat:

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

diffs (59 lines):

diff -r 97121afce19d -r aca39905ee74 sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c   Fri Oct 04 12:08:33 2019 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c   Fri Oct 04 12:11:38 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_svm.c,v 1.46 2019/05/11 07:31:56 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_svm.c,v 1.47 2019/10/04 12:11:38 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.46 2019/05/11 07:31:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.47 2019/10/04 12:11:38 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -202,6 +202,7 @@
 #define VMCB_EXITCODE_MWAIT            0x008B
 #define VMCB_EXITCODE_MWAIT_CONDITIONAL        0x008C
 #define VMCB_EXITCODE_XSETBV           0x008D
+#define VMCB_EXITCODE_RDPRU            0x008E
 #define VMCB_EXITCODE_EFER_WRITE_TRAP  0x008F
 #define VMCB_EXITCODE_CR0_WRITE_TRAP   0x0090
 #define VMCB_EXITCODE_CR1_WRITE_TRAP   0x0091
@@ -219,6 +220,7 @@
 #define VMCB_EXITCODE_CR13_WRITE_TRAP  0x009D
 #define VMCB_EXITCODE_CR14_WRITE_TRAP  0x009E
 #define VMCB_EXITCODE_CR15_WRITE_TRAP  0x009F
+#define VMCB_EXITCODE_MCOMMIT          0x00A3
 #define VMCB_EXITCODE_NPF              0x0400
 #define VMCB_EXITCODE_AVIC_INCOMP_IPI  0x0401
 #define VMCB_EXITCODE_AVIC_NOACCEL     0x0402
@@ -287,10 +289,14 @@
 #define VMCB_CTRL_INTERCEPT_MONITOR    __BIT(10)
 #define VMCB_CTRL_INTERCEPT_MWAIT      __BIT(12)
 #define VMCB_CTRL_INTERCEPT_XSETBV     __BIT(13)
+#define VMCB_CTRL_INTERCEPT_RDPRU      __BIT(14)
 #define VMCB_CTRL_INTERCEPT_EFER_SPEC  __BIT(15)
 #define VMCB_CTRL_INTERCEPT_WCR_SPEC(x)        __BIT(16 + x)
 
-       uint8_t  rsvd1[40];
+       uint32_t intercept_misc3;
+#define VMCB_CTRL_INTERCEPT_MCOMMIT    __BIT(3)
+
+       uint8_t  rsvd1[36];
        uint16_t pause_filt_thresh;
        uint16_t pause_filt_cnt;
        uint64_t iopm_base_pa;
@@ -332,6 +338,8 @@
 #define VMCB_CTRL_ENABLE_NP            __BIT(0)
 #define VMCB_CTRL_ENABLE_SEV           __BIT(1)
 #define VMCB_CTRL_ENABLE_ES_SEV                __BIT(2)
+#define VMCB_CTRL_ENABLE_GMET          __BIT(3)
+#define VMCB_CTRL_ENABLE_VTE           __BIT(5)
 
        uint64_t avic;
 #define VMCB_CTRL_AVIC_APIC_BAR                __BITS(51,0)



Home | Main Index | Thread Index | Old Index