VirtualBox

Changeset 92718 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Dec 2, 2021 9:44:14 PM (3 years ago)
Author:
vboxsync
Message:

VMM/APIC,SUP: Driverless tweaks for the APIC code. bugref:10138

File:
1 edited

Legend:

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

    r88557 r92718  
    12851285    if (pApic->pvApicPibR3)
    12861286    {
    1287         AssertLogRelReturn(pApic->pvApicPibR0   != NIL_RTR0PTR,  VERR_INTERNAL_ERROR);
    1288         AssertLogRelReturn(pApic->HCPhysApicPib != NIL_RTHCPHYS, VERR_INTERNAL_ERROR);
     1287        bool const fDriverless = SUPR3IsDriverless();
     1288        AssertLogRelReturn(pApic->pvApicPibR0   != NIL_RTR0PTR  || fDriverless,  VERR_INTERNAL_ERROR);
     1289        AssertLogRelReturn(pApic->HCPhysApicPib != NIL_RTHCPHYS || fDriverless, VERR_INTERNAL_ERROR);
    12891290
    12901291        /* Initialize the PIB. */
     
    13121313            if (RT_SUCCESS(rc))
    13131314            {
    1314                 AssertLogRelReturn(pApicCpu->pvApicPageR3   != NIL_RTR3PTR,  VERR_INTERNAL_ERROR);
    1315                 AssertLogRelReturn(pApicCpu->HCPhysApicPage != NIL_RTHCPHYS, VERR_INTERNAL_ERROR);
     1315                AssertLogRelReturn(pApicCpu->pvApicPageR3   != NIL_RTR3PTR  || fDriverless, VERR_INTERNAL_ERROR);
    13161316                pApicCpu->HCPhysApicPage = SupApicPage.Phys;
     1317                AssertLogRelReturn(pApicCpu->HCPhysApicPage != NIL_RTHCPHYS || fDriverless, VERR_INTERNAL_ERROR);
    13171318
    13181319                /* Associate the per-VCPU PIB pointers to the per-VM PIB mapping. */
    13191320                uint32_t const offApicPib  = idCpu * sizeof(APICPIB);
    1320                 pApicCpu->pvApicPibR0      = (RTR0PTR)((RTR0UINTPTR)pApic->pvApicPibR0 + offApicPib);
     1321                pApicCpu->pvApicPibR0      = !fDriverless ? (RTR0PTR)((RTR0UINTPTR)pApic->pvApicPibR0 + offApicPib) : NIL_RTR0PTR;
    13211322                pApicCpu->pvApicPibR3      = (RTR3PTR)((RTR3UINTPTR)pApic->pvApicPibR3 + offApicPib);
    13221323
     
    13271328#ifdef DEBUG_ramshankar
    13281329                Assert(pApicCpu->pvApicPibR3 != NIL_RTR3PTR);
    1329                 Assert(pApicCpu->pvApicPibR0 != NIL_RTR0PTR);
     1330                Assert(pApicCpu->pvApicPibR0 != NIL_RTR0PTR || fDriverless);
    13301331                Assert(pApicCpu->pvApicPageR3 != NIL_RTR3PTR);
    13311332#endif
     
    13411342#ifdef DEBUG_ramshankar
    13421343        Assert(pApic->pvApicPibR3 != NIL_RTR3PTR);
    1343         Assert(pApic->pvApicPibR0 != NIL_RTR0PTR);
     1344        Assert(pApic->pvApicPibR0 != NIL_RTR0PTR || fDriverless);
    13441345#endif
    13451346        return VINF_SUCCESS;
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