thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-target-i386-add-VMX-features-to-named-CPU-models-RHE.patch

Pablo Greco e6a3ae
From 1163b93bcdbef8e11c276722014d39c3619dbd1b Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Date: Fri, 22 Nov 2019 11:53:48 +0000
Pablo Greco e6a3ae
Subject: [PATCH 15/16] target/i386: add VMX features to named CPU models (RHEL
Pablo Greco e6a3ae
 only)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Message-id: <20191122115348.25000-16-pbonzini@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 92614
Pablo Greco e6a3ae
O-Subject: [RHEL8.2/rhel qemu-kvm PATCH 15/15] target/i386: add VMX features to named CPU models (RHEL only)
Pablo Greco e6a3ae
Bugzilla: 1689270
Pablo Greco e6a3ae
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Maxim Levitsky <mlevitsk@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Upstream has switched to versioned CPU models in order to provide the
Pablo Greco e6a3ae
noTSX and IBRS variants.  In 2.12, VMX features have to be duplicated by
Pablo Greco e6a3ae
hand.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 target/i386/cpu.c | 538 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
Pablo Greco e6a3ae
 1 file changed, 538 insertions(+)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
Pablo Greco e6a3ae
index 36c9252..3effcf3 100644
Pablo Greco e6a3ae
--- a/target/i386/cpu.c
Pablo Greco e6a3ae
+++ b/target/i386/cpu.c
Pablo Greco e6a3ae
@@ -2212,6 +2212,46 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
Pablo Greco e6a3ae
         .features[FEAT_8000_0001_ECX] =
Pablo Greco e6a3ae
             CPUID_EXT3_LAHF_LM,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core i7 9xx (Nehalem Core i7, IBRS update)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2307,6 +2347,47 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_7_0_EDX_SPEC_CTRL,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Westmere E56xx/L56xx/X56xx (IBRS update)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2412,6 +2493,47 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Xeon E312xx (Sandy Bridge, IBRS update)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2526,6 +2648,50 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2562,6 +2728,52 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Haswell, no TSX)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2600,6 +2812,52 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Haswell, no TSX, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2722,6 +2980,52 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Haswell, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2760,6 +3064,53 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Broadwell, no TSX)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2800,6 +3151,53 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Broadwell, no TSX, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -2925,6 +3323,53 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XSAVEOPT,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Broadwell, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -3062,6 +3507,51 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XGETBV1,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        /* Missing: Mode-based execute control (XS/XU), processor tracing, TSC scaling */
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Core Processor (Skylake, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
@@ -3208,6 +3698,54 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
             CPUID_XSAVE_XGETBV1,
Pablo Greco e6a3ae
         .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
             CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        /* Missing: Mode-based execute control (XS/XU), processor tracing, TSC scaling */
Pablo Greco e6a3ae
+        .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS |
Pablo Greco e6a3ae
+             MSR_VMX_BASIC_TRUE_CTLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT |
Pablo Greco e6a3ae
+             VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT |
Pablo Greco e6a3ae
+             MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_EXIT_CTLS] =
Pablo Greco e6a3ae
+             VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER |
Pablo Greco e6a3ae
+             VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT |
Pablo Greco e6a3ae
+             MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS |
Pablo Greco e6a3ae
+             VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_MONITOR_TRAP_FLAG |
Pablo Greco e6a3ae
+             VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_SECONDARY_CTLS] =
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS |
Pablo Greco e6a3ae
+             VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML,
Pablo Greco e6a3ae
+        .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
Pablo Greco e6a3ae
         .xlevel = 0x80000008,
Pablo Greco e6a3ae
         .model_id = "Intel Xeon Processor (Skylake, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae