- Timestamp:
- Sep 4, 2018 9:43:57 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp
r74054 r74061 137 137 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_Cpl , "Cpl" ), 138 138 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_Cr3TargetCount , "Cr3TargetCount" ), 139 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_ExitCtlsAllowed1 , "ExitCtlsAllowed1" ), 140 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_ExitCtlsDisallowed0 , "ExitCtlsDisallowed0" ), 139 141 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_LongModeCS , "LongModeCS" ), 140 142 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_NmiWindowExit , "NmiWindowExit" ), … … 148 150 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_PtrReadPhys , "PtrReadPhys" ), 149 151 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_RealOrV86Mode , "RealOrV86Mode" ), 152 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_SavePreemptTimer , "SavePreemptTimer" ), 150 153 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_Success , "Success" ), 151 154 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_TprThreshold , "TprThreshold" ), -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r74055 r74061 434 434 * 435 435 * @param pVCpu The cross context virtual CPU structure. 436 * @param u FieldEncThe VMCS field encoding.436 * @param u64FieldEnc The VMCS field encoding. 437 437 * 438 438 * @remarks This takes into account the CPU features exposed to the guest. 439 439 */ 440 IEM_STATIC bool iemVmxIsVmcsFieldValid(PVMCPU pVCpu, uint32_t uFieldEnc) 441 { 440 IEM_STATIC bool iemVmxIsVmcsFieldValid(PVMCPU pVCpu, uint64_t u64FieldEnc) 441 { 442 uint32_t const uFieldEncHi = RT_HI_U32(u64FieldEnc); 443 uint32_t const uFieldEncLo = RT_LO_U32(u64FieldEnc); 444 if (!uFieldEncHi) 445 { /* likely */ } 446 else 447 return false; 448 442 449 PCCPUMFEATURES pFeat = IEM_GET_GUEST_CPU_FEATURES(pVCpu); 443 switch (uFieldEnc )450 switch (uFieldEncLo) 444 451 { 445 452 /* … … 1128 1135 * @param pu64Dst Where to write the VMCS value (only updated when 1129 1136 * VINF_SUCCESS is returned). 1130 * @param u FieldEncThe VMCS field encoding.1137 * @param u64FieldEnc The VMCS field encoding. 1131 1138 * @param pExitInfo Pointer to the VM-exit information struct. Optional, can 1132 1139 * be NULL. 1133 1140 */ 1134 IEM_STATIC VBOXSTRICTRC iemVmxVmreadCommon(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint 32_t uFieldEnc,1141 IEM_STATIC VBOXSTRICTRC iemVmxVmreadCommon(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64FieldEnc, 1135 1142 PCVMXVEXITINFO pExitInfo) 1136 1143 { … … 1173 1180 1174 1181 /* Supported VMCS field. */ 1175 if ( !iemVmxIsVmcsFieldValid(pVCpu, uFieldEnc))1176 { 1177 Log(("vmread: VMCS field %# x invalid -> VMFail\n", uFieldEnc));1182 if (iemVmxIsVmcsFieldValid(pVCpu, u64FieldEnc)) 1183 { 1184 Log(("vmread: VMCS field %#RX64 invalid -> VMFail\n", u64FieldEnc)); 1178 1185 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmread_FieldInvalid; 1179 1186 iemVmxVmFail(pVCpu, VMXINSTRERR_VMREAD_INVALID_COMPONENT); … … 1192 1199 Assert(pbVmcs); 1193 1200 1194 PCVMXVMCSFIELDENC pFieldEnc = (PCVMXVMCSFIELDENC)&uFieldEnc; 1195 uint8_t const uWidth = pFieldEnc->n.u2Width; 1196 uint8_t const uType = pFieldEnc->n.u2Type; 1201 VMXVMCSFIELDENC FieldEnc; 1202 FieldEnc.u = RT_LO_U32(u64FieldEnc); 1203 uint8_t const uWidth = FieldEnc.n.u2Width; 1204 uint8_t const uType = FieldEnc.n.u2Type; 1197 1205 uint8_t const uWidthType = (uWidth << 2) | uType; 1198 uint8_t const uIndex = pFieldEnc->n.u8Index;1206 uint8_t const uIndex = FieldEnc.n.u8Index; 1199 1207 AssertRCReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2); 1200 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex];1208 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; 1201 1209 1202 1210 /* … … 1211 1219 */ 1212 1220 uint8_t *pbField = pbVmcs + offField; 1213 uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff( uFieldEnc);1221 uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(FieldEnc.u); 1214 1222 switch (uEffWidth) 1215 1223 { … … 1229 1237 * @param cbInstr The instruction length. 1230 1238 * @param pu64Dst Where to store the VMCS field's value. 1231 * @param u FieldEncThe VMCS field encoding.1239 * @param u64FieldEnc The VMCS field encoding. 1232 1240 * @param pExitInfo Pointer to the VM-exit information struct. Optional, can 1233 1241 * be NULL. 1234 1242 */ 1235 IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg64(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint 32_t uFieldEnc,1243 IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg64(PVMCPU pVCpu, uint8_t cbInstr, uint64_t *pu64Dst, uint64_t u64FieldEnc, 1236 1244 PCVMXVEXITINFO pExitInfo) 1237 1245 { 1238 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, pu64Dst, u FieldEnc, pExitInfo);1246 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, pu64Dst, u64FieldEnc, pExitInfo); 1239 1247 if (rcStrict == VINF_SUCCESS) 1240 1248 { … … 1254 1262 * @param cbInstr The instruction length. 1255 1263 * @param pu32Dst Where to store the VMCS field's value. 1256 * @param u FieldEncThe VMCS field encoding.1264 * @param u32FieldEnc The VMCS field encoding. 1257 1265 * @param pExitInfo Pointer to the VM-exit information struct. Optional, can 1258 1266 * be NULL. 1259 1267 */ 1260 IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg32(PVMCPU pVCpu, uint8_t cbInstr, uint32_t *pu32Dst, uint 32_t uFieldEnc,1268 IEM_STATIC VBOXSTRICTRC iemVmxVmreadReg32(PVMCPU pVCpu, uint8_t cbInstr, uint32_t *pu32Dst, uint64_t u32FieldEnc, 1261 1269 PCVMXVEXITINFO pExitInfo) 1262 1270 { 1263 1271 uint64_t u64Dst; 1264 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u FieldEnc, pExitInfo);1272 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u32FieldEnc, pExitInfo); 1265 1273 if (rcStrict == VINF_SUCCESS) 1266 1274 { … … 1286 1294 * @param GCPtrDst The guest linear address to store the VMCS field's 1287 1295 * value. 1288 * @param u FieldEncThe VMCS field encoding.1296 * @param u64FieldEnc The VMCS field encoding. 1289 1297 * @param pExitInfo Pointer to the VM-exit information struct. Optional, can 1290 1298 * be NULL. 1291 1299 */ 1292 1300 IEM_STATIC VBOXSTRICTRC iemVmxVmreadMem(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, IEMMODE enmEffAddrMode, 1293 RTGCPTR GCPtrDst, uint 32_t uFieldEnc, PCVMXVEXITINFO pExitInfo)1301 RTGCPTR GCPtrDst, uint64_t u64FieldEnc, PCVMXVEXITINFO pExitInfo) 1294 1302 { 1295 1303 uint64_t u64Dst; 1296 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u FieldEnc, pExitInfo);1304 VBOXSTRICTRC rcStrict = iemVmxVmreadCommon(pVCpu, cbInstr, &u64Dst, u64FieldEnc, pExitInfo); 1297 1305 if (rcStrict == VINF_SUCCESS) 1298 1306 { … … 1339 1347 * value), @a iEffSeg will indicate if it's a memory 1340 1348 * operand. 1341 * @param u FieldEncThe VMCS field encoding.1349 * @param u64FieldEnc The VMCS field encoding. 1342 1350 * @param pExitInfo Pointer to the VM-exit information struct. Optional, can 1343 1351 * be NULL. 1344 1352 */ 1345 1353 IEM_STATIC VBOXSTRICTRC iemVmxVmwrite(PVMCPU pVCpu, uint8_t cbInstr, uint8_t iEffSeg, IEMMODE enmEffAddrMode, uint64_t u64Val, 1346 uint 32_t uFieldEnc, PCVMXVEXITINFO pExitInfo)1354 uint64_t u64FieldEnc, PCVMXVEXITINFO pExitInfo) 1347 1355 { 1348 1356 if (IEM_IS_VMX_NON_ROOT_MODE(pVCpu)) … … 1412 1420 1413 1421 /* Supported VMCS field. */ 1414 if (!iemVmxIsVmcsFieldValid(pVCpu, u FieldEnc))1415 { 1416 Log(("vmwrite: VMCS field %# x invalid -> VMFail\n", uFieldEnc));1422 if (!iemVmxIsVmcsFieldValid(pVCpu, u64FieldEnc)) 1423 { 1424 Log(("vmwrite: VMCS field %#RX64 invalid -> VMFail\n", u64FieldEnc)); 1417 1425 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmwrite_FieldInvalid; 1418 1426 iemVmxVmFail(pVCpu, VMXINSTRERR_VMWRITE_INVALID_COMPONENT); … … 1422 1430 1423 1431 /* Read-only VMCS field. */ 1424 bool const fReadOnlyField = HMVmxIsVmcsFieldReadOnly(u FieldEnc);1432 bool const fReadOnlyField = HMVmxIsVmcsFieldReadOnly(u64FieldEnc); 1425 1433 if ( fReadOnlyField 1426 1434 && !IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmxVmwriteAll) 1427 1435 { 1428 Log(("vmwrite: Write to read-only VMCS component %# x -> VMFail\n", uFieldEnc));1436 Log(("vmwrite: Write to read-only VMCS component %#RX64 -> VMFail\n", u64FieldEnc)); 1429 1437 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmwrite_FieldRo; 1430 1438 iemVmxVmFail(pVCpu, VMXINSTRERR_VMWRITE_RO_COMPONENT); … … 1443 1451 Assert(pbVmcs); 1444 1452 1445 PCVMXVMCSFIELDENC pFieldEnc = (PCVMXVMCSFIELDENC)&uFieldEnc; 1446 uint8_t const uWidth = pFieldEnc->n.u2Width; 1447 uint8_t const uType = pFieldEnc->n.u2Type; 1453 VMXVMCSFIELDENC FieldEnc; 1454 FieldEnc.u = RT_LO_U32(u64FieldEnc); 1455 uint8_t const uWidth = FieldEnc.n.u2Width; 1456 uint8_t const uType = FieldEnc.n.u2Type; 1448 1457 uint8_t const uWidthType = (uWidth << 2) | uType; 1449 uint8_t const uIndex = pFieldEnc->n.u8Index;1458 uint8_t const uIndex = FieldEnc.n.u8Index; 1450 1459 AssertRCReturn(uIndex <= VMX_V_VMCS_MAX_INDEX, VERR_IEM_IPE_2); 1451 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex];1460 uint16_t const offField = g_aoffVmcsMap[uWidthType][uIndex]; 1452 1461 1453 1462 /* … … 1458 1467 */ 1459 1468 uint8_t *pbField = pbVmcs + offField; 1460 uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff( uFieldEnc);1469 uint8_t const uEffWidth = HMVmxGetVmcsFieldWidthEff(FieldEnc.u); 1461 1470 switch (uEffWidth) 1462 1471 { … … 1949 1958 1950 1959 /** 1951 * Checks VM-execution controls fields as part of VM-entry. 1960 * Checks VM-exit controls fields as part of VM-entry. 1961 * See Intel spec. 26.2.1.2 "VM-Exit Control Fields". 1952 1962 * 1953 1963 * @returns VBox status code. … … 1955 1965 * @param pszInstr The VMX instruction name (for logging purposes). 1956 1966 */ 1967 IEM_STATIC VBOXSTRICTRC iemVmxVmentryCheckExitCtls(PVMCPU pVCpu, const char *pszInstr) 1968 { 1969 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 1970 1971 /* VM-exit controls. */ 1972 VMXCTLSMSR ExitCtls; 1973 ExitCtls.u = CPUMGetGuestIa32VmxExitCtls(pVCpu); 1974 if (~pVmcs->u32ExitCtls & ExitCtls.n.disallowed0) 1975 { 1976 Log(("%s: Invalid ExitCtls %#RX32 (disallowed0) -> VMFail\n", pszInstr, pVmcs->u32ExitCtls)); 1977 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_ExitCtlsDisallowed0; 1978 return VERR_VMX_VMENTRY_FAILED; 1979 } 1980 if (pVmcs->u32ExitCtls & ~ExitCtls.n.allowed1) 1981 { 1982 Log(("%s: Invalid ExitCtls %#RX32 (allowed1) -> VMFail\n", pszInstr, pVmcs->u32ExitCtls)); 1983 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_ExitCtlsAllowed1; 1984 return VERR_VMX_VMENTRY_FAILED; 1985 } 1986 1987 /* Save preemption timer without activating it. */ 1988 if ( !(pVmcs->u32PinCtls & VMX_PIN_CTLS_PREEMPT_TIMER) 1989 && (pVmcs->u32ProcCtls & VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER)) 1990 { 1991 Log(("%s: Save Preempt-Timer without activate Preempt timer -> VMFail\n", pszInstr, pVmcs->u32ExitCtls)); 1992 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_SavePreemptTimer; 1993 return VERR_VMX_VMENTRY_FAILED; 1994 } 1995 1996 /** @todo NSTVMX: rest of exit ctls. */ 1997 1998 NOREF(pszInstr); 1999 return VINF_SUCCESS; 2000 } 2001 2002 2003 /** 2004 * Checks VM-execution controls fields as part of VM-entry. 2005 * See Intel spec. 26.2.1.1 "VM-Execution Control Fields". 2006 * 2007 * @returns VBox status code. 2008 * @param pVCpu The cross context virtual CPU structure. 2009 * @param pszInstr The VMX instruction name (for logging purposes). 2010 */ 1957 2011 IEM_STATIC VBOXSTRICTRC iemVmxVmentryCheckExecCtls(PVMCPU pVCpu, const char *pszInstr) 1958 2012 { 1959 /*1960 * Check VM-execution controls.1961 * See Intel spec. 26.2.1.1 "VM-Execution Control Fields".1962 */1963 2013 PVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 1964 1965 2014 /* Pin-based VM-execution controls. */ 1966 2015 { … … 2231 2280 } 2232 2281 2233 /** @todo NSTVMX: Read VMREAD-bitmap, VMWRITE-bitmap. */ 2282 /* Read the VMREAD-bitmap. */ 2283 int rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvVmreadBitmap), 2284 GCPhysVmreadBitmap, VMX_V_VMREAD_VMWRITE_BITMAP_SIZE); 2285 if (RT_FAILURE(rc)) 2286 { 2287 Log(("%s: Failed to read VMREAD-bitmap at %#RGp, rc=%Rrc\n", pszInstr, GCPhysVmreadBitmap, rc)); 2288 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_VmreadBitmapPtrReadPhys; 2289 return rc; 2290 } 2291 2292 /* Read the VMWRITE-bitmap. */ 2293 rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvVmwriteBitmap), 2294 GCPhysVmwriteBitmap, VMX_V_VMREAD_VMWRITE_BITMAP_SIZE); 2295 if (RT_FAILURE(rc)) 2296 { 2297 Log(("%s: Failed to read VMWRITE-bitmap at %#RGp, rc=%Rrc\n", pszInstr, GCPhysVmwriteBitmap, rc)); 2298 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_VmwriteBitmapPtrReadPhys; 2299 return rc; 2300 } 2234 2301 } 2235 2302 … … 2345 2412 } 2346 2413 2347 #if 02348 2414 /* 2349 2415 * Check VM-exit fields. … … 2358 2424 return VINF_SUCCESS; 2359 2425 } 2360 #endif2361 2426 2362 2427 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmentry_Success; … … 2481 2546 * Implements 'VMWRITE' register. 2482 2547 */ 2483 IEM_CIMPL_DEF_2(iemCImpl_vmwrite_reg, uint64_t, u64Val, uint 32_t, uFieldEnc)2484 { 2485 return iemVmxVmwrite(pVCpu, cbInstr, UINT8_MAX /* iEffSeg */, IEMMODE_64BIT /* N/A */, u64Val, u FieldEnc,2548 IEM_CIMPL_DEF_2(iemCImpl_vmwrite_reg, uint64_t, u64Val, uint64_t, u64FieldEnc) 2549 { 2550 return iemVmxVmwrite(pVCpu, cbInstr, UINT8_MAX /* iEffSeg */, IEMMODE_64BIT /* N/A */, u64Val, u64FieldEnc, 2486 2551 NULL /* pExitInfo */); 2487 2552 } … … 2491 2556 * Implements 'VMWRITE' memory. 2492 2557 */ 2493 IEM_CIMPL_DEF_4(iemCImpl_vmwrite_mem, uint8_t, iEffSeg, IEMMODE, enmEffAddrMode, RTGCPTR, GCPtrVal, uint32_t, u FieldEnc)2494 { 2495 return iemVmxVmwrite(pVCpu, cbInstr, iEffSeg, enmEffAddrMode, GCPtrVal, u FieldEnc, NULL /* pExitInfo */);2558 IEM_CIMPL_DEF_4(iemCImpl_vmwrite_mem, uint8_t, iEffSeg, IEMMODE, enmEffAddrMode, RTGCPTR, GCPtrVal, uint32_t, u64FieldEnc) 2559 { 2560 return iemVmxVmwrite(pVCpu, cbInstr, iEffSeg, enmEffAddrMode, GCPtrVal, u64FieldEnc, NULL /* pExitInfo */); 2496 2561 } 2497 2562 … … 2500 2565 * Implements 'VMREAD' 64-bit register. 2501 2566 */ 2502 IEM_CIMPL_DEF_2(iemCImpl_vmread64_reg, uint64_t *, pu64Dst, uint 32_t, uFieldEnc)2503 { 2504 return iemVmxVmreadReg64(pVCpu, cbInstr, pu64Dst, u FieldEnc, NULL /* pExitInfo */);2567 IEM_CIMPL_DEF_2(iemCImpl_vmread64_reg, uint64_t *, pu64Dst, uint64_t, u64FieldEnc) 2568 { 2569 return iemVmxVmreadReg64(pVCpu, cbInstr, pu64Dst, u64FieldEnc, NULL /* pExitInfo */); 2505 2570 } 2506 2571 … … 2509 2574 * Implements 'VMREAD' 32-bit register. 2510 2575 */ 2511 IEM_CIMPL_DEF_2(iemCImpl_vmread32_reg, uint32_t *, pu32Dst, uint32_t, u FieldEnc)2512 { 2513 return iemVmxVmreadReg32(pVCpu, cbInstr, pu32Dst, u FieldEnc, NULL /* pExitInfo */);2576 IEM_CIMPL_DEF_2(iemCImpl_vmread32_reg, uint32_t *, pu32Dst, uint32_t, u32FieldEnc) 2577 { 2578 return iemVmxVmreadReg32(pVCpu, cbInstr, pu32Dst, u32FieldEnc, NULL /* pExitInfo */); 2514 2579 } 2515 2580 … … 2518 2583 * Implements 'VMREAD' memory. 2519 2584 */ 2520 IEM_CIMPL_DEF_4(iemCImpl_vmread_mem, uint8_t, iEffSeg, IEMMODE, enmEffAddrMode, RTGCPTR, GCPtrDst, uint32_t, u FieldEnc)2521 { 2522 return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, enmEffAddrMode, GCPtrDst, u FieldEnc, NULL /* pExitInfo */);2585 IEM_CIMPL_DEF_4(iemCImpl_vmread_mem, uint8_t, iEffSeg, IEMMODE, enmEffAddrMode, RTGCPTR, GCPtrDst, uint32_t, u64FieldEnc) 2586 { 2587 return iemVmxVmreadMem(pVCpu, cbInstr, iEffSeg, enmEffAddrMode, GCPtrDst, u64FieldEnc, NULL /* pExitInfo */); 2523 2588 } 2524 2589 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r74047 r74061 3378 3378 /* Enable saving of the VMX preemption timer value on VM-exit. */ 3379 3379 if ( pVM->hm.s.vmx.fUsePreemptTimer 3380 && (pVM->hm.s.vmx.Msrs.ExitCtls.n.allowed1 & VMX_EXIT_CTLS_SAVE_ VMX_PREEMPT_TIMER))3381 fVal |= VMX_EXIT_CTLS_SAVE_ VMX_PREEMPT_TIMER;3380 && (pVM->hm.s.vmx.Msrs.ExitCtls.n.allowed1 & VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER)) 3381 fVal |= VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER; 3382 3382 3383 3383 if ((fVal & fZap) != fVal) -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r74054 r74061 921 921 pVCpu->cpum.s.Guest.hwvirt.vmx.pvVirtApicPageR3 = NULL; 922 922 } 923 if (pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3) 924 { 925 SUPR3PageFreeEx(pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3, VMX_V_VMREAD_VMWRITE_BITMAP_PAGES); 926 pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3 = NULL; 927 } 928 if (pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3) 929 { 930 SUPR3PageFreeEx(pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3, VMX_V_VMREAD_VMWRITE_BITMAP_PAGES); 931 pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3 = NULL; 932 } 923 933 } 924 934 } … … 967 977 LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's Virtual-APIC page\n", pVCpu->idCpu, 968 978 VMX_V_VIRT_APIC_PAGES)); 979 break; 980 } 981 982 /* 983 * Allocate the VMREAD-bitmap. 984 */ 985 Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3); 986 rc = SUPR3PageAllocEx(VMX_V_VMREAD_VMWRITE_BITMAP_PAGES, 0 /* fFlags */, &pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3, 987 &pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR0, NULL /* paPages */); 988 if (RT_FAILURE(rc)) 989 { 990 Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmreadBitmapR3); 991 LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's VMREAD-bitmap\n", pVCpu->idCpu, 992 VMX_V_VMREAD_VMWRITE_BITMAP_PAGES)); 993 break; 994 } 995 996 /* 997 * Allocatge the VMWRITE-bitmap. 998 */ 999 Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3); 1000 rc = SUPR3PageAllocEx(VMX_V_VMREAD_VMWRITE_BITMAP_PAGES, 0 /* fFlags */, 1001 &pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3, 1002 &pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR0, NULL /* paPages */); 1003 if (RT_FAILURE(rc)) 1004 { 1005 Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvVmwriteBitmapR3); 1006 LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's VMWRITE-bitmap\n", pVCpu->idCpu, 1007 VMX_V_VMREAD_VMWRITE_BITMAP_PAGES)); 969 1008 break; 970 1009 } … … 1173 1212 pHostFeat->fVmxExitSaveEferMsr = RT_BOOL(fExitCtls & VMX_EXIT_CTLS_SAVE_EFER_MSR); 1174 1213 pHostFeat->fVmxExitLoadEferMsr = RT_BOOL(fExitCtls & VMX_EXIT_CTLS_LOAD_EFER_MSR); 1175 pHostFeat->fVmxSavePreemptTimer = RT_BOOL(fExitCtls & VMX_EXIT_CTLS_SAVE_ VMX_PREEMPT_TIMER);1214 pHostFeat->fVmxSavePreemptTimer = RT_BOOL(fExitCtls & VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER); 1176 1215 1177 1216 /* Miscellaneous data. */ -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r74054 r74061 1552 1552 HMVMX_REPORT_FEAT(val, zap, "SAVE_EFER_MSR", VMX_EXIT_CTLS_SAVE_EFER_MSR); 1553 1553 HMVMX_REPORT_FEAT(val, zap, "LOAD_EFER_MSR", VMX_EXIT_CTLS_LOAD_EFER_MSR); 1554 HMVMX_REPORT_FEAT(val, zap, "SAVE_ VMX_PREEMPT_TIMER", VMX_EXIT_CTLS_SAVE_VMX_PREEMPT_TIMER);1554 HMVMX_REPORT_FEAT(val, zap, "SAVE_PREEMPT_TIMER", VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER); 1555 1555 } 1556 1556 … … 3172 3172 HMVMX_LOGREL_FEAT(u32Val, VMX_EXIT_CTLS_SAVE_EFER_MSR ); 3173 3173 HMVMX_LOGREL_FEAT(u32Val, VMX_EXIT_CTLS_LOAD_EFER_MSR ); 3174 HMVMX_LOGREL_FEAT(u32Val, VMX_EXIT_CTLS_SAVE_ VMX_PREEMPT_TIMER);3174 HMVMX_LOGREL_FEAT(u32Val, VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER ); 3175 3175 } 3176 3176 LogRel(("HM: CPU[%u] HCPhysMsrBitmap %#RHp\n", i, pVCpu->hm.s.vmx.HCPhysMsrBitmap));
Note:
See TracChangeset
for help on using the changeset viewer.