Changeset 79106 in vbox
- Timestamp:
- Jun 12, 2019 11:18:43 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r79102 r79106 2327 2327 * VMCS are correct. 2328 2328 * 2329 * @param pVCpu The cross context virtual CPU structure. 2330 * @param pVmcsInfo The VMCS info. object. 2331 */ 2332 static void hmR0VmxCheckAutoLoadStoreMsrs(PVMCPU pVCpu, PCVMXVMCSINFO pVmcsInfo) 2329 * @param pVCpu The cross context virtual CPU structure. 2330 * @param pVmcsInfo The VMCS info. object. 2331 * @param fIsNstGstVmcs Whether this is a nested-guest VMCS. 2332 */ 2333 static void hmR0VmxCheckAutoLoadStoreMsrs(PVMCPU pVCpu, PCVMXVMCSINFO pVmcsInfo, bool fIsNstGstVmcs) 2333 2334 { 2334 2335 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); … … 2397 2398 else 2398 2399 { 2399 AssertMsgReturnVoid((fMsrpm & VMXMSRPM_ALLOW_RD_WR) == VMXMSRPM_ALLOW_RD_WR, 2400 ("u32Msr=%#RX32 cMsrs=%u No passthru read/write!\n", pGuestMsrLoad->u32Msr, cMsrs)); 2400 if (!fIsNstGstVmcs) 2401 { 2402 AssertMsgReturnVoid((fMsrpm & VMXMSRPM_ALLOW_RD_WR) == VMXMSRPM_ALLOW_RD_WR, 2403 ("u32Msr=%#RX32 cMsrs=%u No passthru read/write!\n", pGuestMsrLoad->u32Msr, cMsrs)); 2404 } 2405 else 2406 { 2407 /* 2408 * A nested-guest VMCS must -also- allow read/write passthrough for the MSR for us to 2409 * execute a nested-guest with MSR passthrough. 2410 * 2411 * Check if the nested-guest MSR bitmap allows passthrough, and if so, assert that we 2412 * allow passthrough too. 2413 */ 2414 void const *pvMsrBitmapNstGst = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap); 2415 Assert(pvMsrBitmapNstGst); 2416 uint32_t const fMsrpmNstGst = CPUMGetVmxMsrPermission(pvMsrBitmapNstGst, pGuestMsrLoad->u32Msr); 2417 AssertMsgReturnVoid(fMsrpm == fMsrpmNstGst, 2418 ("u32Msr=%#RX32 cMsrs=%u Permission mismatch fMsrpm=%#x fMsrpmNstGst=%#x!\n", 2419 pGuestMsrLoad->u32Msr, cMsrs, fMsrpm, fMsrpmNstGst)); 2420 } 2401 2421 } 2402 2422 } … … 10843 10863 #ifdef VBOX_STRICT 10844 10864 Assert(pVCpu->hm.s.vmx.fUpdatedHostAutoMsrs); 10845 hmR0VmxCheckAutoLoadStoreMsrs(pVCpu, pVmcsInfo );10865 hmR0VmxCheckAutoLoadStoreMsrs(pVCpu, pVmcsInfo, pVmxTransient->fIsNestedGuest); 10846 10866 hmR0VmxCheckHostEferMsr(pVCpu, pVmcsInfo); 10847 10867 AssertRC(hmR0VmxCheckVmcsCtls(pVCpu, pVmcsInfo));
Note:
See TracChangeset
for help on using the changeset viewer.