VirtualBox

Changeset 74258 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Sep 14, 2018 4:20:16 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM, CPUM: Nested VMX: bugref:9180 vmlaunch/vmresume bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r74155 r74258  
    931931            pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3 = NULL;
    932932        }
     933        if (pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3)
     934        {
     935            SUPR3PageFreeEx(pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3, VMX_V_AUTOMSR_AREA_PAGES);
     936            pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3 = NULL;
     937        }
    933938    }
    934939}
     
    952957         * Allocate the nested-guest current VMCS.
    953958         */
    954         SUPPAGE SupNstGstVmcsPage;
    955         RT_ZERO(SupNstGstVmcsPage);
    956         SupNstGstVmcsPage.Phys = NIL_RTHCPHYS;
    957959        Assert(VMX_V_VMCS_PAGES == 1);
    958960        Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pVmcsR3);
    959961        rc = SUPR3PageAllocEx(VMX_V_VMCS_PAGES, 0 /* fFlags */, (void **)&pVCpu->cpum.s.Guest.hwvirt.vmx.pVmcsR3,
    960                               &pVCpu->cpum.s.Guest.hwvirt.vmx.pVmcsR0, &SupNstGstVmcsPage);
     962                              &pVCpu->cpum.s.Guest.hwvirt.vmx.pVmcsR0, NULL /* paPages */);
    961963        if (RT_FAILURE(rc))
    962964        {
     
    10061008            LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's VMWRITE-bitmap\n", pVCpu->idCpu,
    10071009                    VMX_V_VMREAD_VMWRITE_BITMAP_PAGES));
     1010            break;
     1011        }
     1012
     1013        /*
     1014         * Allocate the MSR auto-load/store area.
     1015         */
     1016        Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3);
     1017        rc = SUPR3PageAllocEx(VMX_V_AUTOMSR_AREA_PAGES, 0 /* fFlags */,
     1018                              (void **)&pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3,
     1019                              &pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR0, NULL /* paPages */);
     1020        if (RT_FAILURE(rc))
     1021        {
     1022            Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3);
     1023            LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's auto-load/store MSR area\n", pVCpu->idCpu,
     1024                    VMX_V_AUTOMSR_AREA_PAGES));
    10081025            break;
    10091026        }
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