- Timestamp:
- Apr 11, 2018 4:42:38 AM (7 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r71755 r71813 1116 1116 uint8_t *pbMsrpm = (uint8_t *)pCtx->hwvirt.svm.CTX_SUFF(pvMsrBitmap); 1117 1117 pbMsrpm += offMsrpm; 1118 if ( ASMBitTest(pbMsrpm,uMsrpmBit))1118 if (*pbMsrpm & RT_BIT(uMsrpmBit)) 1119 1119 { 1120 1120 IEM_SVM_UPDATE_NRIP(pVCpu); -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r71801 r71813 839 839 pbMsrBitmap += offMsrpm; 840 840 if (enmRead == SVMMSREXIT_INTERCEPT_READ) 841 ASMBitSet(pbMsrBitmap,uMsrpmBit);841 *pbMsrBitmap |= RT_BIT(uMsrpmBit); 842 842 else 843 843 { 844 844 if (!fInNestedGuestMode) 845 ASMBitClear(pbMsrBitmap,uMsrpmBit);845 *pbMsrBitmap &= ~RT_BIT(uMsrpmBit); 846 846 #ifdef VBOX_WITH_NESTED_HWVIRT 847 847 else … … 850 850 uint8_t const *pbNstGstMsrBitmap = (uint8_t *)pCtx->hwvirt.svm.CTX_SUFF(pvMsrBitmap); 851 851 pbNstGstMsrBitmap += offMsrpm; 852 if (! ASMBitTest(pbNstGstMsrBitmap, uMsrpmBit))853 ASMBitClear(pbMsrBitmap,uMsrpmBit);852 if (!(*pbNstGstMsrBitmap & RT_BIT(uMsrpmBit))) 853 *pbMsrBitmap &= ~RT_BIT(uMsrpmBit); 854 854 else 855 Assert( ASMBitTest(pbMsrBitmap,uMsrpmBit));855 Assert(*pbMsrBitmap & RT_BIT(uMsrpmBit)); 856 856 } 857 857 #endif … … 859 859 860 860 if (enmWrite == SVMMSREXIT_INTERCEPT_WRITE) 861 ASMBitSet(pbMsrBitmap,uMsrpmBit + 1);861 *pbMsrBitmap |= RT_BIT(uMsrpmBit + 1); 862 862 else 863 863 { 864 864 if (!fInNestedGuestMode) 865 ASMBitClear(pbMsrBitmap,uMsrpmBit + 1);865 *pbMsrBitmap &= ~RT_BIT(uMsrpmBit + 1); 866 866 #ifdef VBOX_WITH_NESTED_HWVIRT 867 867 else … … 870 870 uint8_t const *pbNstGstMsrBitmap = (uint8_t *)pCtx->hwvirt.svm.CTX_SUFF(pvMsrBitmap); 871 871 pbNstGstMsrBitmap += offMsrpm; 872 if (! ASMBitTest(pbNstGstMsrBitmap, uMsrpmBit + 1))873 ASMBitClear(pbMsrBitmap,uMsrpmBit + 1);872 if (!(*pbNstGstMsrBitmap & RT_BIT(uMsrpmBit + 1))) 873 *pbMsrBitmap &= ~RT_BIT(uMsrpmBit + 1); 874 874 else 875 Assert( ASMBitTest(pbMsrBitmap,uMsrpmBit + 1));875 Assert(*pbMsrBitmap & RT_BIT(uMsrpmBit + 1)); 876 876 } 877 877 #endif … … 5171 5171 uint8_t const *pbMsrBitmap = (uint8_t const *)pCtx->hwvirt.svm.CTX_SUFF(pvMsrBitmap); 5172 5172 pbMsrBitmap += offMsrpm; 5173 bool const fInterceptRead = ASMBitTest(pbMsrBitmap,uMsrpmBit);5174 bool const fInterceptWrite = ASMBitTest(pbMsrBitmap,uMsrpmBit + 1);5173 bool const fInterceptRead = *pbMsrBitmap & RT_BIT(uMsrpmBit); 5174 bool const fInterceptWrite = *pbMsrBitmap & RT_BIT(uMsrpmBit + 1); 5175 5175 5176 5176 if ( (fInterceptWrite && pVmcbNstGstCtrl->u64ExitInfo1 == SVM_EXIT1_MSR_WRITE) … … 7322 7322 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitPause); 7323 7323 hmR0SvmAdvanceRipHwAssist(pVCpu, pCtx, 2); 7324 7325 7324 /** @todo The guest has likely hit a contended spinlock. We might want to 7326 7325 * poke a schedule different guest VCPU. */
Note:
See TracChangeset
for help on using the changeset viewer.