VirtualBox

Changeset 21963 in vbox


Ignore:
Timestamp:
Aug 4, 2009 3:12:59 PM (15 years ago)
Author:
vboxsync
Message:

VMM: When we're switching to our own private stack, it must have a ring-0 mapping. fixes darwin.amd64 #DFs and #PFs when using VT-x and sometimes with raw-mode.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r21856 r21963  
    5555 VMMR3_DEFS    += VBOX_WITH_PDM_ASYNC_COMPLETION
    5656endif
     57VMMR3_DEFS.darwin = VMM_R0_SWITCH_STACK
    5758VMMR3_DEFS.darwin.x86 = \
    5859        VBOX_WITH_2X_4GB_ADDR_SPACE   VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
     
    308309endif
    309310ifeq ($(KBUILD_TARGET_ARCH),x86)
     311 VMMGC_DEFS.darwin = VMM_R0_SWITCH_STACK
    310312 VMMGC_DEFS.darwin = \
    311313        VBOX_WITH_2X_4GB_ADDR_SPACE   VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC \
     
    418420 VMMR0_DEFS    += VBOX_WITH_MULTI_CORE
    419421endif
     422VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
    420423VMMR0_DEFS.darwin.x86 = \
    421424        VBOX_WITH_2X_4GB_ADDR_SPACE   VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
  • trunk/src/VBox/VMM/VMM.cpp

    r21653 r21963  
    241241{
    242242    int rc = VINF_SUCCESS;
     243#ifdef VMM_R0_SWITCH_STACK
     244    uint32_t fFlags = MMHYPER_AONR_FLAGS_KERNEL_MAPPING;
     245#else
     246    uint32_t fFlags = 0;
     247#endif
    243248
    244249    for (VMCPUID idCpu = 0; idCpu < pVM->cCPUs; idCpu++)
     
    247252
    248253#ifdef VBOX_STRICT_VMM_STACK
    249         rc = MMR3HyperAllocOnceNoRel(pVM, PAGE_SIZE + VMM_STACK_SIZE + PAGE_SIZE, PAGE_SIZE, MM_TAG_VMM, (void **)&pVCpu->vmm.s.pbEMTStackR3);
     254        rc = MMR3HyperAllocOnceNoRelEx(pVM, PAGE_SIZE + VMM_STACK_SIZE + PAGE_SIZE,
    250255#else
    251         rc = MMR3HyperAllocOnceNoRel(pVM, VMM_STACK_SIZE, PAGE_SIZE, MM_TAG_VMM, (void **)&pVCpu->vmm.s.pbEMTStackR3);
    252 #endif
     256        rc = MMR3HyperAllocOnceNoRelEx(pVM, VMM_STACK_SIZE,
     257#endif
     258                                       PAGE_SIZE, MM_TAG_VMM, fFlags, (void **)&pVCpu->vmm.s.pbEMTStackR3);
    253259        if (RT_SUCCESS(rc))
    254260        {
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