Changeset 91304 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Sep 17, 2021 8:43:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r91297 r91304 2127 2127 * 2128 2128 * @returns @c true if the MSR is intercepted, @c false otherwise. 2129 * @param p vMsrBitmap The MSR bitmap.2129 * @param pbMsrBitmap The MSR bitmap. 2130 2130 * @param offMsr The MSR byte offset. 2131 2131 * @param iBit The bit offset from the byte offset. 2132 2132 */ 2133 DECLINLINE(bool) hmR0VmxIsMsrBitSet(const void *pvMsrBitmap, uint16_t offMsr, int32_t iBit) 2134 { 2135 uint8_t const * const pbMsrBitmap = (uint8_t const * const)pvMsrBitmap; 2136 Assert(pbMsrBitmap); 2133 DECLINLINE(bool) hmR0VmxIsMsrBitSet(uint8_t const *pbMsrBitmap, uint16_t offMsr, int32_t iBit) 2134 { 2137 2135 Assert(offMsr + (iBit >> 3) <= X86_PAGE_4K_SIZE); 2138 2136 return ASMBitTest(pbMsrBitmap + offMsr, iBit); … … 2204 2202 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 2205 2203 bool const fClear = !fIsNstGstVmcs ? true 2206 : !hmR0VmxIsMsrBitSet(pVCpu->cpum.GstCtx.hwvirt.vmx. CTX_SUFF(pvMsrBitmap), offMsrRead, iBit);2204 : !hmR0VmxIsMsrBitSet(pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap, offMsrRead, iBit); 2207 2205 #else 2208 2206 RT_NOREF2(pVCpu, fIsNstGstVmcs); … … 2224 2222 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 2225 2223 bool const fClear = !fIsNstGstVmcs ? true 2226 : !hmR0VmxIsMsrBitSet(pVCpu->cpum.GstCtx.hwvirt.vmx. CTX_SUFF(pvMsrBitmap), offMsrWrite, iBit);2224 : !hmR0VmxIsMsrBitSet(pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap, offMsrWrite, iBit); 2227 2225 #else 2228 2226 RT_NOREF2(pVCpu, fIsNstGstVmcs); … … 2840 2838 * allow passthrough too. 2841 2839 */ 2842 void const *pvMsrBitmapNstGst = pVCpu->cpum.GstCtx.hwvirt.vmx. CTX_SUFF(pvMsrBitmap);2840 void const *pvMsrBitmapNstGst = pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap; 2843 2841 Assert(pvMsrBitmapNstGst); 2844 2842 uint32_t const fMsrpmNstGst = CPUMGetVmxMsrPermission(pvMsrBitmapNstGst, pGuestMsrLoad->u32Msr); … … 10422 10420 if (pVmcsNstGst->u32ProcCtls & VMX_PROC_CTLS_USE_MSR_BITMAPS) 10423 10421 { 10424 uint64_t const *pu64MsrBitmapNstGst = (uint64_t const *) pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap);10422 uint64_t const *pu64MsrBitmapNstGst = (uint64_t const *)&pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap[0]; 10425 10423 uint64_t const *pu64MsrBitmapGst = (uint64_t const *)pVmcsInfoGst->pvMsrBitmap; 10426 10424 Assert(pu64MsrBitmapNstGst); … … 17325 17323 uint32_t fMsrpm; 17326 17324 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS)) 17327 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx. CTX_SUFF(pvMsrBitmap), pVCpu->cpum.GstCtx.ecx);17325 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap, pVCpu->cpum.GstCtx.ecx); 17328 17326 else 17329 17327 fMsrpm = VMXMSRPM_EXIT_RD; … … 17347 17345 uint32_t fMsrpm; 17348 17346 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS)) 17349 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx. CTX_SUFF(pvMsrBitmap), pVCpu->cpum.GstCtx.ecx);17347 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.abMsrBitmap, pVCpu->cpum.GstCtx.ecx); 17350 17348 else 17351 17349 fMsrpm = VMXMSRPM_EXIT_WR;
Note:
See TracChangeset
for help on using the changeset viewer.