]> rtime.felk.cvut.cz Git - jailhouse.git/blobdiff - hypervisor/arch/x86/include/asm/svm.h
Merge remote-tracking branch 'kiszka/master'
[jailhouse.git] / hypervisor / arch / x86 / include / asm / svm.h
index 89f88c65cb7b73624897924d85b9bdcc08cf4b60..6be28041d2de0bb1ed0ed87362c5ac4920767c0b 100644 (file)
@@ -8,8 +8,12 @@
  * Authors:
  *  Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
  *
- * Definitions in this file were adapted from Xvisor source code.
- * See http://xhypervisor.org for details.
+ * This file is partially derived from
+ * xvisor/arch/x86/cpu/x86_64/include/vm/amd_vmcb.h, which comes with
+ * Xvisor 0.2 (http://xhypervisor.org).
+ *
+ * Copyright (c) 2005-2007, Advanced Micro Devices, Inc
+ * Copyright (c) 2004, Intel Corporation.
  *
  * This work is licensed under the terms of the GNU GPL, version 2.  See
  * the COPYING file in the top-level directory.
@@ -34,7 +38,9 @@
 #define SVM_TLB_FLUSH_ALL      0x01
 #define SVM_TLB_FLUSH_GUEST    0x03
 
-#define NPT_PAGE_DIR_LEVELS    4
+#define SVM_EVENTINJ_EXCEPTION (3UL << 8)
+#define SVM_EVENTINJ_ERR_VALID (1UL << 11)
+#define SVM_EVENTINJ_VALID     (1UL << 31)
 
 struct svm_segment {
        u16 selector;
@@ -260,7 +266,6 @@ enum clean_bits {
 };
 
 typedef u64 vintr_t;
-typedef u64 eventinj_t;
 typedef u64 lbrctrl_t;
 
 struct vmcb {
@@ -288,10 +293,11 @@ struct vmcb {
        u64 exitcode;                   /* offset 0x70 */
        u64 exitinfo1;                  /* offset 0x78 */
        u64 exitinfo2;                  /* offset 0x80 */
-       eventinj_t      exitintinfo;    /* offset 0x88 */
+       u64 exitintinfo;                /* offset 0x88 */
        u64 np_enable;                  /* offset 0x90 */
        u64 res08[2];
-       eventinj_t      eventinj;       /* offset 0xA8 */
+       u32 eventinj;                   /* offset 0xA8 */
+       u32 eventinj_err;               /* offset 0xAC */
        u64 n_cr3;                      /* offset 0xB0 */
        lbrctrl_t lbr_control;          /* offset 0xB8 */
        u64 clean_bits;                 /* offset 0xC0 */
@@ -350,6 +356,4 @@ struct vmcb {
        u64 res16[301];
 } __attribute__((packed));
 
-void svm_vmexit(void);
-
 #endif