Changeset 107113 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Nov 22, 2024 10:48:00 AM (6 months ago)
- svn:sync-xref-src-repo-rev:
- 166080
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/APICInternal.h
r106061 r107113 34 34 #include <VBox/apic.h> 35 35 #include <VBox/sup.h> 36 #include <VBox/vmm/pdmdev.h> 36 #include <VBox/vmm/pdmapic.h> 37 #include <VBox/vmm/stam.h> 37 38 38 39 /** @defgroup grp_apic_int Internal … … 41 42 * @{ 42 43 */ 44 45 #ifdef VBOX_INCLUDED_vmm_pdmapic_h 46 /** The VirtualBox APIC backend table. */ 47 extern const PDMAPICBACKEND g_ApicBackend; 48 #endif 43 49 44 50 /** The APIC hardware version we are emulating. */ … … 1156 1162 DECLCALLBACK(VBOXSTRICTRC) apicReadMmio(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void *pv, unsigned cb); 1157 1163 DECLCALLBACK(VBOXSTRICTRC) apicWriteMmio(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void const *pv, unsigned cb); 1158 1159 bool apicPostInterrupt(PVMCPUCC pVCpu, uint8_t uVector, XAPICTRIGGERMODE enmTriggerMode, uint32_t uSrcTag); 1164 DECLCALLBACK(bool) apicPostInterrupt(PVMCPUCC pVCpu, uint8_t uVector, XAPICTRIGGERMODE enmTriggerMode, bool fAutoEoi, 1165 uint32_t uSrcTag); 1166 #ifdef IN_RING3 1167 DECLCALLBACK(int) apicR3HvSetCompatMode(PVM pVM, bool fHyperVCompatMode); 1168 #endif 1160 1169 void apicStartTimer(PVMCPUCC pVCpu, uint32_t uInitialCount); 1161 1170 void apicClearInterruptFF(PVMCPUCC pVCpu, PDMAPICIRQ enmType); 1162 void apicInitIpi(PVMCPUCC pVCpu);1163 1171 void apicResetCpu(PVMCPUCC pVCpu, bool fResetApicBaseMsr); 1164 1172 -
trunk/src/VBox/VMM/include/PDMInternal.h
r106061 r107113 48 48 #include <VBox/vmm/pdmcommon.h> 49 49 #include <VBox/vmm/pdmtask.h> 50 #include <VBox/vmm/pdmapic.h> 50 51 #include <VBox/sup.h> 51 52 #include <VBox/msi.h> … … 795 796 796 797 /** 797 * PDM registered APIC device.798 */ 799 typedef struct PDM APIC800 { 801 /** Pointer to the APIC deviceinstance - R3 Ptr. */798 * PDM IC (Interrupt Controller), shared ring-3. 799 */ 800 typedef struct PDMICR3 801 { 802 /** Pointer to the interrupt controller instance - R3 Ptr. */ 802 803 PPDMDEVINSR3 pDevInsR3; 803 /** Pointer to the APIC device instance - R0 Ptr. */ 804 #ifndef VBOX_VMM_TARGET_ARMV8 805 /** The type of APIC backend. */ 806 PDMAPICBACKENDTYPE enmKind; 807 uint32_t uPadding; 808 /** The APIC backend. */ 809 PDMAPICBACKENDR3 ApicBackend; 810 #else 811 /** @todo The GIC backend. Currently the padding helps keep alignment common 812 * between x86 and arm. */ 813 uint8_t auPadding[4+4+232]; 814 #endif 815 } PDMICR3; 816 AssertCompileSizeAlignment(PDMICR3, 8); 817 818 /** 819 * PDM IC (Interrupt Controller), ring-0. 820 */ 821 typedef struct PDMICR0 822 { 823 /** Pointer to the interrupt controller instance - R0 Ptr. */ 804 824 PPDMDEVINSR0 pDevInsR0; 805 /** Pointer to the APIC device instance - RC Ptr. */ 806 PPDMDEVINSRC pDevInsRC; 807 uint8_t Alignment[4]; 808 } PDMAPIC; 809 825 #ifndef VBOX_VMM_TARGET_ARMV8 826 /** The APIC backend. */ 827 PDMAPICBACKENDR0 ApicBackend; 828 #else 829 /** @todo The GIC backend. Currently the padding helps keep alignment common 830 * between x86 and arm. */ 831 uint8_t auPadding[232]; 832 #endif 833 } PDMICR0; 834 AssertCompileSizeAlignment(PDMICR0, 8); 835 836 /** 837 * PDM IC (Interrupt Controller), raw-mode context. 838 */ 839 typedef struct PDMICRC 840 { 841 /** Pointer to the interrupt controller instance - R0 Ptr. */ 842 PPDMDEVINSRC pDevInsR0; 843 RTRCPTR avPadding; 844 #ifndef VBOX_VMM_TARGET_ARMV8 845 /** The APIC backend. */ 846 PDMAPICBACKENDRC ApicBackend; 847 #else 848 /** @todo The GIC backend. Currently the padding helps keep alignment common 849 * between x86 and arm. */ 850 uint8_t auPadding[232]; 851 #endif 852 } PDMICRC; 853 AssertCompileSizeAlignment(PDMICRC, 8); 810 854 811 855 /** … … 1485 1529 /** The register PIC device. */ 1486 1530 PDMPIC Pic; 1487 /** The registered APIC device. */1488 PDM APIC Apic;1531 /** The registered IC device. */ 1532 PDMICR3 Ic; 1489 1533 /** The registered I/O APIC device. */ 1490 1534 PDMIOAPIC IoApic; … … 1590 1634 bool volatile fNsUnchokeTimerArmed; 1591 1635 /** Align aNsGroups on a cacheline. */ 1592 bool afPadding2[19+16 ];1636 bool afPadding2[19+16+25]; 1593 1637 /** Number of network shaper groups. 1594 1638 * @note Marked volatile to prevent re-reading after validation. */ … … 1653 1697 /** Array of ring-0 queues. */ 1654 1698 PDMQUEUER0 aQueues[16]; 1699 /** The interrupt-controller, ring-0 data. */ 1700 PDMICR0 Ic; 1655 1701 } PDMR0PERVM; 1656 1702 … … 1745 1791 #endif 1746 1792 1793 #ifndef VBOX_VMM_TARGET_ARMV8 1794 /** @def PDM_TO_APICBACKEND 1795 * Gets the APIC backend given the VM cross-context structure. 1796 */ 1797 /** @def PDMCPU_TO_APICBACKEND 1798 * Gets the APIC backend given VMCPU cross-context structure. 1799 */ 1800 # ifdef IN_RING3 1801 # define PDM_TO_APICBACKEND(a_pVM) (&((a_pVM)->pdm.s.Ic.ApicBackend)) 1802 # define PDMCPU_TO_APICBACKEND(a_pVCpu) (&((a_pVCpu)->CTX_SUFF(pVM)->pdm.s.Ic.ApicBackend)) 1803 #else 1804 # define PDM_TO_APICBACKEND(a_pVM) (&((a_pVM)->pdmr0.s.Ic.ApicBackend)) 1805 # define PDMCPU_TO_APICBACKEND(a_pVCpu) (&((a_pVCpu)->CTX_SUFF(pVM)->pdmr0.s.Ic.ApicBackend)) 1806 #endif 1807 #else 1808 /** @todo GIC backend. */ 1809 #endif 1747 1810 1748 1811 /*******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.