VirtualBox

Changeset 93267 in vbox


Ignore:
Timestamp:
Jan 17, 2022 11:14:57 AM (3 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:10092 True VMX controls MSR support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r93224 r93267  
    59985998    PCVMXVVMCS const pVmcs = &pVCpu->cpum.GstCtx.hwvirt.vmx.Vmcs;
    59995999    const char * const pszFailure = "VMFail";
     6000    bool const fVmxTrueMsrs       = RT_BOOL(pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.u64Basic & VMX_BF_BASIC_TRUE_CTLS_MASK);
    60006001
    60016002    /*
     
    60066007        /* Pin-based VM-execution controls. */
    60076008        {
    6008             VMXCTLSMSR const PinCtls = pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.PinCtls;
     6009            VMXCTLSMSR const PinCtls = fVmxTrueMsrs ? pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.TruePinCtls
     6010                                                    : pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.PinCtls;
    60096011            if (!(~pVmcs->u32PinCtls & PinCtls.n.allowed0))
    60106012            { /* likely */ }
     
    60206022        /* Processor-based VM-execution controls. */
    60216023        {
    6022             VMXCTLSMSR const ProcCtls = pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.ProcCtls;
     6024            VMXCTLSMSR const ProcCtls = fVmxTrueMsrs ? pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.TrueProcCtls
     6025                                                     : pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.ProcCtls;
    60236026            if (!(~pVmcs->u32ProcCtls & ProcCtls.n.allowed0))
    60246027            { /* likely */ }
     
    62066209        Assert(!(pVmcs->u32PinCtls & VMX_PIN_CTLS_POSTED_INT));             /* We don't support posted interrupts yet. */
    62076210        Assert(!(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_PML));                /* We don't support PML yet. */
    6208         Assert(!(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_UNRESTRICTED_GUEST)); /* We don't support Unrestricted-guests yet. */
     6211#ifndef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
     6212        Assert(!(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_UNRESTRICTED_GUEST)); /* Support for Unrestricted-guests is conditional. */
     6213#endif
    62096214        Assert(!(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_VMFUNC));             /* We don't support VM functions yet. */
    62106215        Assert(!(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_EPT_XCPT_VE));        /* We don't support EPT-violation #VE yet. */
     
    62406245     */
    62416246    {
    6242         VMXCTLSMSR const ExitCtls = pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.ExitCtls;
     6247        VMXCTLSMSR const ExitCtls = fVmxTrueMsrs ? pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.TrueExitCtls
     6248                                                 : pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.ExitCtls;
    62436249        if (!(~pVmcs->u32ExitCtls & ExitCtls.n.allowed0))
    62446250        { /* likely */ }
     
    62866292     */
    62876293    {
    6288         VMXCTLSMSR const EntryCtls = pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.EntryCtls;
     6294        VMXCTLSMSR const EntryCtls = fVmxTrueMsrs ? pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.TrueEntryCtls
     6295                                                  : pVCpu->cpum.GstCtx.hwvirt.vmx.Msrs.EntryCtls;
    62896296        if (!(~pVmcs->u32EntryCtls & EntryCtls.n.allowed0))
    62906297        { /* likely */ }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette