vbox的更動 19141 路徑 trunk/src/VBox/VMM/SELM.cpp
- 時間撮記:
- 2009-4-23 下午01:52:18 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/SELM.cpp
r18988 r19141 223 223 * Default action when entering raw mode for the first time 224 224 */ 225 VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS); 226 VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT); 227 VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT); 225 PVMCPU pVCpu = &pVM->aCpus[0]; /* raw mode implies on VCPU */ 226 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 227 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 228 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 228 229 229 230 /* … … 579 580 * Default action when entering raw mode for the first time 580 581 */ 581 VM_FF_SET(pVM, VM_FF_SELM_SYNC_TSS); 582 VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT); 583 VM_FF_SET(pVM, VM_FF_SELM_SYNC_LDT); 582 PVMCPU pVCpu = &pVM->aCpus[0]; /* raw mode implies on VCPU */ 583 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 584 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 585 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 584 586 } 585 587 … … 651 653 #endif 652 654 653 VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS); 654 VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT); 655 VM_FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT); 655 PVMCPU pVCpu = &pVM->aCpus[0]; /* raw mode implies on VCPU */ 656 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 657 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 658 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 656 659 657 660 pVM->selm.s.fDisableMonitoring = true; … … 774 777 if (PGMGetGuestMode(pVCpu) != PGMMODE_REAL) 775 778 { 776 VM _FF_SET(pVM, VM_FF_SELM_SYNC_GDT);777 VM _FF_SET(pVM, VM_FF_SELM_SYNC_LDT);778 VM _FF_SET(pVM, VM_FF_SELM_SYNC_TSS);779 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 780 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 781 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 779 782 SELMR3UpdateFromCPUM(pVM, pVCpu); 780 783 } … … 783 786 * Flag everything for resync on next raw mode entry. 784 787 */ 785 VM _FF_SET(pVM, VM_FF_SELM_SYNC_GDT);786 VM _FF_SET(pVM, VM_FF_SELM_SYNC_LDT);787 VM _FF_SET(pVM, VM_FF_SELM_SYNC_TSS);788 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 789 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 790 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 788 791 789 792 return VINF_SUCCESS; … … 804 807 if (pVM->selm.s.fDisableMonitoring) 805 808 { 806 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT);807 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT);808 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);809 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 810 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 811 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 809 812 810 813 return VINF_SUCCESS; … … 816 819 * GDT sync 817 820 */ 818 if (VM _FF_ISSET(pVM, VM_FF_SELM_SYNC_GDT))821 if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_GDT)) 819 822 { 820 823 /* 821 824 * Always assume the best 822 825 */ 823 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_GDT);826 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT); 824 827 825 828 /* If the GDT was changed, then make sure the LDT is checked too */ 826 829 /** @todo only do this if the actual ldtr selector was changed; this is a bit excessive */ 827 VM _FF_SET(pVM, VM_FF_SELM_SYNC_LDT);830 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 828 831 /* Same goes for the TSS selector */ 829 VM _FF_SET(pVM, VM_FF_SELM_SYNC_TSS);832 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 830 833 831 834 /* … … 1074 1077 * TSS sync 1075 1078 */ 1076 if (VM _FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS))1079 if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS)) 1077 1080 { 1078 1081 SELMR3SyncTSS(pVM, pVCpu); … … 1082 1085 * LDT sync 1083 1086 */ 1084 if (VM _FF_ISSET(pVM, VM_FF_SELM_SYNC_LDT))1087 if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_LDT)) 1085 1088 { 1086 1089 /* 1087 1090 * Always assume the best 1088 1091 */ 1089 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_LDT);1092 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_LDT); 1090 1093 1091 1094 /* … … 1368 1371 Assert(enmAccessType == PGMACCESSTYPE_WRITE); 1369 1372 Log(("selmR3GuestGDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf)); 1370 VM_FF_SET(pVM, VM_FF_SELM_SYNC_GDT); 1371 1373 1374 VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_GDT); 1372 1375 return VINF_PGM_HANDLER_DO_DEFAULT; 1373 1376 } … … 1394 1397 Assert(enmAccessType == PGMACCESSTYPE_WRITE); 1395 1398 Log(("selmR3GuestLDTWriteHandler: write to %RGv size %d\n", GCPtr, cbBuf)); 1396 VM _FF_SET(pVM, VM_FF_SELM_SYNC_LDT);1399 VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_LDT); 1397 1400 return VINF_PGM_HANDLER_DO_DEFAULT; 1398 1401 } … … 1425 1428 * changes while we're in REM. */ 1426 1429 1427 VM _FF_SET(pVM, VM_FF_SELM_SYNC_TSS);1430 VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_SELM_SYNC_TSS); 1428 1431 1429 1432 return VINF_PGM_HANDLER_DO_DEFAULT; … … 1449 1452 if (pVM->selm.s.fDisableMonitoring) 1450 1453 { 1451 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);1454 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 1452 1455 return VINF_SUCCESS; 1453 1456 } 1454 1457 1455 1458 STAM_PROFILE_START(&pVM->selm.s.StatTSSSync, a); 1456 Assert(VM _FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS));1459 Assert(VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS)); 1457 1460 1458 1461 /* … … 1632 1635 } 1633 1636 1634 VM _FF_CLEAR(pVM, VM_FF_SELM_SYNC_TSS);1637 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 1635 1638 1636 1639 STAM_PROFILE_STOP(&pVM->selm.s.StatTSSSync, a); … … 1789 1792 PVMCPU pVCpu = VMMGetCpu(pVM); 1790 1793 1791 if (VM _FF_ISSET(pVM, VM_FF_SELM_SYNC_TSS))1794 if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS)) 1792 1795 return true; 1793 1796
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器