Changeset 71529 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 28, 2018 6:32:43 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r71419 r71529 317 317 * returned in @a pbOffMsrpm. 318 318 */ 319 VMM_INT_DECL(int) HMSvmGetMsrpmOffsetAndBit(uint32_t idMsr, uint16_t *pbOffMsrpm, uint 32_t *puMsrpmBit)319 VMM_INT_DECL(int) HMSvmGetMsrpmOffsetAndBit(uint32_t idMsr, uint16_t *pbOffMsrpm, uint8_t *puMsrpmBit) 320 320 { 321 321 Assert(pbOffMsrpm); … … 335 335 { 336 336 /* Pentium-compatible MSRs. */ 337 *pbOffMsrpm = 0; 338 *puMsrpmBit = idMsr << 1; 337 uint32_t const bitoffMsr = idMsr << 1; 338 *pbOffMsrpm = bitoffMsr >> 3; 339 *puMsrpmBit = bitoffMsr & 7; 339 340 return VINF_SUCCESS; 340 341 } … … 344 345 { 345 346 /* AMD Sixth Generation x86 Processor MSRs. */ 346 *pbOffMsrpm = 0x800; 347 *puMsrpmBit = (idMsr - 0xc0000000) << 1; 347 uint32_t const bitoffMsr = (idMsr - 0xc0000000) << 1; 348 *pbOffMsrpm = 0x800 + (bitoffMsr >> 3); 349 *puMsrpmBit = bitoffMsr & 7; 348 350 return VINF_SUCCESS; 349 351 } … … 353 355 { 354 356 /* AMD Seventh and Eighth Generation Processor MSRs. */ 355 *pbOffMsrpm = 0x1000; 356 *puMsrpmBit = (idMsr - 0xc0010000) << 1; 357 uint32_t const bitoffMsr = (idMsr - 0xc0010000) << 1; 358 *pbOffMsrpm = 0x1000 + (bitoffMsr >> 3); 359 *puMsrpmBit = bitoffMsr & 7; 357 360 return VINF_SUCCESS; 358 361 }
Note:
See TracChangeset
for help on using the changeset viewer.