Changeset 105687 in vbox
- Timestamp:
- Aug 15, 2024 12:45:46 PM (6 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
- 1 moved
-
include/VBox/vmm/gic.h (modified) (2 diffs)
-
src/VBox/VMM/Makefile.kmk (modified) (2 diffs)
-
src/VBox/VMM/VMMAll/GICAll.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMR3/GICR3.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMR3/GICR3Nem-darwin.cpp (added)
-
src/VBox/VMM/VMMR3/GICR3Nem-linux.cpp (moved) (moved from trunk/src/VBox/VMM/VMMR3/GICR3Kvm.cpp ) (4 diffs)
-
src/VBox/VMM/VMMR3/PDMDevice.cpp (modified) (1 diff)
-
src/VBox/VMM/include/GICInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/gic.h
r104386 r105687 52 52 #ifdef VBOX_INCLUDED_vmm_pdmdev_h 53 53 extern const PDMDEVREG g_DeviceGIC; 54 # ifdef RT_OS_LINUX 55 extern const PDMDEVREG g_DeviceGICKvm; 56 # endif 54 extern const PDMDEVREG g_DeviceGICNem; 57 55 #endif 58 56 … … 71 69 VMMR3_INT_DECL(void) GICR3InitIpi(PVMCPU pVCpu); 72 70 73 # ifdef RT_OS_LINUX 74 /* Access to the in-kernel KVM GICv3. */ 75 VMMR3_INT_DECL(int) GICR3KvmSpiSet(PVMCC pVM, uint32_t uIntId, bool fAsserted); 76 VMMR3_INT_DECL(int) GICR3KvmPpiSet(PVMCPUCC pVCpu, uint32_t uIntId, bool fAsserted); 77 # endif 71 /* Access to the NEM provided GICv3. */ 72 VMMR3_INT_DECL(int) GICR3NemSpiSet(PVMCC pVM, uint32_t uIntId, bool fAsserted); 73 VMMR3_INT_DECL(int) GICR3NemPpiSet(PVMCPUCC pVCpu, uint32_t uIntId, bool fAsserted); 78 74 /** @} */ 79 75 #endif /* IN_RING3 */ -
trunk/src/VBox/VMM/Makefile.kmk
r104947 r105687 501 501 502 502 VBoxVMMArm_SOURCES.darwin.arm64 += \ 503 VMMR3/NEMR3Native-darwin-armv8.cpp 503 VMMR3/NEMR3Native-darwin-armv8.cpp \ 504 VMMR3/GICR3Nem-darwin.cpp 504 505 VBoxVMMArm_DEFS.darwin.arm64 += VBOX_WITH_NATIVE_NEM 505 506 VBoxVMMArm_LDFLAGS.darwin.arm64 = -framework Hypervisor … … 507 508 VBoxVMMArm_SOURCES.linux.arm64 += \ 508 509 VMMR3/NEMR3Native-linux-armv8.cpp \ 509 VMMR3/GICR3 Kvm.cpp510 VMMR3/GICR3Nem-linux.cpp 510 511 VBoxVMMArm_DEFS.linux.arm64 += VBOX_WITH_NATIVE_NEM 511 512 -
trunk/src/VBox/VMM/VMMAll/GICAll.cpp
r104386 r105687 1215 1215 /** @todo r=aeichner There must be another way to do this better, maybe create some callback interface 1216 1216 * the GIC can register. */ 1217 #ifdef RT_OS_LINUX 1218 # ifdef IN_RING3 1219 if (pGic->fKvmGic) 1220 return GICR3KvmSpiSet(pVM, uIntId, fAsserted); 1221 # else 1222 # error "Impossible to call the KVM in-kernel GIC from this context!" 1223 # endif 1217 #ifdef IN_RING3 1218 if (pGic->fNemGic) 1219 return GICR3NemSpiSet(pVM, uIntId, fAsserted); 1220 #else 1221 # error "Impossible to call the NEM in-kernel GIC from this context!" 1224 1222 #endif 1225 1223 … … 1259 1257 /** @todo r=aeichner There must be another way to do this better, maybe create some callback interface 1260 1258 * the GIC can register. */ 1261 #ifdef RT_OS_LINUX 1262 # ifdef IN_RING3 1259 #ifdef IN_RING3 1263 1260 PGIC pGic = VM_TO_GIC(pVCpu->pVMR3); 1264 if (pGic->fKvmGic) 1265 return GICR3KvmPpiSet(pVCpu, uIntId, fAsserted); 1266 # else 1267 # error "Impossible to call the KVM in-kernel GIC from this context!" 1268 # endif 1261 if (pGic->fNemGic) 1262 return GICR3NemPpiSet(pVCpu, uIntId, fAsserted); 1263 #else 1264 # error "Impossible to call the NEM in-kernel GIC from this context!" 1269 1265 #endif 1270 1266 -
trunk/src/VBox/VMM/VMMR3/GICR3.cpp
r100758 r105687 70 70 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_DIR_EL1, ARMV8_AARCH64_SYSREG_ICC_SGI0R_EL1, "ICC_DIR_EL1 - ICC_SGI0R_EL1"), 71 71 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_IAR1_EL1, ARMV8_AARCH64_SYSREG_ICC_IGRPEN1_EL1, "ICC_IAR1_EL1 - ICC_IGRPEN1_EL1"), 72 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_SRE_EL2, ARMV8_AARCH64_SYSREG_ICC_SRE_EL2, "ICC_SRE_EL2") 72 73 }; 73 74 -
trunk/src/VBox/VMM/VMMR3/GICR3Nem-linux.cpp
r105686 r105687 138 138 * @param fAsserted Flag whether the interrupt is asserted (true) or not (false). 139 139 */ 140 VMMR3_INT_DECL(int) GICR3 KvmSpiSet(PVMCC pVM, uint32_t uIntId, bool fAsserted)140 VMMR3_INT_DECL(int) GICR3NemSpiSet(PVMCC pVM, uint32_t uIntId, bool fAsserted) 141 141 { 142 142 PGIC pGic = VM_TO_GIC(pVM); … … 157 157 * @param fAsserted Flag whether the interrupt is asserted (true) or not (false). 158 158 */ 159 VMMR3_INT_DECL(int) GICR3 KvmPpiSet(PVMCPUCC pVCpu, uint32_t uIntId, bool fAsserted)159 VMMR3_INT_DECL(int) GICR3NemPpiSet(PVMCPUCC pVCpu, uint32_t uIntId, bool fAsserted) 160 160 { 161 161 PPDMDEVINS pDevIns = VMCPU_TO_DEVINS(pVCpu); … … 276 276 */ 277 277 pGic->pDevInsR3 = pDevIns; 278 pGic->f KvmGic = true;278 pGic->fNemGic = true; 279 279 pThis->pDevIns = pDevIns; 280 280 pThis->fdKvmVm = pVM->nem.s.fdVm; … … 359 359 * GIC device registration structure. 360 360 */ 361 const PDMDEVREG g_DeviceGIC Kvm =361 const PDMDEVREG g_DeviceGICNem = 362 362 { 363 363 /* .u32Version = */ PDM_DEVREG_VERSION, 364 364 /* .uReserved0 = */ 0, 365 /* .szName = */ "gic- kvm",365 /* .szName = */ "gic-nem", 366 366 /* .fFlags = */ PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_NEW_STYLE, 367 367 /* .fClass = */ PDM_DEVREG_CLASS_PIC, -
trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
r104386 r105687 686 686 AssertRCReturn(rc, rc); 687 687 688 # ifdef RT_OS_LINUX 689 /* 690 * Register the internal VMM GIC device, KVM variant. 691 */ 692 rc = pdmR3DevReg_Register(&RegCB.Core, &g_DeviceGICKvm); 688 /* 689 * Register the internal VMM GIC device, NEM variant. 690 */ 691 rc = pdmR3DevReg_Register(&RegCB.Core, &g_DeviceGICNem); 693 692 AssertRCReturn(rc, rc); 694 # endif695 693 #else 696 694 /* -
trunk/src/VBox/VMM/include/GICInternal.h
r104386 r105687 101 101 /** The ring-3 device instance. */ 102 102 PPDMDEVINSR3 pDevInsR3; 103 #ifdef RT_OS_LINUX 104 /** Flag whether the in-kernel KVM GIC is used. */ 105 bool fKvmGic; 106 #endif 103 /** Flag whether the GIC provided by NEM is used. */ 104 bool fNemGic; 107 105 } GIC; 108 106 /** Pointer to GIC VM instance data. */
Note:
See TracChangeset
for help on using the changeset viewer.

