VirtualBox

Changeset 99576 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
May 3, 2023 10:24:27 AM (20 months ago)
Author:
vboxsync
Message:

VMM: Preparations for getting interrupts injected into the guest. With ARMv8 there are two types of interrupts (normal interrupts and fast interrupts) which need to be mapped to forced action flags. Because the PIC and APIC flags are not needed those are mapped to IRQs and FIQs on ARM respectively, bugref:10389

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs-armv8.cpp

    r99051 r99576  
    4646#include <VBox/vmm/hm.h>
    4747#include <VBox/vmm/tm.h>
     48
     49#include <iprt/armv8.h>
    4850#include <iprt/assert.h>
    4951#include <iprt/asm.h>
     
    99101    AssertReleaseFailed(); /** @todo Exception level. */
    100102    return pVCpu->cpum.s.Guest.aSpReg[0].u64;
     103}
     104
     105
     106/**
     107 * Returns whether IRQs are currently masked.
     108 *
     109 * @returns true if IRQs are masked as indicated by the PState value.
     110 * @param   pVCpu       The cross context virtual CPU structure.
     111 */
     112VMMDECL(bool)       CPUMGetGuestIrqMasked(PVMCPUCC pVCpu)
     113{
     114    CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PSTATE);
     115    return RT_BOOL(pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_I);
     116}
     117
     118
     119/**
     120 * Returns whether FIQs are currently masked.
     121 *
     122 * @returns true if FIQs are masked as indicated by the PState value.
     123 * @param   pVCpu       The cross context virtual CPU structure.
     124 */
     125VMMDECL(bool)       CPUMGetGuestFiqMasked(PVMCPUCC pVCpu)
     126{
     127    CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PSTATE);
     128    return RT_BOOL(pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_F);
    101129}
    102130
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r99051 r99576  
    4646
    4747
    48 
     48#if !defined(VBOX_VMM_TARGET_ARMV8)
    4949/**
    5050 * Gets the pending interrupt.
     
    7070    {
    7171        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC);
    72 #if defined(VBOX_VMM_TARGET_ARMV8)
    73         AssertReleaseFailed();
    74 #else
     72
    7573        uint32_t uTagSrc;
    7674        rc = APICGetInterrupt(pVCpu, pu8Interrupt, &uTagSrc);
     
    8381        /* else if it's masked by TPR/PPR/whatever, go ahead checking the PIC. Such masked
    8482           interrupts shouldn't prevent ExtINT from being delivered. */
    85 #endif
    8683    }
    8784
     
    121118    return rc;
    122119}
     120#endif
    123121
    124122
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