VirtualBox

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


Ignore:
Timestamp:
Jan 5, 2017 7:04:14 AM (8 years ago)
Author:
vboxsync
Message:

VMM/APIC: Interface for retrieving APIC pages in all contexts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r64853 r65135  
    32753275}
    32763276
     3277
     3278/**
     3279 * Gets the APIC page pointers for the specified VCPU.
     3280 *
     3281 * @returns VBox status code.
     3282 * @param   pVCpu           The cross context virtual CPU structure.
     3283 * @param   pHCPhys         Where to store the host-context physical address.
     3284 * @param   pR0Ptr          Where to store the ring-0 address.
     3285 * @param   pR3Ptr          Where to store the ring-3 address (optional).
     3286 * @param   pRCPtr          Where to store the raw-mode context address
     3287 *                          (optional).
     3288 */
     3289VMM_INT_DECL(int) APICGetApicPageForCpu(PVMCPU pVCpu, PRTHCPHYS pHCPhys, PRTR0PTR pR0Ptr, PRTR3PTR pR3Ptr, PRTRCPTR pRCPtr)
     3290{
     3291    AssertReturn(pVCpu,   VERR_INVALID_PARAMETER);
     3292    AssertReturn(pHCPhys, VERR_INVALID_PARAMETER);
     3293    AssertReturn(pR0Ptr,  VERR_INVALID_PARAMETER);
     3294
     3295    PCAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu);
     3296    *pHCPhys = pApicCpu->HCPhysApicPage;
     3297    *pR0Ptr  = pApicCpu->pvApicPageR0;
     3298    if (pR3Ptr)
     3299        *pR3Ptr  = pApicCpu->pvApicPageR3;
     3300    if (pRCPtr)
     3301        *pRCPtr  = pApicCpu->pvApicPageRC;
     3302    return VINF_SUCCESS;
     3303}
     3304
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