1 /*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD$ 27 */ 28 29 #ifndef _VMX_CONTROLS_H_ 30 #define _VMX_CONTROLS_H_ 31 32 /* Pin-Based VM-Execution Controls */ 33 #define PINBASED_EXTINT_EXITING (1 << 0) 34 #define PINBASED_NMI_EXITING (1 << 3) 35 #define PINBASED_VIRTUAL_NMI (1 << 5) 36 #define PINBASED_PREMPTION_TIMER (1 << 6) 37 38 /* Primary Processor-Based VM-Execution Controls */ 39 #define PROCBASED_INT_WINDOW_EXITING (1 << 2) 40 #define PROCBASED_TSC_OFFSET (1 << 3) 41 #define PROCBASED_HLT_EXITING (1 << 7) 42 #define PROCBASED_INVLPG_EXITING (1 << 9) 43 #define PROCBASED_MWAIT_EXITING (1 << 10) 44 #define PROCBASED_RDPMC_EXITING (1 << 11) 45 #define PROCBASED_RDTSC_EXITING (1 << 12) 46 #define PROCBASED_CR3_LOAD_EXITING (1 << 15) 47 #define PROCBASED_CR3_STORE_EXITING (1 << 16) 48 #define PROCBASED_CR8_LOAD_EXITING (1 << 19) 49 #define PROCBASED_CR8_STORE_EXITING (1 << 20) 50 #define PROCBASED_USE_TPR_SHADOW (1 << 21) 51 #define PROCBASED_NMI_WINDOW_EXITING (1 << 22) 52 #define PROCBASED_MOV_DR_EXITING (1 << 23) 53 #define PROCBASED_IO_EXITING (1 << 24) 54 #define PROCBASED_IO_BITMAPS (1 << 25) 55 #define PROCBASED_MTF (1 << 27) 56 #define PROCBASED_MSR_BITMAPS (1 << 28) 57 #define PROCBASED_MONITOR_EXITING (1 << 29) 58 #define PROCBASED_PAUSE_EXITING (1 << 30) 59 #define PROCBASED_SECONDARY_CONTROLS (1 << 31) 60 61 /* Secondary Processor-Based VM-Execution Controls */ 62 #define PROCBASED2_VIRTUALIZE_APIC (1 << 0) 63 #define PROCBASED2_ENABLE_EPT (1 << 1) 64 #define PROCBASED2_DESC_TABLE_EXITING (1 << 2) 65 #define PROCBASED2_ENABLE_RDTSCP (1 << 3) 66 #define PROCBASED2_VIRTUALIZE_X2APIC (1 << 4) 67 #define PROCBASED2_ENABLE_VPID (1 << 5) 68 #define PROCBASED2_WBINVD_EXITING (1 << 6) 69 #define PROCBASED2_UNRESTRICTED_GUEST (1 << 7) 70 #define PROCBASED2_PAUSE_LOOP_EXITING (1 << 10) 71 #define PROCBASED2_ENABLE_INVPCID (1 << 12) 72 73 /* VM Exit Controls */ 74 #define VM_EXIT_SAVE_DEBUG_CONTROLS (1 << 2) 75 #define VM_EXIT_HOST_LMA (1 << 9) 76 #define VM_EXIT_LOAD_PERF_GLOBAL_CTRL (1 << 12) 77 #define VM_EXIT_ACKNOWLEDGE_INTERRUPT (1 << 15) 78 #define VM_EXIT_SAVE_PAT (1 << 18) 79 #define VM_EXIT_LOAD_PAT (1 << 19) 80 #define VM_EXIT_SAVE_EFER (1 << 20) 81 #define VM_EXIT_LOAD_EFER (1 << 21) 82 #define VM_EXIT_SAVE_PREEMPTION_TIMER (1 << 22) 83 84 /* VM Entry Controls */ 85 #define VM_ENTRY_LOAD_DEBUG_CONTROLS (1 << 2) 86 #define VM_ENTRY_GUEST_LMA (1 << 9) 87 #define VM_ENTRY_INTO_SMM (1 << 10) 88 #define VM_ENTRY_DEACTIVATE_DUAL_MONITOR (1 << 11) 89 #define VM_ENTRY_LOAD_PERF_GLOBAL_CTRL (1 << 13) 90 #define VM_ENTRY_LOAD_PAT (1 << 14) 91 #define VM_ENTRY_LOAD_EFER (1 << 15) 92 93 #endif 94