* 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.
#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;
};
typedef u64 vintr_t;
-typedef u64 eventinj_t;
typedef u64 lbrctrl_t;
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 */
u64 res16[301];
} __attribute__((packed));
-void svm_vmexit(void);
-
#endif