VirtualBox

Changeset 71867 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Apr 17, 2018 8:02:16 AM (7 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested hw.virt: SVM VMRUN - Ignore, disable reserved fields rather than #VMEXIT with invalid state.

File:
1 edited

Legend:

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

    r71859 r71867  
    371371            && !pVM->cpum.ro.GuestFeatures.fSvmAvic)
    372372        {
    373             Log(("iemSvmVmrun: AVIC not supported -> #VMEXIT\n"));
    374             return iemSvmVmexit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     373            Log(("iemSvmVmrun: AVIC not supported -> Disabling\n"));
     374            pVmcbCtrl->IntCtrl.n.u1AvicEnable = 0;
    375375        }
    376376
     
    379379            && !pVM->cpum.ro.GuestFeatures.fSvmLbrVirt)
    380380        {
    381             Log(("iemSvmVmrun: LBR virtualization not supported -> #VMEXIT\n"));
    382             return iemSvmVmexit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     381            Log(("iemSvmVmrun: LBR virtualization not supported -> Disabling\n"));
     382            pVmcbCtrl->LbrVirt.n.u1LbrVirt = 0;
    383383        }
    384384
     
    387387            && !pVM->cpum.ro.GuestFeatures.fSvmVirtVmsaveVmload)
    388388        {
    389             Log(("iemSvmVmrun: Virtualized VMSAVE/VMLOAD not supported -> #VMEXIT\n"));
    390             return iemSvmVmexit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     389            Log(("iemSvmVmrun: Virtualized VMSAVE/VMLOAD not supported -> Disabling\n"));
     390            pVmcbCtrl->LbrVirt.n.u1VirtVmsaveVmload = 0;
    391391        }
    392392
    393393        /* Virtual GIF. */
    394         if (    pVmcbCtrl->IntCtrl.n.u1VGifEnable
    395             && !pVM->cpum.ro.GuestFeatures.fSvmVGif)
    396         {
    397             Log(("iemSvmVmrun: Virtual GIF not supported -> #VMEXIT\n"));
    398             return iemSvmVmexit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     394        if (   pVmcbCtrl->IntCtrl.n.u1VGifEnable
     395            && pVM->cpum.ro.GuestFeatures.fSvmVGif)
     396        {
     397            Log(("iemSvmVmrun: Virtual GIF not supported -> Disabling\n"));
     398            pVmcbCtrl->IntCtrl.n.u1VGifEnable = 0;
    399399        }
    400400
     
    404404            Log(("iemSvmVmrun: Guest ASID is invalid -> #VMEXIT\n"));
    405405            return iemSvmVmexit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     406        }
     407
     408        /* Guest AVIC. */
     409        if (    pVmcbCtrl->IntCtrl.n.u1AvicEnable
     410            && !pVM->cpum.ro.GuestFeatures.fSvmAvic)
     411        {
     412            Log(("iemSvmVmrun: AVIC not supported -> Disabling\n"));
     413            pVmcbCtrl->IntCtrl.n.u1AvicEnable = 0;
     414        }
     415
     416        /* Guest Secure Encrypted Virtualization. */
     417        if (  (   pVmcbCtrl->NestedPagingCtrl.n.u1Sev
     418               || pVmcbCtrl->NestedPagingCtrl.n.u1SevEs)
     419            && !pVM->cpum.ro.GuestFeatures.fSvmAvic)
     420        {
     421            Log(("iemSvmVmrun: SEV not supported -> Disabling\n"));
     422            pVmcbCtrl->NestedPagingCtrl.n.u1Sev = 0;
     423            pVmcbCtrl->NestedPagingCtrl.n.u1SevEs = 0;
    406424        }
    407425
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