VirtualBox

Changeset 66318 in vbox


Ignore:
Timestamp:
Mar 29, 2017 6:23:28 AM (8 years ago)
Author:
vboxsync
Message:

VMM: Nested Hw.virt: Interrupt logic helpers for nested SVM.

Location:
trunk
Files:
2 edited

Legend:

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

    r66301 r66318  
    154154VMM_INT_DECL(VBOXSTRICTRC)      HMSvmVmmcall(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfRipUpdated);
    155155VMM_INT_DECL(VBOXSTRICTRC)      HMSvmVmrun(PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPHYS GCPhysVmcb);
    156 VMM_INT_DECL(int)               HMSvmNstGstGetInterrupt(PVMCPU pVCpu, PCCPUMCTX pCtx, uint8_t *pu8Interrupt);
    157 VMM_INT_DECL(bool)              HMSvmNstGstIsInterruptPending(PVMCPU pVCpu, PCCPUMCTX pCtx);
     156VMM_INT_DECL(int)               HMSvmNstGstGetInterrupt(PCCPUMCTX pCtx, uint8_t *pu8Interrupt);
     157VMM_INT_DECL(bool)              HMSvmNstGstIsInterruptPending(PCCPUMCTX pCtx);
    158158
    159159#ifndef IN_RC
  • trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp

    r66301 r66318  
    2121*********************************************************************************************************************************/
    2222#define LOG_GROUP LOG_GROUP_HM
     23#define VMCPU_INCL_CPUM_GST_CTX
    2324#include "HMInternal.h"
    2425#include <VBox/vmm/apic.h>
     
    699700
    700701
    701 VMM_INT_DECL(bool) HMSvmNstGstIsInterruptPending(PVMCPU pVCpu, PCCPUMCTX pCtx)
     702/**
     703 * Checks whether an interrupt is pending for the nested-guest.
     704 *
     705 * @returns VBox status code.
     706 * @retval  true if there's a pending interrupt, false otherwise.
     707 *
     708 * @param   pCtx            The guest-CPU context.
     709 */
     710VMM_INT_DECL(bool) HMSvmNstGstIsInterruptPending(PCCPUMCTX pCtx)
    702711{
    703     RT_NOREF1(pVCpu);
    704712    PCSVMVMCBCTRL pVmcbCtrl = &pCtx->hwvirt.svm.VmcbCtrl;
    705 
    706     if (    !CPUMIsGuestInNestedHwVirtMode(pCtx)
    707         || !pCtx->hwvirt.svm.fGif)
     713    if (!CPUMIsGuestInNestedHwVirtMode(pCtx))
    708714        return false;
    709715
     
    721727
    722728
    723 VMM_INT_DECL(int) HMSvmNstGstGetInterrupt(PVMCPU pVCpu, PCCPUMCTX pCtx, uint8_t *pu8Interrupt)
     729/**
     730 * Gets the pending nested-guest interrupt.
     731 *
     732 * @returns VBox status code.
     733 * @retval  VINF_SUCCESS on success.
     734 * @retval  VERR_APIC_INTR_MASKED_BY_TPR when an APIC interrupt is pending but
     735 *          can't be delivered due to TPR priority.
     736 * @retval  VERR_NO_DATA if there is no interrupt to be delivered (either APIC
     737 *          has been software-disabled since it flagged something was pending,
     738 *          or other reasons).
     739 *
     740 * @param   pCtx            The guest-CPU context.
     741 * @param   pu8Interrupt    Where to store the interrupt.
     742 */
     743VMM_INT_DECL(int) HMSvmNstGstGetInterrupt(PCCPUMCTX pCtx, uint8_t *pu8Interrupt)
    724744{
    725     RT_NOREF1(pVCpu);
    726745    PCSVMVMCBCTRL pVmcbCtrl = &pCtx->hwvirt.svm.VmcbCtrl;
    727 
    728746    /** @todo remove later, paranoia for now. */
    729747#ifdef DEBUG_ramshankar
    730     Assert(HMSvmNstGstIsInterruptPending);
     748    Assert(HMSvmNstGstIsInterruptPending(pCtx));
    731749#endif
    732750
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