VirtualBox

Changeset 92456 in vbox


Ignore:
Timestamp:
Nov 16, 2021 11:10:46 AM (3 years ago)
Author:
vboxsync
Message:

VMM/NEMR3Native-darwin.cpp: Sigh Apple2, bugref:9044

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r92453 r92456  
    24332433static DECLCALLBACK(int) nemR3DarwinNativeTermVCpuOnEmt(PVMCPU pVCpu)
    24342434{
    2435     hv_return_t hrc = hv_vcpu_destroy(pVCpu->nem.s.hVCpuId);
     2435    hv_return_t hrc = hv_vcpu_set_space(pVCpu->nem.s.hVCpuId, 0 /*asid*/);
     2436    Assert(hrc == HV_SUCCESS);
     2437
     2438    hrc = hv_vcpu_destroy(pVCpu->nem.s.hVCpuId);
    24362439    Assert(hrc == HV_SUCCESS); RT_NOREF(hrc);
    24372440    return VINF_SUCCESS;
     
    24922495    {
    24932496        PVMCPU pVCpu = pVM->apCpusR3[idCpu];
     2497
     2498        /*
     2499         * Need to do this or hv_vm_space_destroy() fails later on (on 10.15 at least). Could've been documented in
     2500         * API reference so I wouldn't have to decompile the kext to find this out but we are talking
     2501         * about Apple here unfortunately, API documentation is not their strong suit...
     2502         * Would have been of course even better to just automatically drop the address space reference when the vCPU
     2503         * gets destroyed.
     2504         */
     2505        hv_return_t hrc = hv_vcpu_set_space(pVCpu->nem.s.hVCpuId, 0 /*asid*/);
     2506        Assert(hrc == HV_SUCCESS);
    24942507
    24952508        /*
     
    25012514         * from EMT(0) as well.
    25022515         */
    2503         hv_return_t hrc = hv_vcpu_destroy(pVCpu->nem.s.hVCpuId);
     2516        hrc = hv_vcpu_destroy(pVCpu->nem.s.hVCpuId);
    25042517        Assert(hrc == HV_SUCCESS); RT_NOREF(hrc);
    25052518
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