VirtualBox

Changeset 65135 in vbox


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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/apic.h

    r64663 r65135  
    161161#endif /* IN_RING3 */
    162162
    163 #ifdef IN_RING0
    164 /** @defgroup grp_apic_r0  The APIC Host Context Ring-0 API
    165  * @{
    166  */
    167 VMMR0_INT_DECL(int)         APICR0InitVM(PVM pVM);
    168 VMMR0_INT_DECL(int)         APICR0TermVM(PVM pVM);
    169 /** @} */
    170 #endif /* IN_RING0 */
    171 
    172163/* These functions are exported as they are called from external modules (recompiler). */
    173164VMMDECL(void)               APICUpdatePendingInterrupts(PVMCPU pVCpu);
     
    190181VMM_INT_DECL(int)           APICBusDeliver(PVM pVM, uint8_t uDest, uint8_t uDestMode, uint8_t uDeliveryMode, uint8_t uVector,
    191182                                           uint8_t uPolarity, uint8_t uTriggerMode, uint32_t uTagSrc);
     183VMM_INT_DECL(int)           APICGetApicPageForCpu(PVMCPU pVCpu, PRTHCPHYS pHCPhys, PRTR0PTR pR0Ptr, PRTR3PTR pR3Ptr,
     184                                                  PRTRCPTR pRCPtr);
    192185
    193186/** @name Hyper-V interface (Ring-3 and all-context API).
  • 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