Lines Matching refs:nested

63 #include "nested.h"
116 * If nested=1, nested virtualization is supported, i.e., guests may use
117 * VMX and be a hypervisor for its own guests. If nested=0, guests may not
120 static bool __read_mostly nested = 1;
121 module_param(nested, bool, 0444);
298 * order to protect against KSM in the nested
893 /* When we are running a nested L2 guest and L1 specified for it a
1306 if (vmx->nested.need_vmcs12_to_shadow_sync)
1442 * performs IBPB on nested VM-Exit (a single nested transition
1738 * Recognizes a pending MTF VM-exit and records the nested state for later
1765 vmx->nested.mtf_pending = true;
1768 vmx->nested.mtf_pending = false;
1964 if (!nested)
1966 return vmx_get_vmx_msr(&vmcs_config.nested, msr->index, &msr->data);
2051 if (vmx_get_vmx_msr(&vmx->nested.msrs, msr_info->index,
2254 ((vmx->nested.msrs.entry_ctls_high & VM_ENTRY_LOAD_BNDCFGS) ||
2255 (vmx->nested.msrs.exit_ctls_high & VM_EXIT_CLEAR_BNDCFGS)))
2283 * For non-nested:
2287 * For nested:
2365 vmx->nested.vmxon)
2775 if (nested)
3176 vpid_sync_vcpu_single(vmx->nested.vpid02);
3263 if (to_vmx(vcpu)->nested.vmxon)
3325 * e.g. after nested VM-Enter.
3420 if (to_vmx(vcpu)->nested.vmxon && !nested_cr4_valid(vcpu, cr4))
3941 * When KVM is a nested hypervisor on top of Hyper-V and uses
3953 vmx->nested.force_msr_bitmap_recalc = true;
4113 WARN_ON_ONCE(!vmx->nested.virtual_apic_map.gfn))
4118 vapic_page = vmx->nested.virtual_apic_map.hva;
4205 vector == vmx->nested.posted_intr_nv) {
4210 vmx->nested.pi_pending = true;
4414 * nested virtualization and thus allowed to be set in vmcs12.
4436 vmx->nested.update_vmcs01_apicv_status = true;
4538 * Update the nested MSR settings so that a nested VMM can/can't set
4541 if (nested) {
4544 * be supported in the first place for nested virtualization.
4546 if (WARN_ON_ONCE(!(vmcs_config.nested.secondary_ctls_high & control)))
4550 vmx->nested.msrs.secondary_ctls_high |= control;
4552 vmx->nested.msrs.secondary_ctls_high &= ~control;
4707 if (nested)
4826 if (nested)
4827 memcpy(&vmx->nested.msrs, &vmcs_config.nested, sizeof(vmx->nested.msrs));
4831 vmx->nested.posted_intr_nv = -1;
4832 vmx->nested.vmxon_ptr = INVALID_GPA;
4833 vmx->nested.current_vmptr = INVALID_GPA;
4836 vmx->nested.hv_evmcs_vmptr = EVMPTR_INVALID;
5033 if (to_vmx(vcpu)->nested.nested_run_pending)
5055 if (to_vmx(vcpu)->nested.nested_run_pending)
5060 * e.g. if the IRQ arrived asynchronously after checking nested events.
5797 * A nested guest cannot optimize MMIO vmexits, because we have an
6015 * expiration likely requires synthesizing a nested VM-Exit.
6037 * When nested=0, all VMX instruction VM Exits filter here. The handlers
6038 * are overwritten by nested_vmx_setup() when nested=1.
6444 * KVM should never reach this point with a pending nested VM-Enter.
6447 * allowed a nested VM-Enter with an invalid vmcs12. More below.
6449 if (KVM_BUG_ON(vmx->nested.nested_run_pending, vcpu->kvm))
6475 * operation, nested VM-Enter rejects any attempt to enter L2
6703 to_vmx(vcpu)->nested.l1_tpr_threshold = tpr_threshold;
6722 vmx->nested.change_vmcs01_virtual_apic_mode = true;
6773 to_vmx(vcpu)->nested.reload_vmcs01_apic_access_page = true;
7030 return nested;
7349 WARN_ON_ONCE(vmx->nested.need_vmcs12_to_shadow_sync);
7440 if (vmx->nested.nested_run_pending &&
7444 vmx->nested.nested_run_pending = 0;
7523 * nested (L1) hypervisor and Hyper-V in L0 supports it. Enable the
7682 vmx->nested.msrs.cr0_fixed1 = 0xffffffff;
7683 vmx->nested.msrs.cr4_fixed1 = X86_CR4_PCE;
7687 vmx->nested.msrs.cr4_fixed1 |= (_cr4_mask); \
7926 if (nested)
8000 /* FIXME: produce nested vmexit and return X86EMUL_INTERCEPTED. */
8042 /* FIXME: produce nested vmexit and return X86EMUL_INTERCEPTED. */
8147 vmx->nested.update_vmcs01_cpu_dirty_logging = true;
8175 /* we need a nested vmexit to enter SMM, postpone if run is pending */
8176 if (to_vmx(vcpu)->nested.nested_run_pending)
8192 vmx->nested.smm.guest_mode = is_guest_mode(vcpu);
8193 if (vmx->nested.smm.guest_mode)
8196 vmx->nested.smm.vmxon = vmx->nested.vmxon;
8197 vmx->nested.vmxon = false;
8207 if (vmx->nested.smm.vmxon) {
8208 vmx->nested.vmxon = true;
8209 vmx->nested.smm.vmxon = false;
8212 if (vmx->nested.smm.guest_mode) {
8217 vmx->nested.nested_run_pending = 1;
8218 vmx->nested.smm.guest_mode = false;
8231 return to_vmx(vcpu)->nested.vmxon && !is_guest_mode(vcpu);
8237 struct hrtimer *timer = &to_vmx(vcpu)->nested.preemption_timer;
8248 if (nested)
8697 if (nested) {
8708 if (r && nested)