Changeset 73323 in vbox
- Timestamp:
- Jul 23, 2018 2:06:19 PM (7 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r73282 r73323 591 591 592 592 /* Debug registers. */ 593 if (fWhat & CPUMCTX_EXTRN_DR7) 594 aenmNames[iReg++] = WHvX64RegisterDr7; 593 595 if (fWhat & CPUMCTX_EXTRN_DR0_DR3) 594 596 { 597 if (!(fWhat & CPUMCTX_EXTRN_DR7) && (pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_DR7)) 598 { 599 fWhat |= CPUMCTX_EXTRN_DR7; 600 aenmNames[iReg++] = WHvX64RegisterDr7; 601 } 595 602 aenmNames[iReg++] = WHvX64RegisterDr0; 596 603 aenmNames[iReg++] = WHvX64RegisterDr1; … … 600 607 if (fWhat & CPUMCTX_EXTRN_DR6) 601 608 aenmNames[iReg++] = WHvX64RegisterDr6; 602 if (fWhat & CPUMCTX_EXTRN_DR7)603 aenmNames[iReg++] = WHvX64RegisterDr7;604 609 605 610 /* Floating point state. */ … … 889 894 890 895 /* Debug registers. */ 891 /** @todo fixme */ 896 if (fWhat & CPUMCTX_EXTRN_DR7) 897 { 898 Assert(aenmNames[iReg] == WHvX64RegisterDr7); 899 if (pVCpu->cpum.GstCtx.dr[7] != aValues[iReg].Reg64) 900 CPUMSetGuestDR7(pVCpu, aValues[iReg].Reg64); 901 pVCpu->cpum.GstCtx.fExtrn &= ~CPUMCTX_EXTRN_DR7; /* Hack alert! Avoids asserting when processing CPUMCTX_EXTRN_DR0_DR3. */ 902 iReg++; 903 } 892 904 if (fWhat & CPUMCTX_EXTRN_DR0_DR3) 893 905 { … … 912 924 if (pVCpu->cpum.GstCtx.dr[6] != aValues[iReg].Reg64) 913 925 CPUMSetGuestDR6(pVCpu, aValues[iReg].Reg64); 914 iReg++;915 }916 if (fWhat & CPUMCTX_EXTRN_DR7)917 {918 Assert(aenmNames[iReg] == WHvX64RegisterDr7);919 if (pVCpu->cpum.GstCtx.dr[7] != aValues[iReg].Reg64)920 CPUMSetGuestDR7(pVCpu, aValues[iReg].Reg64);921 926 iReg++; 922 927 } -
trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp
r73282 r73323 1419 1419 1420 1420 /* Debug registers. */ 1421 if (fWhat & CPUMCTX_EXTRN_DR7) 1422 pInput->Names[iReg++] = HvX64RegisterDr7; 1421 1423 if (fWhat & CPUMCTX_EXTRN_DR0_DR3) 1422 1424 { 1425 if (!(fWhat & CPUMCTX_EXTRN_DR7) && (pCtx->fExtrn & CPUMCTX_EXTRN_DR7)) 1426 { 1427 fWhat |= CPUMCTX_EXTRN_DR7; 1428 pInput->Names[iReg++] = HvX64RegisterDr7; 1429 } 1423 1430 pInput->Names[iReg++] = HvX64RegisterDr0; 1424 1431 pInput->Names[iReg++] = HvX64RegisterDr1; … … 1428 1435 if (fWhat & CPUMCTX_EXTRN_DR6) 1429 1436 pInput->Names[iReg++] = HvX64RegisterDr6; 1430 if (fWhat & CPUMCTX_EXTRN_DR7)1431 pInput->Names[iReg++] = HvX64RegisterDr7;1432 1437 1433 1438 /* Floating point state. */ … … 1765 1770 1766 1771 /* Debug registers. */ 1767 /** @todo fixme */ 1768 /** @todo There are recalc issues here. Recalc will get register content and 1769 * that may assert since we doesn't clear CPUMCTX_EXTRN_ until the end. */ 1772 if (fWhat & CPUMCTX_EXTRN_DR7) 1773 { 1774 Assert(pInput->Names[iReg] == HvX64RegisterDr7); 1775 if (pCtx->dr[7] != paValues[iReg].Reg64) 1776 CPUMSetGuestDR7(pVCpu, paValues[iReg].Reg64); 1777 pCtx->fExtrn &= ~CPUMCTX_EXTRN_DR7; /* Hack alert! Avoids asserting when processing CPUMCTX_EXTRN_DR0_DR3. */ 1778 iReg++; 1779 } 1770 1780 if (fWhat & CPUMCTX_EXTRN_DR0_DR3) 1771 1781 { … … 1790 1800 if (pCtx->dr[6] != paValues[iReg].Reg64) 1791 1801 CPUMSetGuestDR6(pVCpu, paValues[iReg].Reg64); 1792 iReg++;1793 }1794 if (fWhat & CPUMCTX_EXTRN_DR7)1795 {1796 Assert(pInput->Names[iReg] == HvX64RegisterDr7);1797 if (pCtx->dr[7] != paValues[iReg].Reg64)1798 CPUMSetGuestDR7(pVCpu, paValues[iReg].Reg64);1799 1802 iReg++; 1800 1803 }
Note:
See TracChangeset
for help on using the changeset viewer.