Changeset 106952 in vbox
- Timestamp:
- Nov 12, 2024 9:51:44 AM (2 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GICR3Nem-win.cpp
r106404 r106952 76 76 77 77 78 /* 79 * The following definitions appeared in build 27744 allow interacting with the GICv3 controller, 80 * (there is no official SDK for this yet). 81 */ 82 /** @todo Better way of defining these which doesn't require casting later on when calling APIs. */ 83 #define MY_WHV_ARM64_IINTERRUPT_TYPE_FIXED UINT32_C(0) 84 85 typedef union MY_WHV_INTERRUPT_CONTROL2 86 { 87 UINT64 AsUINT64; 88 struct 89 { 90 uint32_t InterruptType; 91 UINT32 Reserved1:2; 92 UINT32 Asserted:1; 93 UINT32 Retarget:1; 94 UINT32 Reserved2:28; 95 }; 96 } MY_WHV_INTERRUPT_CONTROL2; 97 98 99 typedef struct MY_WHV_INTERRUPT_CONTROL 100 { 101 UINT64 TargetPartition; 102 MY_WHV_INTERRUPT_CONTROL2 InterruptControl; 103 UINT64 DestinationAddress; 104 UINT32 RequestedVector; 105 UINT8 TargetVtl; 106 UINT8 ReservedZ0; 107 UINT16 ReservedZ1; 108 } MY_WHV_INTERRUPT_CONTROL; 109 AssertCompileSize(MY_WHV_INTERRUPT_CONTROL, 32); 110 111 78 112 /********************************************************************************************************************************* 79 113 * Global Variables * … … 86 120 #ifndef IN_SLICKEDIT 87 121 # define WHvRequestInterrupt g_pfnWHvRequestInterrupt 88 #endif89 90 #if 091 /**92 * System register ranges for the GICv3.93 */94 static CPUMSYSREGRANGE const g_aSysRegRanges_GICv3[] =95 {96 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_PMR_EL1, ARMV8_AARCH64_SYSREG_ICC_PMR_EL1, "ICC_PMR_EL1"),97 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_IAR0_EL1, ARMV8_AARCH64_SYSREG_ICC_AP0R3_EL1, "ICC_IAR0_EL1 - ICC_AP0R3_EL1"),98 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_AP1R0_EL1, ARMV8_AARCH64_SYSREG_ICC_NMIAR1_EL1, "ICC_AP1R0_EL1 - ICC_NMIAR1_EL1"),99 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_DIR_EL1, ARMV8_AARCH64_SYSREG_ICC_SGI0R_EL1, "ICC_DIR_EL1 - ICC_SGI0R_EL1"),100 GIC_SYSREGRANGE(ARMV8_AARCH64_SYSREG_ICC_IAR1_EL1, ARMV8_AARCH64_SYSREG_ICC_IGRPEN1_EL1, "ICC_IAR1_EL1 - ICC_IGRPEN1_EL1"),101 };102 122 #endif 103 123 … … 120 140 PGICHVDEV pThis = PDMDEVINS_2_DATA(pDevIns, PGICHVDEV); 121 141 122 WHV_INTERRUPT_CONTROL IntrCtrl;142 MY_WHV_INTERRUPT_CONTROL IntrCtrl; 123 143 IntrCtrl.TargetPartition = 0; 124 IntrCtrl.InterruptControl.InterruptType = WHvArm64InterruptTypeFixed; 125 IntrCtrl.InterruptControl.LevelTriggered = 1; 126 IntrCtrl.InterruptControl.LogicalDestinationMode = 0; 144 IntrCtrl.InterruptControl.InterruptType = MY_WHV_ARM64_IINTERRUPT_TYPE_FIXED; 145 IntrCtrl.InterruptControl.Reserved1 = 0; 127 146 IntrCtrl.InterruptControl.Asserted = fAsserted ? 1 : 0; 128 IntrCtrl.InterruptControl.Reserved = 0; 147 IntrCtrl.InterruptControl.Retarget = 0; 148 IntrCtrl.InterruptControl.Reserved2 = 0; 129 149 IntrCtrl.DestinationAddress = fPpi ? RT_BIT(idCpu) : 0; /* SGI1R_EL1 */ 130 150 IntrCtrl.RequestedVector = fPpi ? uIntId : uIntId; … … 132 152 IntrCtrl.ReservedZ0 = 0; 133 153 IntrCtrl.ReservedZ1 = 0; 134 HRESULT hrc = WHvRequestInterrupt(pThis->hPartition, &IntrCtrl, sizeof(IntrCtrl));154 HRESULT hrc = WHvRequestInterrupt(pThis->hPartition, (const WHV_INTERRUPT_CONTROL *)&IntrCtrl, sizeof(IntrCtrl)); 135 155 if (SUCCEEDED(hrc)) 136 156 return VINF_SUCCESS; 137 157 158 AssertFailed(); 138 159 LogFlowFunc(("WHvRequestInterrupt() failed with %Rhrc (Last=%#x/%u)\n", hrc, RTNtLastStatusValue(), RTNtLastErrorValue())); 139 160 return VERR_NEM_IPE_9; /** @todo */ … … 227 248 * Validate GIC settings. 228 249 */ 229 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DistributorMmioBase|RedistributorMmioBase ", "");250 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DistributorMmioBase|RedistributorMmioBase|ItsMmioBase", ""); 230 251 231 252 /* … … 255 276 return PDMDEV_SET_ERROR(pDevIns, rc, 256 277 N_("Configuration error: Failed to get the \"RedistributorMmioBase\" value")); 257 258 /** @todo Configure the MMIO bases when MS released a new SDK with support for it (currently hard coded in the FDT in the259 * Main constructor):260 * GICD: 0xffff0000261 * GICR: 0xeffee000 (0x20000 per VP)262 * GITS: 0xeff68000263 */264 278 265 279 gicR3HvReset(pDevIns); -
trunk/src/VBox/VMM/VMMR3/NEMR3Native-win-armv8.cpp
r106728 r106952 63 63 #include <VBox/vmm/vmcc.h> 64 64 65 #include <iprt/formats/arm-psci.h> 66 65 67 #include <iprt/ldr.h> 66 68 #include <iprt/path.h> … … 73 75 # define WHvMapGpaRangeFlagTrackDirtyPages ((WHV_MAP_GPA_RANGE_FLAGS)0x00000008) 74 76 #endif 77 78 79 /* 80 * The following definitions appeared in build 27744 allow configuring the base address of the GICv3 controller, 81 * (there is no official SDK for this yet). 82 */ 83 /** @todo Better way of defining these which doesn't require casting later on when calling APIs. */ 84 #define WHV_PARTITION_PROPERTY_CODE_ARM64_IC_PARAMETERS UINT32_C(0x00001012) 85 /** No GIC present. */ 86 #define WHV_ARM64_IC_EMULATION_MODE_NONE 0 87 /** Hyper-V emulates a GICv3. */ 88 #define WHV_ARM64_IC_EMULATION_MODE_GICV3 1 89 90 /** 91 * Configures the interrupt controller emulated by Hyper-V. 92 */ 93 typedef struct MY_WHV_ARM64_IC_PARAMETERS 94 { 95 uint32_t u32EmulationMode; 96 uint32_t u32Rsvd; 97 union 98 { 99 struct 100 { 101 RTGCPHYS GCPhysGicdBase; 102 RTGCPHYS GCPhysGitsTranslaterBase; 103 uint32_t u32Rsvd; 104 uint32_t cLpiIntIdBits; 105 uint32_t u32PpiCntvOverflw; 106 uint32_t u32PpiPmu; 107 uint32_t au32Rsvd[6]; 108 } GicV3; 109 } u; 110 } MY_WHV_ARM64_IC_PARAMETERS; 111 AssertCompileSize(MY_WHV_ARM64_IC_PARAMETERS, 64); 112 113 114 /** 115 * The hypercall exit context. 116 */ 117 typedef struct MY_WHV_HYPERCALL_CONTEXT 118 { 119 WHV_INTERCEPT_MESSAGE_HEADER Header; 120 uint16_t Immediate; 121 uint16_t u16Rsvd; 122 uint32_t u32Rsvd; 123 uint64_t X[18]; 124 } MY_WHV_HYPERCALL_CONTEXT; 125 typedef MY_WHV_HYPERCALL_CONTEXT *PMY_WHV_HYPERCALL_CONTEXT; 126 AssertCompileSize(MY_WHV_HYPERCALL_CONTEXT, 24 + 19 * sizeof(uint64_t)); 127 128 129 /** 130 * The exit reason context for arm64, the size is different 131 * from the default SDK we build against. 132 */ 133 typedef struct MY_WHV_RUN_VP_EXIT_CONTEXT 134 { 135 WHV_RUN_VP_EXIT_REASON ExitReason; 136 uint32_t u32Rsvd; 137 uint64_t u64Rsvd; 138 union 139 { 140 WHV_MEMORY_ACCESS_CONTEXT MemoryAccess; 141 WHV_RUN_VP_CANCELED_CONTEXT CancelReason; 142 MY_WHV_HYPERCALL_CONTEXT Hypercall; 143 WHV_UNRECOVERABLE_EXCEPTION_CONTEXT UnrecoverableException; 144 uint64_t au64Rsvd2[32]; 145 }; 146 } MY_WHV_RUN_VP_EXIT_CONTEXT; 147 typedef MY_WHV_RUN_VP_EXIT_CONTEXT *PMY_WHV_RUN_VP_EXIT_CONTEXT; 148 AssertCompileSize(MY_WHV_RUN_VP_EXIT_CONTEXT, 272); 149 150 #define My_WHvArm64RegisterGicrBaseGpa ((WHV_REGISTER_NAME)UINT32_C(0x00063000)) 75 151 76 152 … … 101 177 static decltype(WHvGetVirtualProcessorRegisters) * g_pfnWHvGetVirtualProcessorRegisters; 102 178 static decltype(WHvSetVirtualProcessorRegisters) * g_pfnWHvSetVirtualProcessorRegisters; 179 //static decltype(WHvGetVirtualProcessorState) * g_pfnWHvGetVirtualProcessorState; 103 180 decltype(WHvRequestInterrupt) * g_pfnWHvRequestInterrupt; 104 181 /** @} */ … … 137 214 NEM_WIN_IMPORT(0, false, WHvGetVirtualProcessorRegisters), 138 215 NEM_WIN_IMPORT(0, false, WHvSetVirtualProcessorRegisters), 216 // NEM_WIN_IMPORT(0, false, WHvGetVirtualProcessorState), 139 217 NEM_WIN_IMPORT(0, false, WHvRequestInterrupt), 140 218 #undef NEM_WIN_IMPORT … … 163 241 # define WHvGetVirtualProcessorRegisters g_pfnWHvGetVirtualProcessorRegisters 164 242 # define WHvSetVirtualProcessorRegisters g_pfnWHvSetVirtualProcessorRegisters 243 //# define WHvGetVirtualProcessorState g_pfnWHvGetVirtualProcessorState 165 244 # define WHvRequestInterrupt g_pfnWHvRequestInterrupt 166 245 … … 525 604 526 605 /** 606 * Initializes the GIC controller emulation provided by Hyper-V. 607 * 608 * @returns VBox status code. 609 * @param pVM The cross context VM structure. 610 * 611 * @note Needs to be done early when setting up the partition so this has to live here and not in GICNem-win.cpp 612 */ 613 static int nemR3WinGicCreate(PVM pVM) 614 { 615 PCFGMNODE pGicCfg = CFGMR3GetChild(CFGMR3GetRoot(pVM), "Devices/gic-nem/0/Config"); 616 AssertPtrReturn(pGicCfg, VERR_NEM_IPE_5); 617 618 /* 619 * Query the MMIO ranges. 620 */ 621 RTGCPHYS GCPhysMmioBaseDist = 0; 622 int rc = CFGMR3QueryU64(pGicCfg, "DistributorMmioBase", &GCPhysMmioBaseDist); 623 if (RT_FAILURE(rc)) 624 return VMSetError(pVM, rc, RT_SRC_POS, 625 "Configuration error: Failed to get the \"DistributorMmioBase\" value\n"); 626 627 RTGCPHYS GCPhysMmioBaseReDist = 0; 628 rc = CFGMR3QueryU64(pGicCfg, "RedistributorMmioBase", &GCPhysMmioBaseReDist); 629 if (RT_FAILURE(rc)) 630 return VMSetError(pVM, rc, RT_SRC_POS, 631 "Configuration error: Failed to get the \"RedistributorMmioBase\" value\n"); 632 633 RTGCPHYS GCPhysMmioBaseIts = 0; 634 rc = CFGMR3QueryU64(pGicCfg, "ItsMmioBase", &GCPhysMmioBaseIts); 635 if (RT_FAILURE(rc)) 636 return VMSetError(pVM, rc, RT_SRC_POS, 637 "Configuration error: Failed to get the \"ItsMmioBase\" value\n"); 638 639 /* 640 * One can only set the GIC distributor base. The re-distributor regions for the individual 641 * vCPUs are configured when the vCPUs are created, so we need to save the base of the MMIO region. 642 */ 643 pVM->nem.s.GCPhysMmioBaseReDist = GCPhysMmioBaseReDist; 644 645 WHV_PARTITION_HANDLE hPartition = pVM->nem.s.hPartition; 646 647 MY_WHV_ARM64_IC_PARAMETERS Property; RT_ZERO(Property); 648 Property.u32EmulationMode = WHV_ARM64_IC_EMULATION_MODE_GICV3; 649 Property.u.GicV3.GCPhysGicdBase = GCPhysMmioBaseDist; 650 Property.u.GicV3.GCPhysGitsTranslaterBase = GCPhysMmioBaseIts; 651 Property.u.GicV3.cLpiIntIdBits = 1; /** @todo LPIs are currently not supported with our device emulations. */ 652 Property.u.GicV3.u32PpiCntvOverflw = pVM->nem.s.u32GicPpiVTimer + 16; /* Calculate the absolute timer INTID. */ 653 Property.u.GicV3.u32PpiPmu = 23; /** @todo Configure dynamically (from SBSA, needs a PMU/NEM emulation just like with the GIC probably). */ 654 HRESULT hrc = WHvSetPartitionProperty(hPartition, (WHV_PARTITION_PROPERTY_CODE)WHV_PARTITION_PROPERTY_CODE_ARM64_IC_PARAMETERS, &Property, sizeof(Property)); 655 if (FAILED(hrc)) 656 return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS, 657 "Failed to set WHvPartitionPropertyCodeArm64IcParameters: %Rhrc (Last=%#x/%u)", 658 hrc, RTNtLastStatusValue(), RTNtLastErrorValue()); 659 660 return rc; 661 } 662 663 664 /** 527 665 * Creates and sets up a Hyper-V (exo) partition. 528 666 * … … 642 780 "Failed to set WHvPartitionPropertyCodeProcessorFeatures to %'#RX64: %Rhrc (Last=%#x/%u)", 643 781 pVM->nem.s.uCpuFeatures.u64, hrc, RTNtLastStatusValue(), RTNtLastErrorValue()); 782 783 /* Configure the GIC. */ 784 int rc = nemR3WinGicCreate(pVM); 785 if (RT_FAILURE(rc)) 786 return rc; 644 787 645 788 /* … … 681 824 CPUMIDREGS IdRegs; RT_ZERO(IdRegs); 682 825 683 #if 1826 #if 0 684 827 WHV_REGISTER_NAME aenmNames[12]; 685 828 WHV_REGISTER_VALUE aValues[12]; … … 731 874 #endif 732 875 733 intrc = CPUMR3PopulateFeaturesByIdRegisters(pVM, &IdRegs);876 rc = CPUMR3PopulateFeaturesByIdRegisters(pVM, &IdRegs); 734 877 if (RT_FAILURE(rc)) 735 878 return rc; 736 879 } 737 } 880 881 /* Configure the GIC re-distributor region for the GIC. */ 882 WHV_REGISTER_NAME enmName = My_WHvArm64RegisterGicrBaseGpa; 883 WHV_REGISTER_VALUE Value; 884 Value.Reg64 = pVM->nem.s.GCPhysMmioBaseReDist + idCpu * _128K; 885 886 hrc = WHvSetVirtualProcessorRegisters(hPartition, idCpu, &enmName, 1, &Value); 887 AssertLogRelMsgReturn(SUCCEEDED(hrc), 888 ("WHvSetVirtualProcessorRegisters(%p, %u, WHvArm64RegisterGicrBaseGpa,) -> %Rhrc (Last=%#x/%u)\n", 889 hPartition, idCpu, hrc, RTNtLastStatusValue(), RTNtLastErrorValue()) 890 , VERR_NEM_SET_REGISTERS_FAILED); 891 } 892 738 893 pVM->nem.s.fCreatedEmts = true; 739 894 … … 1811 1966 */ 1812 1967 NEM_TMPL_STATIC VBOXSTRICTRC 1813 nemR3WinHandleExitMemory(PVMCC pVM, PVMCPUCC pVCpu, WHV_RUN_VP_EXIT_CONTEXT const *pExit)1968 nemR3WinHandleExitMemory(PVMCC pVM, PVMCPUCC pVCpu, MY_WHV_RUN_VP_EXIT_CONTEXT const *pExit) 1814 1969 { 1815 1970 uint64_t const uHostTsc = ASMReadTSC(); … … 1924 2079 1925 2080 /** 2081 * Deals with memory access exits (WHvRunVpExitReasonMemoryAccess). 2082 * 2083 * @returns Strict VBox status code. 2084 * @param pVM The cross context VM structure. 2085 * @param pVCpu The cross context per CPU structure. 2086 * @param pExit The VM exit information to handle. 2087 * @sa nemHCWinHandleMessageMemory 2088 */ 2089 NEM_TMPL_STATIC VBOXSTRICTRC 2090 nemR3WinHandleExitHypercall(PVMCC pVM, PVMCPUCC pVCpu, MY_WHV_RUN_VP_EXIT_CONTEXT const *pExit) 2091 { 2092 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 2093 2094 /** @todo Raise exception to EL1 if PSCI not configured. */ 2095 /** @todo Need a generic mechanism here to pass this to, GIM maybe?. */ 2096 uint32_t uFunId = pExit->Hypercall.Immediate; 2097 bool fHvc64 = RT_BOOL(uFunId & ARM_SMCCC_FUNC_ID_64BIT); RT_NOREF(fHvc64); 2098 uint32_t uEntity = ARM_SMCCC_FUNC_ID_ENTITY_GET(uFunId); 2099 uint32_t uFunNum = ARM_SMCCC_FUNC_ID_NUM_GET(uFunId); 2100 if (uEntity == ARM_SMCCC_FUNC_ID_ENTITY_STD_SEC_SERVICE) 2101 { 2102 switch (uFunNum) 2103 { 2104 case ARM_PSCI_FUNC_ID_PSCI_VERSION: 2105 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, false /*f64BitReg*/, false /*fSignExtend*/, ARM_PSCI_FUNC_ID_PSCI_VERSION_SET(1, 2)); 2106 break; 2107 case ARM_PSCI_FUNC_ID_SYSTEM_OFF: 2108 rcStrict = VMR3PowerOff(pVM->pUVM); 2109 break; 2110 case ARM_PSCI_FUNC_ID_SYSTEM_RESET: 2111 case ARM_PSCI_FUNC_ID_SYSTEM_RESET2: 2112 { 2113 bool fHaltOnReset; 2114 int rc = CFGMR3QueryBool(CFGMR3GetChild(CFGMR3GetRoot(pVM), "PDM"), "HaltOnReset", &fHaltOnReset); 2115 if (RT_SUCCESS(rc) && fHaltOnReset) 2116 { 2117 Log(("nemHCLnxHandleExitHypercall: Halt On Reset!\n")); 2118 rcStrict = VINF_EM_HALT; 2119 } 2120 else 2121 { 2122 /** @todo pVM->pdm.s.fResetFlags = fFlags; */ 2123 VM_FF_SET(pVM, VM_FF_RESET); 2124 rcStrict = VINF_EM_RESET; 2125 } 2126 break; 2127 } 2128 case ARM_PSCI_FUNC_ID_CPU_ON: 2129 { 2130 uint64_t u64TgtCpu = pExit->Hypercall.X[1]; 2131 RTGCPHYS GCPhysExecAddr = pExit->Hypercall.X[2]; 2132 uint64_t u64CtxId = pExit->Hypercall.X[3]; 2133 VMMR3CpuOn(pVM, u64TgtCpu & 0xff, GCPhysExecAddr, u64CtxId); 2134 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, true /*f64BitReg*/, false /*fSignExtend*/, ARM_PSCI_STS_SUCCESS); 2135 break; 2136 } 2137 case ARM_PSCI_FUNC_ID_PSCI_FEATURES: 2138 { 2139 uint32_t u32FunNum = (uint32_t)pExit->Hypercall.X[1]; 2140 switch (u32FunNum) 2141 { 2142 case ARM_PSCI_FUNC_ID_PSCI_VERSION: 2143 case ARM_PSCI_FUNC_ID_SYSTEM_OFF: 2144 case ARM_PSCI_FUNC_ID_SYSTEM_RESET: 2145 case ARM_PSCI_FUNC_ID_SYSTEM_RESET2: 2146 case ARM_PSCI_FUNC_ID_CPU_ON: 2147 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, 2148 false /*f64BitReg*/, false /*fSignExtend*/, 2149 (uint64_t)ARM_PSCI_STS_SUCCESS); 2150 break; 2151 default: 2152 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, 2153 false /*f64BitReg*/, false /*fSignExtend*/, 2154 (uint64_t)ARM_PSCI_STS_NOT_SUPPORTED); 2155 } 2156 break; 2157 } 2158 default: 2159 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, false /*f64BitReg*/, false /*fSignExtend*/, (uint64_t)ARM_PSCI_STS_NOT_SUPPORTED); 2160 } 2161 } 2162 else 2163 nemR3WinSetGReg(pVCpu, ARMV8_AARCH64_REG_X0, false /*f64BitReg*/, false /*fSignExtend*/, (uint64_t)ARM_PSCI_STS_NOT_SUPPORTED); 2164 2165 2166 return rcStrict; 2167 } 2168 2169 2170 /** 1926 2171 * Deals with MSR access exits (WHvRunVpExitReasonUnrecoverableException). 1927 2172 * … … 1932 2177 * @sa nemHCWinHandleMessageUnrecoverableException 1933 2178 */ 1934 NEM_TMPL_STATIC VBOXSTRICTRC nemR3WinHandleExitUnrecoverableException(PVMCC pVM, PVMCPUCC pVCpu, WHV_RUN_VP_EXIT_CONTEXT const *pExit)2179 NEM_TMPL_STATIC VBOXSTRICTRC nemR3WinHandleExitUnrecoverableException(PVMCC pVM, PVMCPUCC pVCpu, MY_WHV_RUN_VP_EXIT_CONTEXT const *pExit) 1935 2180 { 1936 2181 #if 0 … … 1966 2211 * @sa nemHCWinHandleMessage 1967 2212 */ 1968 NEM_TMPL_STATIC VBOXSTRICTRC nemR3WinHandleExit(PVMCC pVM, PVMCPUCC pVCpu, WHV_RUN_VP_EXIT_CONTEXT const *pExit)2213 NEM_TMPL_STATIC VBOXSTRICTRC nemR3WinHandleExit(PVMCC pVM, PVMCPUCC pVCpu, MY_WHV_RUN_VP_EXIT_CONTEXT const *pExit) 1969 2214 { 1970 2215 int rc = nemHCWinCopyStateFromHyperV(pVM, pVCpu, CPUMCTX_EXTRN_ALL); … … 1985 2230 Log4(("CanceledExit/%u\n", pVCpu->idCpu)); 1986 2231 return VINF_SUCCESS; 2232 2233 case WHvRunVpExitReasonHypercall: 2234 return nemR3WinHandleExitHypercall(pVM, pVCpu, pExit); 1987 2235 1988 2236 case WHvRunVpExitReasonUnrecoverableException: … … 2122 2370 } 2123 2371 #endif 2124 WHV_RUN_VP_EXIT_CONTEXT ExitReason = {0};2372 MY_WHV_RUN_VP_EXIT_CONTEXT ExitReason = {0}; 2125 2373 TMNotifyStartOfExecution(pVM, pVCpu); 2126 2374 … … 2216 2464 pVCpu->cpum.GstCtx.fExtrn = 0; 2217 2465 } 2466 2467 #if 0 2468 UINT32 cbWritten; 2469 WHV_ARM64_LOCAL_INTERRUPT_CONTROLLER_STATE IntrState; 2470 HRESULT hrc = WHvGetVirtualProcessorState(pVM->nem.s.hPartition, pVCpu->idCpu, WHvVirtualProcessorStateTypeInterruptControllerState2, 2471 &IntrState, sizeof(IntrState), &cbWritten); 2472 AssertLogRelMsgReturn(SUCCEEDED(hrc), 2473 ("WHvGetVirtualProcessorState(%p, %u,WHvVirtualProcessorStateTypeInterruptControllerState2,) -> %Rhrc (Last=%#x/%u)\n", 2474 pVM->nem.s.hPartition, pVCpu->idCpu, hrc, RTNtLastStatusValue(), RTNtLastErrorValue()) 2475 , VERR_NEM_GET_REGISTERS_FAILED); 2476 LogFlowFunc(("IntrState: cbWritten=%u\n")); 2477 for (uint32_t i = 0; i < RT_ELEMENTS(IntrState.BankedInterruptState); i++) 2478 { 2479 WHV_ARM64_INTERRUPT_STATE *pState = &IntrState.BankedInterruptState[i]; 2480 LogFlowFunc(("IntrState: Intr %u:\n" 2481 " Enabled=%RTbool\n" 2482 " EdgeTriggered=%RTbool\n" 2483 " Asserted=%RTbool\n" 2484 " SetPending=%RTbool\n" 2485 " Active=%RTbool\n" 2486 " Direct=%RTbool\n" 2487 " GicrIpriorityrConfigured=%u\n" 2488 " GicrIpriorityrActive=%u\n", 2489 i, pState->Enabled, pState->EdgeTriggered, pState->Asserted, pState->SetPending, pState->Active, pState->Direct, 2490 pState->GicrIpriorityrConfigured, pState->GicrIpriorityrActive)); 2491 } 2492 #endif 2218 2493 2219 2494 #if 0 -
trunk/src/VBox/VMM/include/NEMInternal.h
r106061 r106952 315 315 uint64_t cPagesInUse; 316 316 } R0Stats; 317 318 # if defined(VBOX_VMM_TARGET_ARMV8) 319 RTGCPHYS GCPhysMmioBaseReDist; 320 # endif 317 321 318 322 #elif defined(RT_OS_DARWIN)
Note:
See TracChangeset
for help on using the changeset viewer.