VirtualBox

Changeset 92719 in vbox


Ignore:
Timestamp:
Dec 2, 2021 10:40:31 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148620
Message:

VMM/IOM: Driverless adjustments to IOM init code running after ring-0 init. bugref:10138

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

Legend:

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

    r92386 r92719  
    216216         * later calls to grow the statistics tables will fail.
    217217         */
    218         int rc = VMMR3CallR0Emt(pVM, pVM->apCpusR3[0], VMMR0_DO_IOM_SYNC_STATS_INDICES, 0, NULL);
    219         AssertLogRelRCReturn(rc, rc);
     218        if (!SUPR3IsDriverless())
     219        {
     220            int rc = VMMR3CallR0Emt(pVM, pVM->apCpusR3[0], VMMR0_DO_IOM_SYNC_STATS_INDICES, 0, NULL);
     221            AssertLogRelRCReturn(rc, rc);
     222        }
    220223
    221224        /*
     
    242245    RT_NOREF(pVM, enmWhat);
    243246#endif
     247
     248    /*
     249     * Freeze I/O port and MMIO registrations.
     250     */
     251    pVM->iom.s.fIoPortsFrozen = true;
     252    pVM->iom.s.fMmioFrozen    = true;
    244253    return VINF_SUCCESS;
    245254}
  • trunk/src/VBox/VMM/VMMR3/IOMR3IoPort.cpp

    r92716 r92719  
    356356    VM_ASSERT_EMT0_RETURN(pVM, VERR_VM_THREAD_NOT_EMT);
    357357    VM_ASSERT_STATE_RETURN(pVM, VMSTATE_CREATING, VERR_VM_INVALID_VM_STATE);
     358    AssertReturn(!pVM->iom.s.fIoPortsFrozen, VERR_WRONG_ORDER);
    358359
    359360    AssertPtrReturn(pDevIns, VERR_INVALID_POINTER);
  • trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp

    r92716 r92719  
    267267    VM_ASSERT_EMT0_RETURN(pVM, VERR_VM_THREAD_NOT_EMT);
    268268    VM_ASSERT_STATE_RETURN(pVM, VMSTATE_CREATING, VERR_VM_INVALID_VM_STATE);
     269    AssertReturn(!pVM->iom.s.fMmioFrozen, VERR_WRONG_ORDER);
    269270
    270271    AssertPtrReturn(pDevIns, VERR_INVALID_POINTER);
  • trunk/src/VBox/VMM/include/IOMInternal.h

    r90639 r92719  
    401401     * There is a parallel table in ring-0, IOMR0PERVM::paIoPortRegs. */
    402402    R3PTRTYPE(PIOMIOPORTENTRYR3)    paIoPortRegs;
     403    /** I/O port lookup table. */
     404    R3PTRTYPE(PIOMIOPORTLOOKUPENTRY) paIoPortLookup;
    403405    /** Number of entries in the lookup table. */
    404406    uint32_t                        cIoPortLookupEntries;
    405     uint32_t                        u32Padding1;
    406     /** I/O port lookup table. */
    407     R3PTRTYPE(PIOMIOPORTLOOKUPENTRY) paIoPortLookup;
     407    /** Set if I/O port registrations are frozen. */
     408    bool                            fIoPortsFrozen;
     409    bool                            afPadding1[3];
    408410
    409411    /** The number of valid entries in paioPortStats. */
     
    429431     * There is a parallel table in ring-0, IOMR0PERVM::paMmioRegs. */
    430432    R3PTRTYPE(PIOMMMIOENTRYR3)      paMmioRegs;
     433    /** MMIO lookup table. */
     434    R3PTRTYPE(PIOMMMIOLOOKUPENTRY)  paMmioLookup;
    431435    /** Number of entries in the lookup table. */
    432436    uint32_t                        cMmioLookupEntries;
    433     uint32_t                        u32Padding2;
    434     /** MMIO lookup table. */
    435     R3PTRTYPE(PIOMMMIOLOOKUPENTRY)  paMmioLookup;
     437    /** Set if MMIO registrations are frozen. */
     438    bool                            fMmioFrozen;
     439    bool                            afPadding2[3];
    436440
    437441    /** The number of valid entries in paioPortStats. */
Note: See TracChangeset for help on using the changeset viewer.

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