Changeset 99735 in vbox
- Timestamp:
- May 10, 2023 5:29:47 PM (17 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
-
VMMR3/NEMR3Native-darwin-armv8.cpp (modified) (4 diffs)
-
include/NEMInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp
r99576 r99735 40 40 #include <VBox/vmm/iem.h> 41 41 #include <VBox/vmm/em.h> 42 #include <VBox/vmm/ apic.h>42 #include <VBox/vmm/gic.h> 43 43 #include <VBox/vmm/pdm.h> 44 #include <VBox/vmm/hm.h>45 #include <VBox/vmm/hm_vmx.h>46 44 #include <VBox/vmm/dbgftrace.h> 47 45 #include <VBox/vmm/gcm.h> … … 68 66 * Defined Constants And Macros * 69 67 *********************************************************************************************************************************/ 68 69 70 /** @todo The vTimer PPI for the virt platform, make it configurable. */ 71 #define NEM_DARWIN_VTIMER_GIC_PPI_IRQ 11 70 72 71 73 … … 1084 1086 return nemR3DarwinHandleExitException(pVM, pVCpu, pExit); 1085 1087 case HV_EXIT_REASON_VTIMER_ACTIVATED: 1086 /** @todo Set interrupt. */1087 return VINF_EM_RESCHEDULE;1088 pVCpu->nem.s.fVTimerActivated = true; 1089 return GICPpiSet(pVCpu, NEM_DARWIN_VTIMER_GIC_PPI_IRQ, true /*fAsserted*/); 1088 1090 default: 1089 1091 AssertReleaseFailed(); … … 1135 1137 int rc = nemR3DarwinExportGuestState(pVM, pVCpu); 1136 1138 AssertRCReturn(rc, rc); 1139 1140 /* Check whether the vTimer interrupt was handled by the guest and we can unmask the vTimer. */ 1141 if (pVCpu->nem.s.fVTimerActivated) 1142 { 1143 /* Read the CNTV_CTL_EL0 register. */ 1144 uint64_t u64CntvCtl = 0; 1145 1146 hv_return_t hrc = hv_vcpu_get_sys_reg(pVCpu->nem.s.hVCpu, HV_SYS_REG_CNTV_CTL_EL0, &u64CntvCtl); 1147 AssertRCReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9); 1148 1149 if ( (u64CntvCtl & (ARMV8_CNTV_CTL_EL0_AARCH64_ENABLE | ARMV8_CNTV_CTL_EL0_AARCH64_IMASK | ARMV8_CNTV_CTL_EL0_AARCH64_ISTATUS)) 1150 != (ARMV8_CNTV_CTL_EL0_AARCH64_ENABLE | ARMV8_CNTV_CTL_EL0_AARCH64_ISTATUS)) 1151 { 1152 /* Clear the interrupt. */ 1153 GICPpiSet(pVCpu, NEM_DARWIN_VTIMER_GIC_PPI_IRQ, false /*fAsserted*/); 1154 1155 pVCpu->nem.s.fVTimerActivated = false; 1156 hrc = hv_vcpu_set_vtimer_mask(pVCpu->nem.s.hVCpu, false /*vtimer_is_masked*/); 1157 AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9); 1158 } 1159 } 1137 1160 1138 1161 /* Set the pending interrupt state. */ -
trunk/src/VBox/VMM/include/NEMInternal.h
r99557 r99735 483 483 /** Flag whether an event is pending. */ 484 484 bool fEventPending; 485 /** Flag whether the vTimer got activated and is masked. */ 486 bool fVTimerActivated; 485 487 # else 486 488 /** The vCPU handle associated with the EMT executing this vCPU. */
Note:
See TracChangeset
for help on using the changeset viewer.

