儲存庫 vbox 的更動 11974
- 時間撮記:
- 2008-9-2 上午11:49:33 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/PATM/PATMSSM.cpp
r11973 r11974 436 436 Assert(patmInfo.ulCallDepth == 0 && pVM->patm.s.ulCallDepth == 0); 437 437 438 Log(("pPatchMemGC %VRv vs old %VRv\n", pVM->patm.s.pPatchMemGC, patmInfo.pPatchMemGC)); 438 439 Log(("pGCStateGC %VRv vs old %VRv\n", pVM->patm.s.pGCStateGC, patmInfo.pGCStateGC)); 439 440 Log(("pGCStackGC %VRv vs old %VRv\n", pVM->patm.s.pGCStackGC, patmInfo.pGCStackGC)); 440 441 Log(("pCPUMCtxGC %VRv vs old %VRv\n", pVM->patm.s.pCPUMCtxGC, patmInfo.pCPUMCtxGC)); 442 441 443 442 444 /** @note patch statistics are not restored. */ … … 729 731 break; 730 732 731 if ( patmInfo.pPatchMemGC + offset>= patmInfo.pGCStateGC732 && patmInfo.pPatchMemGC + offset< patmInfo.pGCStateGC + sizeof(PATMGCSTATE))733 { 734 LogFlow(("Changing absolute GCState from %VRv (%VRv)to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pGCStateGC) + pVM->patm.s.pGCStateGC));733 if ( *pFixup >= patmInfo.pGCStateGC 734 && *pFixup < patmInfo.pGCStateGC + sizeof(PATMGCSTATE)) 735 { 736 LogFlow(("Changing absolute GCState at %VRv from %VRv to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pGCStateGC) + pVM->patm.s.pGCStateGC)); 735 737 *pFixup = (*pFixup - patmInfo.pGCStateGC) + pVM->patm.s.pGCStateGC; 736 738 } 737 739 else 738 if ( patmInfo.pPatchMemGC + offset>= patmInfo.pCPUMCtxGC739 && patmInfo.pPatchMemGC + offset< patmInfo.pCPUMCtxGC + sizeof(CPUMCTX))740 { 741 LogFlow(("Changing absolute CPUMCTX from %VRv (%VRv)to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pCPUMCtxGC) + pVM->patm.s.pCPUMCtxGC));740 if ( *pFixup >= patmInfo.pCPUMCtxGC 741 && *pFixup < patmInfo.pCPUMCtxGC + sizeof(CPUMCTX)) 742 { 743 LogFlow(("Changing absolute CPUMCTX at %VRv from %VRv to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pCPUMCtxGC) + pVM->patm.s.pCPUMCtxGC)); 742 744 743 745 /* The CPUMCTX structure has completely changed, so correct the offsets too. */ … … 751 753 if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr0)) 752 754 { 753 Log (("Changing dr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr0)));755 LogFlow(("Changing dr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr0))); 754 756 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr0); 755 757 } 756 758 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr1)) 757 759 { 758 Log (("Changing dr1 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr1)));760 LogFlow(("Changing dr1 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr1))); 759 761 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr1); 760 762 } 761 763 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr2)) 762 764 { 763 Log (("Changing dr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr2)));765 LogFlow(("Changing dr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr2))); 764 766 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr2); 765 767 } 766 768 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr3)) 767 769 { 768 Log (("Changing dr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr3)));770 LogFlow(("Changing dr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr3))); 769 771 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr3); 770 772 } 771 773 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr4)) 772 774 { 773 Log (("Changing dr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr4)));775 LogFlow(("Changing dr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr4))); 774 776 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr4); 775 777 } 776 778 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr5)) 777 779 { 778 Log (("Changing dr5 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr5)));780 LogFlow(("Changing dr5 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr5))); 779 781 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr5); 780 782 } 781 783 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr6)) 782 784 { 783 Log (("Changing dr6 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr6)));785 LogFlow(("Changing dr6 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr6))); 784 786 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr6); 785 787 } 786 788 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr7)) 787 789 { 788 Log (("Changing dr7 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr7)));790 LogFlow(("Changing dr7 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr7))); 789 791 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr7); 790 792 } 791 793 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr0)) 792 794 { 793 Log (("Changing cr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr0)));795 LogFlow(("Changing cr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr0))); 794 796 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr0); 795 797 } 796 798 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr2)) 797 799 { 798 Log (("Changing cr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr2)));800 LogFlow(("Changing cr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr2))); 799 801 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr2); 800 802 } 801 803 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr3)) 802 804 { 803 Log (("Changing cr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr3)));805 LogFlow(("Changing cr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr3))); 804 806 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr3); 805 807 } 806 808 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr4)) 807 809 { 808 Log (("Changing cr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr4)));810 LogFlow(("Changing cr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr4))); 809 811 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr4); 810 812 } 811 813 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, tr)) 812 814 { 813 Log (("Changing tr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, tr)));815 LogFlow(("Changing tr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, tr))); 814 816 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, tr); 815 817 } 816 818 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, ldtr)) 817 819 { 818 Log (("Changing ldtr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, ldtr)));820 LogFlow(("Changing ldtr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, ldtr))); 819 821 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, ldtr); 820 822 } 821 823 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.pGdt)) 822 824 { 823 Log (("Changing pGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.pGdt)));825 LogFlow(("Changing pGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.pGdt))); 824 826 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, gdtr.pGdt); 825 827 } 826 828 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.cbGdt)) 827 829 { 828 Log (("Changing cbGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.cbGdt)));830 LogFlow(("Changing cbGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.cbGdt))); 829 831 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, gdtr.cbGdt); 830 832 } 831 833 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, idtr.pIdt)) 832 834 { 833 Log (("Changing pIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.pIdt)));835 LogFlow(("Changing pIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.pIdt))); 834 836 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, idtr.pIdt); 835 837 } 836 838 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, idtr.cbIdt)) 837 839 { 838 Log (("Changing cbIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.cbIdt)));840 LogFlow(("Changing cbIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.cbIdt))); 839 841 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, idtr.cbIdt); 840 842 } 841 843 else 842 Assert Failed();844 AssertMsgFailed(("Unexpected CPUMCTX offset %x\n", uCPUMOffset)); 843 845 } 844 846 else … … 846 848 } 847 849 else 848 if ( patmInfo.pPatchMemGC + offset>= patmInfo.pStatsGC849 && patmInfo.pPatchMemGC + offset< patmInfo.pStatsGC + sizeof(CPUMCTX))850 { 851 LogFlow(("Changing absolute Stats from %VRv (%VRv)to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pStatsGC) + pVM->patm.s.pStatsGC));850 if ( *pFixup >= patmInfo.pStatsGC 851 && *pFixup < patmInfo.pStatsGC + sizeof(CPUMCTX)) 852 { 853 LogFlow(("Changing absolute Stats at %VRv from %VRv to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pStatsGC) + pVM->patm.s.pStatsGC)); 852 854 *pFixup = (*pFixup - patmInfo.pStatsGC) + pVM->patm.s.pStatsGC; 853 855 } 854 856 else 855 if ( patmInfo.pPatchMemGC + offset>= patmInfo.pGCStackGC856 && patmInfo.pPatchMemGC + offset< patmInfo.pGCStackGC + PATM_STACK_TOTAL_SIZE)857 { 858 LogFlow(("Changing absolute Stack from %VRv (%VRv)to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pGCStackGC) + pVM->patm.s.pGCStackGC));857 if ( *pFixup >= patmInfo.pGCStackGC 858 && *pFixup < patmInfo.pGCStackGC + PATM_STACK_TOTAL_SIZE) 859 { 860 LogFlow(("Changing absolute Stack at %VRv from %VRv to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pGCStackGC) + pVM->patm.s.pGCStackGC)); 859 861 *pFixup = (*pFixup - patmInfo.pGCStackGC) + pVM->patm.s.pGCStackGC; 860 862 } 861 863 else 862 if ( patmInfo.pPatchMemGC + offset>= patmInfo.pPatchMemGC863 && patmInfo.pPatchMemGC + offset< patmInfo.pPatchMemGC + patmInfo.cbPatchMem)864 { 865 LogFlow(("Changing absolute PatchMem from %VRv (%VRv)to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pPatchMemGC) + pVM->patm.s.pPatchMemGC));864 if ( *pFixup >= patmInfo.pPatchMemGC 865 && *pFixup < patmInfo.pPatchMemGC + patmInfo.cbPatchMem) 866 { 867 LogFlow(("Changing absolute PatchMem at %VRv from %VRv to %VRv\n", patmInfo.pPatchMemGC + offset, *pFixup, (*pFixup - patmInfo.pPatchMemGC) + pVM->patm.s.pPatchMemGC)); 866 868 *pFixup = (*pFixup - patmInfo.pPatchMemGC) + pVM->patm.s.pPatchMemGC; 867 869 } 868 870 else 869 Assert Failed();871 AssertMsgFailed(("Unexpected fixup value %x\n", *pFixup)); 870 872 break; 871 873 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器