Lines Matching refs:nested

106 static bool __read_mostly nested = 1;  variable
107 module_param(nested, bool, S_IRUGO);
1735 return nested && guest_cpuid_has(vcpu, X86_FEATURE_VMX); in nested_vmx_allowed()
1750 if (!nested) in vmx_get_msr_feature()
1752 return vmx_get_vmx_msr(&vmcs_config.nested, msr->index, &msr->data); in vmx_get_msr_feature()
1827 return vmx_get_vmx_msr(&vmx->nested.msrs, msr_info->index, in vmx_get_msr()
2094 vmx->nested.vmxon) in vmx_set_msr()
3065 if (vmx->nested.vmxon && !nested_cr4_valid(vcpu, cr4)) in vmx_set_cr4()
3770 WARN_ON_ONCE(!vmx->nested.virtual_apic_map.gfn)) in vmx_guest_apic_has_interrupt()
3775 vapic_page = vmx->nested.virtual_apic_map.hva; in vmx_guest_apic_has_interrupt()
3782 bool nested) in kvm_vcpu_trigger_posted_interrupt() argument
3785 int pi_vec = nested ? POSTED_INTR_NESTED_VECTOR : POSTED_INTR_VECTOR; in kvm_vcpu_trigger_posted_interrupt()
3826 vector == vmx->nested.posted_intr_nv) { in vmx_deliver_nested_posted_interrupt()
3831 vmx->nested.pi_pending = true; in vmx_deliver_nested_posted_interrupt()
4052 if (nested) { in vmx_compute_secondary_exec_control()
4054 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4057 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4067 if (nested) { in vmx_compute_secondary_exec_control()
4069 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4072 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4088 if (nested) { in vmx_compute_secondary_exec_control()
4090 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4093 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4103 if (nested) { in vmx_compute_secondary_exec_control()
4105 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4108 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4118 if (nested) { in vmx_compute_secondary_exec_control()
4120 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4123 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4135 if (nested) { in vmx_compute_secondary_exec_control()
4137 vmx->nested.msrs.secondary_ctls_high |= in vmx_compute_secondary_exec_control()
4140 vmx->nested.msrs.secondary_ctls_high &= in vmx_compute_secondary_exec_control()
4167 if (nested) in vmx_vcpu_setup()
4480 if (to_vmx(vcpu)->nested.nested_run_pending) in vmx_nmi_allowed()
4494 return (!to_vmx(vcpu)->nested.nested_run_pending && in vmx_interrupt_allowed()
4781 if (to_vmx(vcpu)->nested.vmxon && in handle_set_cr0()
5241 WARN_ON_ONCE(vmx->emulation_required && vmx->nested.nested_run_pending); in handle_invalid_guest_state()
6057 vmx->nested.change_vmcs01_virtual_apic_mode = true; in vmx_set_virtual_apic_mode()
6295 return nested; in vmx_has_emulated_msr()
6514 if (vmx->nested.need_vmcs12_to_shadow_sync) in vmx_vcpu_run()
6651 vmx->nested.nested_run_pending = 0; in vmx_vcpu_run()
6794 if (nested) in vmx_create_vcpu()
6795 nested_vmx_setup_ctls_msrs(&vmx->nested.msrs, in vmx_create_vcpu()
6799 memset(&vmx->nested.msrs, 0, sizeof(vmx->nested.msrs)); in vmx_create_vcpu()
6801 vmx->nested.posted_intr_nv = -1; in vmx_create_vcpu()
6802 vmx->nested.current_vmptr = -1ull; in vmx_create_vcpu()
6878 if (nested) in vmx_check_processor_compat()
6879 nested_vmx_setup_ctls_msrs(&vmcs_conf.nested, vmx_cap.ept, in vmx_check_processor_compat()
6969 vmx->nested.msrs.cr0_fixed1 = 0xffffffff; in nested_vmx_cr_fixed1_bits_update()
6970 vmx->nested.msrs.cr4_fixed1 = X86_CR4_PCE; in nested_vmx_cr_fixed1_bits_update()
6974 vmx->nested.msrs.cr4_fixed1 |= (_cr4_mask); \ in nested_vmx_cr_fixed1_bits_update()
7011 vmx->nested.msrs.entry_ctls_high |= VM_ENTRY_LOAD_BNDCFGS; in nested_vmx_entry_exit_ctls_update()
7012 vmx->nested.msrs.exit_ctls_high |= VM_EXIT_CLEAR_BNDCFGS; in nested_vmx_entry_exit_ctls_update()
7014 vmx->nested.msrs.entry_ctls_high &= ~VM_ENTRY_LOAD_BNDCFGS; in nested_vmx_entry_exit_ctls_update()
7015 vmx->nested.msrs.exit_ctls_high &= ~VM_EXIT_CLEAR_BNDCFGS; in nested_vmx_entry_exit_ctls_update()
7117 if (func == 1 && nested) in vmx_set_supported_cpuid()
7248 WARN_ON_ONCE(vmx->nested.pml_full); in vmx_write_pml_buffer()
7260 vmx->nested.pml_full = true; in vmx_write_pml_buffer()
7522 if (to_vmx(vcpu)->nested.nested_run_pending) in vmx_smi_allowed()
7531 vmx->nested.smm.guest_mode = is_guest_mode(vcpu); in vmx_pre_enter_smm()
7532 if (vmx->nested.smm.guest_mode) in vmx_pre_enter_smm()
7535 vmx->nested.smm.vmxon = vmx->nested.vmxon; in vmx_pre_enter_smm()
7536 vmx->nested.vmxon = false; in vmx_pre_enter_smm()
7546 if (vmx->nested.smm.vmxon) { in vmx_pre_leave_smm()
7547 vmx->nested.vmxon = true; in vmx_pre_leave_smm()
7548 vmx->nested.smm.vmxon = false; in vmx_pre_leave_smm()
7551 if (vmx->nested.smm.guest_mode) { in vmx_pre_leave_smm()
7556 vmx->nested.smm.guest_mode = false; in vmx_pre_leave_smm()
7573 return to_vmx(vcpu)->nested.vmxon; in vmx_apic_init_signal_blocked()
7728 if (nested) { in hardware_setup()
7729 nested_vmx_setup_ctls_msrs(&vmcs_config.nested, in hardware_setup()
7745 if (nested) in hardware_unsetup()