VirtualBox

Changeset 100000 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
May 30, 2023 6:09:42 AM (21 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157667
Message:

VMM: Take the vTimer expiration into account when halting due to a WFI/WFE instruction so the guest gets woken up if no other event is pending, bugref:10389

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r98103 r100000  
    171171VMMDECL(uint64_t)       TMCpuTicksPerSecond(PVMCC pVM);
    172172VMM_INT_DECL(bool)      TMCpuTickIsTicking(PVMCPUCC pVCpu);
     173
     174#if defined(VBOX_VMM_TARGET_ARMV8)
     175VMM_INT_DECL(void)      TMCpuSetVTimerNextActivation(PVMCPUCC pVCpu, uint64_t cNanoSecs);
     176VMM_INT_DECL(uint64_t)  TMCpuGetVTimerActivationNano(PVMCPUCC pVCpu);
     177#endif
    173178/** @} */
    174179
  • trunk/include/VBox/vmm/vm.h

    r99576 r100000  
    130130    VMCPUSTATE volatile     enmState;
    131131
     132#if defined(VBOX_VMM_TARGET_ARMV8)
     133    uint32_t                u32Alignment0;
     134    /** The number of nano seconds when the vTimer of the associated vCPU is supposed to activate
     135     *  required to get out of a halt (due to wfi/wfe).
     136     *
     137     * @note This actually should go into TMCPU but this drags in a whole lot of padding changes
     138     *       and I'm not sure yet whether this will remain in this form anyway.
     139     */
     140    uint64_t                cNsVTimerActivate;
     141    /** Padding up to 64 bytes. */
     142    uint8_t                 abAlignment0[64 - 12 - 8 - 4];
     143#else
    132144    /** Padding up to 64 bytes. */
    133145    uint8_t                 abAlignment0[64 - 12];
     146#endif
    134147    /** @} */
    135148
     
    517530#define VMCPU_FF_HM_UPDATE_CR3              RT_BIT_64(VMCPU_FF_HM_UPDATE_CR3_BIT)
    518531#define VMCPU_FF_HM_UPDATE_CR3_BIT          12
     532#if defined(VBOX_VMM_TARGET_ARMV8)
     533# define VMCPU_FF_VTIMER_ACTIVATED          RT_BIT_64(VMCPU_FF_VTIMER_ACTIVATED_BIT)
     534# define VMCPU_FF_VTIMER_ACTIVATED_BIT      13
     535#else
    519536/* Bit 13 used to be VMCPU_FF_HM_UPDATE_PAE_PDPES. */
     537#endif
    520538/** This action forces the VM to resync the page tables before going
    521539 * back to execute guest code. (GLOBAL FLUSH) */
     
    593611# define VMCPU_FF_EXTERNAL_HALTED_MASK          (  VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ \
    594612                                                 | VMCPU_FF_REQUEST       | VMCPU_FF_INTERRUPT_NMI  | VMCPU_FF_INTERRUPT_SMI \
    595                                                  | VMCPU_FF_UNHALT        | VMCPU_FF_TIMER          | VMCPU_FF_DBGF )
     613                                                 | VMCPU_FF_UNHALT        | VMCPU_FF_TIMER          | VMCPU_FF_DBGF \
     614                                                 | VMCPU_FF_VTIMER_ACTIVATED)
    596615#else
    597616# define VMCPU_FF_EXTERNAL_HALTED_MASK          (  VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \
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