Changeset 80020 in vbox
- Timestamp:
- Jul 26, 2019 6:49:57 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r79995 r80020 350 350 /** The name of the ring-0 context VMM Core module. */ 351 351 #define VMMR0_MAIN_MODULE_NAME "VMMR0.r0" 352 353 /**354 * Wrapper macro for avoiding too much \#ifdef VBOX_WITH_RAW_MODE.355 */356 #ifdef VBOX_WITH_RAW_MODE357 # define VM_WHEN_RAW_MODE(a_WithExpr, a_WithoutExpr) a_WithExpr358 #else359 # define VM_WHEN_RAW_MODE(a_WithExpr, a_WithoutExpr) a_WithoutExpr360 #endif361 352 362 353 … … 506 497 /** The bit number for VMCPU_FF_TLB_FLUSH. */ 507 498 #define VMCPU_FF_TLB_FLUSH_BIT 19 508 #ifdef VBOX_WITH_RAW_MODE 509 /** Check the interrupt and trap gates */ 510 # define VMCPU_FF_TRPM_SYNC_IDT RT_BIT_64(VMCPU_FF_TRPM_SYNC_IDT_BIT) 511 # define VMCPU_FF_TRPM_SYNC_IDT_BIT 20 512 /** Check Guest's TSS ring 0 stack */ 513 # define VMCPU_FF_SELM_SYNC_TSS RT_BIT_64(VMCPU_FF_SELM_SYNC_TSS_BIT) 514 # define VMCPU_FF_SELM_SYNC_TSS_BIT 21 515 /** Check Guest's GDT table */ 516 # define VMCPU_FF_SELM_SYNC_GDT RT_BIT_64(VMCPU_FF_SELM_SYNC_GDT_BIT) 517 # define VMCPU_FF_SELM_SYNC_GDT_BIT 22 518 /** Check Guest's LDT table */ 519 # define VMCPU_FF_SELM_SYNC_LDT RT_BIT_64(VMCPU_FF_SELM_SYNC_LDT_BIT) 520 # define VMCPU_FF_SELM_SYNC_LDT_BIT 23 521 #endif /* VBOX_WITH_RAW_MODE */ 499 /* 20 used to be VMCPU_FF_TRPM_SYNC_IDT (raw-mode only). */ 500 /* 21 used to be VMCPU_FF_SELM_SYNC_TSS (raw-mode only). */ 501 /* 22 used to be VMCPU_FF_SELM_SYNC_GDT (raw-mode only). */ 502 /* 23 used to be VMCPU_FF_SELM_SYNC_LDT (raw-mode only). */ 522 503 /** Inhibit interrupts pending. See EMGetInhibitInterruptsPC(). */ 523 504 #define VMCPU_FF_INHIBIT_INTERRUPTS RT_BIT_64(VMCPU_FF_INHIBIT_INTERRUPTS_BIT) … … 526 507 #define VMCPU_FF_BLOCK_NMIS RT_BIT_64(VMCPU_FF_BLOCK_NMIS_BIT) 527 508 #define VMCPU_FF_BLOCK_NMIS_BIT 25 528 #ifdef VBOX_WITH_RAW_MODE529 /** CSAM needs to scan the page that's being executed */530 # define VMCPU_FF_CSAM_SCAN_PAGE RT_BIT_64(VMCPU_FF_CSAM_SCAN_PAGE_BIT)531 # define VMCPU_FF_CSAM_SCAN_PAGE_BIT 26532 /** CSAM needs to do some homework. */533 # define VMCPU_FF_CSAM_PENDING_ACTION RT_BIT_64(VMCPU_FF_CSAM_PENDING_ACTION_BIT)534 # define VMCPU_FF_CSAM_PENDING_ACTION_BIT 27535 #endif /* VBOX_WITH_RAW_MODE */536 509 /** Force return to Ring-3. */ 537 510 #define VMCPU_FF_TO_R3 RT_BIT_64(VMCPU_FF_TO_R3_BIT) … … 543 516 #define VMCPU_FF_IOM RT_BIT_64(VMCPU_FF_IOM_BIT) 544 517 #define VMCPU_FF_IOM_BIT 29 545 #ifdef VBOX_WITH_RAW_MODE 546 /** CPUM need to adjust CR0.TS/EM before executing raw-mode code again. */ 547 # define VMCPU_FF_CPUM RT_BIT_64(VMCPU_FF_CPUM_BIT) 548 /** The bit number for VMCPU_FF_CPUM. */ 549 # define VMCPU_FF_CPUM_BIT 30 550 #endif /* VBOX_WITH_RAW_MODE */ 518 /* 30 used to be VMCPU_FF_CPUM */ 551 519 /** VMX-preemption timer in effect. */ 552 520 #define VMCPU_FF_VMX_PREEMPT_TIMER RT_BIT_64(VMCPU_FF_VMX_PREEMPT_TIMER_BIT) … … 589 557 | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL \ 590 558 | VMCPU_FF_INTERRUPT_NESTED_GUEST | VMCPU_FF_VMX_MTF | VMCPU_FF_VMX_APIC_WRITE \ 591 | VMCPU_FF_VMX_PREEMPT_TIMER | VMCPU_FF_VMX_NMI_WINDOW | VMCPU_FF_VMX_INT_WINDOW \ 592 | VM_WHEN_RAW_MODE( VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \ 593 | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0 ) ) 559 | VMCPU_FF_VMX_PREEMPT_TIMER | VMCPU_FF_VMX_NMI_WINDOW | VMCPU_FF_VMX_INT_WINDOW ) 594 560 595 561 /** High priority VM pre raw-mode execution mask. */ … … 597 563 /** High priority VMCPU pre raw-mode execution mask. */ 598 564 #define VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK ( VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL \ 599 | VMCPU_FF_INHIBIT_INTERRUPTS \ 600 | VM_WHEN_RAW_MODE( VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT \ 601 | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0) ) 565 | VMCPU_FF_INHIBIT_INTERRUPTS ) 602 566 603 567 /** High priority post-execution actions. */ 604 568 #define VM_FF_HIGH_PRIORITY_POST_MASK ( VM_FF_PGM_NO_MEMORY ) 605 569 /** High priority post-execution actions. */ 606 #define VMCPU_FF_HIGH_PRIORITY_POST_MASK ( VMCPU_FF_PDM_CRITSECT | VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_PENDING_ACTION, 0)\570 #define VMCPU_FF_HIGH_PRIORITY_POST_MASK ( VMCPU_FF_PDM_CRITSECT \ 607 571 | VMCPU_FF_HM_UPDATE_CR3 | VMCPU_FF_HM_UPDATE_PAE_PDPES \ 608 572 | VMCPU_FF_IEM | VMCPU_FF_IOM ) … … 612 576 | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS) 613 577 /** Normal priority VMCPU post-execution actions. */ 614 #define VMCPU_FF_NORMAL_PRIORITY_POST_MASK ( VM _WHEN_RAW_MODE(VMCPU_FF_CSAM_SCAN_PAGE, 0) | VMCPU_FF_DBGF )578 #define VMCPU_FF_NORMAL_PRIORITY_POST_MASK ( VMCPU_FF_DBGF ) 615 579 616 580 /** Normal priority VM actions. */ … … 681 645 /** All the forced VMCPU flags except those related to raw-mode and hardware 682 646 * assisted execution. */ 683 #define VMCPU_FF_ALL_REM_MASK (~( VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_PDM_CRITSECT \ 684 | VMCPU_FF_TLB_FLUSH | VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_PENDING_ACTION, 0) )) 647 #define VMCPU_FF_ALL_REM_MASK (~(VMCPU_FF_HIGH_PRIORITY_PRE_RAW_MASK | VMCPU_FF_PDM_CRITSECT | VMCPU_FF_TLB_FLUSH)) 685 648 /** @} */ 686 649 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r80007 r80020 608 608 VMMDECL(int) CPUMSetGuestGDTR(PVMCPU pVCpu, uint64_t GCPtrBase, uint16_t cbLimit) 609 609 { 610 #ifdef VBOX_WITH_RAW_MODE_NOT_R0611 if (VM_IS_RAW_MODE_ENABLED(pVCpu->CTX_SUFF(pVM)))612 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);613 #endif614 610 pVCpu->cpum.s.Guest.gdtr.cbGdt = cbLimit; 615 611 pVCpu->cpum.s.Guest.gdtr.pGdt = GCPtrBase; … … 622 618 VMMDECL(int) CPUMSetGuestIDTR(PVMCPU pVCpu, uint64_t GCPtrBase, uint16_t cbLimit) 623 619 { 624 #ifdef VBOX_WITH_RAW_MODE_NOT_R0625 if (VM_IS_RAW_MODE_ENABLED(pVCpu->CTX_SUFF(pVM)))626 VMCPU_FF_SET(pVCpu, VMCPU_FF_TRPM_SYNC_IDT);627 #endif628 620 pVCpu->cpum.s.Guest.idtr.cbIdt = cbLimit; 629 621 pVCpu->cpum.s.Guest.idtr.pIdt = GCPtrBase; … … 636 628 VMMDECL(int) CPUMSetGuestTR(PVMCPU pVCpu, uint16_t tr) 637 629 { 638 #ifdef VBOX_WITH_RAW_MODE_NOT_R0639 if (VM_IS_RAW_MODE_ENABLED(pVCpu->CTX_SUFF(pVM)))640 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);641 #endif642 630 pVCpu->cpum.s.Guest.tr.Sel = tr; 643 631 pVCpu->cpum.s.fChanged |= CPUM_CHANGED_TR; … … 648 636 VMMDECL(int) CPUMSetGuestLDTR(PVMCPU pVCpu, uint16_t ldtr) 649 637 { 650 #ifdef VBOX_WITH_RAW_MODE_NOT_R0651 if ( ( ldtr != 0652 || pVCpu->cpum.s.Guest.ldtr.Sel != 0)653 && VM_IS_RAW_MODE_ENABLED(pVCpu->CTX_SUFF(pVM)))654 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);655 #endif656 638 pVCpu->cpum.s.Guest.ldtr.Sel = ldtr; 657 639 /* The caller will set more hidden bits if it has them. */ -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r80007 r80020 14498 14498 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL 14499 14499 | VMCPU_FF_TLB_FLUSH 14500 #ifdef VBOX_WITH_RAW_MODE14501 | VMCPU_FF_TRPM_SYNC_IDT14502 | VMCPU_FF_SELM_SYNC_TSS14503 | VMCPU_FF_SELM_SYNC_GDT14504 | VMCPU_FF_SELM_SYNC_LDT14505 #endif14506 14500 | VMCPU_FF_INHIBIT_INTERRUPTS 14507 14501 | VMCPU_FF_BLOCK_NMIS … … 14668 14662 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL 14669 14663 | VMCPU_FF_TLB_FLUSH 14670 #ifdef VBOX_WITH_RAW_MODE14671 | VMCPU_FF_TRPM_SYNC_IDT14672 | VMCPU_FF_SELM_SYNC_TSS14673 | VMCPU_FF_SELM_SYNC_GDT14674 | VMCPU_FF_SELM_SYNC_LDT14675 #endif14676 14664 | VMCPU_FF_INHIBIT_INTERRUPTS 14677 14665 | VMCPU_FF_BLOCK_NMIS -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r79074 r80020 5896 5896 /* SELM - VME may change things wrt to the TSS shadowing. */ 5897 5897 if ((uNewCrX ^ uOldCrX) & X86_CR4_VME) 5898 { 5899 Log(("iemCImpl_load_CrX: VME %d -> %d => Setting VMCPU_FF_SELM_SYNC_TSS\n", 5900 RT_BOOL(uOldCrX & X86_CR4_VME), RT_BOOL(uNewCrX & X86_CR4_VME) )); 5901 #ifdef VBOX_WITH_RAW_MODE 5902 if (VM_IS_RAW_MODE_ENABLED(pVCpu->CTX_SUFF(pVM))) 5903 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 5904 #endif 5905 } 5898 Log(("iemCImpl_load_CrX: VME %d -> %d\n", RT_BOOL(uOldCrX & X86_CR4_VME), RT_BOOL(uNewCrX & X86_CR4_VME) )); 5906 5899 5907 5900 /* PGM - flushing and mode. */ -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r80017 r80020 1241 1241 AssertCompile(VMCPU_FF_ALL_REM_MASK & VMCPU_FF_TIMER); 1242 1242 if ( VM_FF_IS_ANY_SET(pVM, VM_FF_ALL_REM_MASK) 1243 || VMCPU_FF_IS_ANY_SET(pVCpu, 1244 VMCPU_FF_ALL_REM_MASK 1245 & VM_WHEN_RAW_MODE(~(VMCPU_FF_CSAM_PENDING_ACTION | VMCPU_FF_CSAM_SCAN_PAGE), UINT32_MAX)) ) 1243 || VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_ALL_REM_MASK) ) 1246 1244 { 1247 1245 #ifdef VBOX_WITH_REM … … 1870 1868 /* check that we got them all */ 1871 1869 AssertCompile(VM_FF_NORMAL_PRIORITY_POST_MASK == (VM_FF_CHECK_VM_STATE | VM_FF_DBGF | VM_FF_RESET | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)); 1872 AssertCompile(VMCPU_FF_NORMAL_PRIORITY_POST_MASK == (VM_WHEN_RAW_MODE(VMCPU_FF_CSAM_SCAN_PAGE, 0) | VMCPU_FF_DBGF));1870 AssertCompile(VMCPU_FF_NORMAL_PRIORITY_POST_MASK == VMCPU_FF_DBGF); 1873 1871 } 1874 1872 … … 2373 2371 /* check that we got them all */ 2374 2372 AssertCompile(VM_FF_HIGH_PRIORITY_PRE_MASK == (VM_FF_TM_VIRTUAL_SYNC | VM_FF_DBGF | VM_FF_CHECK_VM_STATE | VM_FF_DEBUG_SUSPEND | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_EMT_RENDEZVOUS)); 2375 AssertCompile(VMCPU_FF_HIGH_PRIORITY_PRE_MASK == (VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_INHIBIT_INTERRUPTS | VMCPU_FF_DBGF | VMCPU_FF_INTERRUPT_NESTED_GUEST | VMCPU_FF_VMX_MTF | VMCPU_FF_VMX_APIC_WRITE | VMCPU_FF_VMX_PREEMPT_TIMER | VMCPU_FF_VMX_INT_WINDOW | VMCPU_FF_VMX_NMI_WINDOW | VM_WHEN_RAW_MODE(VMCPU_FF_SELM_SYNC_TSS | VMCPU_FF_TRPM_SYNC_IDT | VMCPU_FF_SELM_SYNC_GDT | VMCPU_FF_SELM_SYNC_LDT, 0)));2373 AssertCompile(VMCPU_FF_HIGH_PRIORITY_PRE_MASK == (VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_PIC | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL | VMCPU_FF_INHIBIT_INTERRUPTS | VMCPU_FF_DBGF | VMCPU_FF_INTERRUPT_NESTED_GUEST | VMCPU_FF_VMX_MTF | VMCPU_FF_VMX_APIC_WRITE | VMCPU_FF_VMX_PREEMPT_TIMER | VMCPU_FF_VMX_INT_WINDOW | VMCPU_FF_VMX_NMI_WINDOW)); 2376 2374 } 2377 2375 -
trunk/src/VBox/VMM/VMMRZ/CPUMRZ.cpp
r76553 r80020 49 49 { 50 50 case 0: 51 #ifdef IN_RC52 cpumRZSaveHostFPUState(&pVCpu->cpum.s);53 VMCPU_FF_SET(pVCpu, VMCPU_FF_CPUM); /* Must recalc CR0 before executing more code! */54 #else55 51 if (cpumRZSaveHostFPUState(&pVCpu->cpum.s) == VINF_CPUM_HOST_CR0_MODIFIED) 56 52 HMR0NotifyCpumModifiedHostCr0(pVCpu); 57 #endif58 53 Log6(("CPUMRZFpuStatePrepareHostCpuForUse: #0 - %#x\n", ASMGetCR0())); 59 54 break; 60 55 61 56 case CPUM_USED_FPU_HOST: 62 #ifdef IN_RC 63 VMCPU_FF_SET(pVCpu, VMCPU_FF_CPUM); /* (should be set already) */ 64 #elif defined(IN_RING0) && ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) 57 #if defined(IN_RING0) && ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) 65 58 if (pVCpu->cpum.s.fUseFlags | CPUM_SYNC_FPU_STATE) 66 59 { … … 82 75 #ifdef IN_RING0 83 76 HMR0NotifyCpumUnloadedGuestFpuState(pVCpu); 84 #else85 VMCPU_FF_SET(pVCpu, VMCPU_FF_CPUM); /* Must recalc CR0 before executing more code! */86 77 #endif 87 78 Log6(("CPUMRZFpuStatePrepareHostCpuForUse: #2 - %#x\n", ASMGetCR0())); -
trunk/src/VBox/VMM/VMMRZ/CPUMRZA.asm
r76553 r80020 35 35 ; Saves the host FPU/SSE/AVX state. 36 36 ; 37 ; Will return with CR0.EM and CR0.TS cleared! This is the normal state in 38 ; ring-0, whereas in raw-mode the caller will probably set VMCPU_FF_CPUM to 39 ; re-evaluate the situation before executing more guest code. 37 ; Will return with CR0.EM and CR0.TS cleared! This is the normal state in ring-0. 40 38 ; 41 39 ; @returns VINF_SUCCESS (0) or VINF_CPUM_HOST_CR0_MODIFIED. (EAX) -
trunk/src/recompiler/VBoxRecompiler.c
r80007 r80020 1784 1784 pCtx->cr0 = env->cr[0]; 1785 1785 pCtx->cr3 = env->cr[3]; 1786 #ifdef VBOX_WITH_RAW_MODE1787 if (((env->cr[4] ^ pCtx->cr4) & X86_CR4_VME) && VM_IS_RAW_MODE_ENABLED(pVM))1788 VMCPU_FF_SET(env->pVCpu, VMCPU_FF_SELM_SYNC_TSS);1789 #endif1790 1786 pCtx->cr4 = env->cr[4]; 1791 1787 … … 1907 1903 pCtx->cr0 = env->cr[0]; 1908 1904 pCtx->cr3 = env->cr[3]; 1909 #ifdef VBOX_WITH_RAW_MODE1910 if (((env->cr[4] ^ pCtx->cr4) & X86_CR4_VME) && VM_IS_RAW_MODE_ENABLED(pVM))1911 VMCPU_FF_SET(env->pVCpu, VMCPU_FF_SELM_SYNC_TSS);1912 #endif1913 1905 pCtx->cr4 = env->cr[4]; 1914 1906 … … 1956 1948 pCtx->cr0 = env->cr[0]; 1957 1949 pCtx->cr3 = env->cr[3]; 1958 #ifdef VBOX_WITH_RAW_MODE1959 if (((env->cr[4] ^ pCtx->cr4) & X86_CR4_VME) && VM_IS_RAW_MODE_ENABLED(pVM))1960 VMCPU_FF_SET(env->pVCpu, VMCPU_FF_SELM_SYNC_TSS);1961 #endif1962 1950 pCtx->cr4 = env->cr[4]; 1963 1951 #ifdef TARGET_X86_64 … … 2661 2649 pCtx->cr2 = pVM->rem.s.Env.cr[2]; 2662 2650 pCtx->cr3 = pVM->rem.s.Env.cr[3]; 2663 #ifdef VBOX_WITH_RAW_MODE2664 if (((pVM->rem.s.Env.cr[4] ^ pCtx->cr4) & X86_CR4_VME) && VM_IS_RAW_MODE_ENABLED(pVM))2665 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);2666 #endif2667 2651 pCtx->cr4 = pVM->rem.s.Env.cr[4]; 2668 2652 … … 2675 2659 pCtx->gdtr.pGdt = pVM->rem.s.Env.gdt.base; 2676 2660 STAM_COUNTER_INC(&gStatREMGDTChange); 2677 #ifdef VBOX_WITH_RAW_MODE2678 if (VM_IS_RAW_MODE_ENABLED(pVM))2679 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);2680 #endif2681 2661 } 2682 2662 … … 2686 2666 pCtx->idtr.pIdt = pVM->rem.s.Env.idt.base; 2687 2667 STAM_COUNTER_INC(&gStatREMIDTChange); 2688 #ifdef VBOX_WITH_RAW_MODE2689 if (VM_IS_RAW_MODE_ENABLED(pVM))2690 VMCPU_FF_SET(pVCpu, VMCPU_FF_TRPM_SYNC_IDT);2691 #endif2692 2668 } 2693 2669 … … 2707 2683 pCtx->ldtr.Attr.u = (pVM->rem.s.Env.ldt.flags >> SEL_FLAGS_SHIFT) & SEL_FLAGS_SMASK; 2708 2684 STAM_COUNTER_INC(&gStatREMLDTRChange); 2709 #ifdef VBOX_WITH_RAW_MODE2710 if (VM_IS_RAW_MODE_ENABLED(pVM))2711 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);2712 #endif2713 2685 } 2714 2686 … … 2733 2705 Assert(pCtx->tr.Attr.u & ~DESC_INTEL_UNUSABLE); 2734 2706 STAM_COUNTER_INC(&gStatREMTRChange); 2735 #ifdef VBOX_WITH_RAW_MODE2736 if (VM_IS_RAW_MODE_ENABLED(pVM))2737 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);2738 #endif2739 2707 } 2740 2708 … … 2912 2880 pCtx->cr2 = pVM->rem.s.Env.cr[2]; 2913 2881 pCtx->cr3 = pVM->rem.s.Env.cr[3]; 2914 #ifdef VBOX_WITH_RAW_MODE2915 if (((pVM->rem.s.Env.cr[4] ^ pCtx->cr4) & X86_CR4_VME) && VM_IS_RAW_MODE_ENABLED(pVM))2916 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);2917 #endif2918 2882 pCtx->cr4 = pVM->rem.s.Env.cr[4]; 2919 2883 … … 2926 2890 pCtx->gdtr.pGdt = (RTGCPTR)pVM->rem.s.Env.gdt.base; 2927 2891 STAM_COUNTER_INC(&gStatREMGDTChange); 2928 #ifdef VBOX_WITH_RAW_MODE2929 if (VM_IS_RAW_MODE_ENABLED(pVM))2930 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_GDT);2931 #endif2932 2892 } 2933 2893 … … 2937 2897 pCtx->idtr.pIdt = (RTGCPTR)pVM->rem.s.Env.idt.base; 2938 2898 STAM_COUNTER_INC(&gStatREMIDTChange); 2939 #ifdef VBOX_WITH_RAW_MODE2940 if (VM_IS_RAW_MODE_ENABLED(pVM))2941 VMCPU_FF_SET(pVCpu, VMCPU_FF_TRPM_SYNC_IDT);2942 #endif2943 2899 } 2944 2900 … … 2958 2914 pCtx->ldtr.Attr.u = (pVM->rem.s.Env.ldt.flags >> SEL_FLAGS_SHIFT) & SEL_FLAGS_SMASK; 2959 2915 STAM_COUNTER_INC(&gStatREMLDTRChange); 2960 #ifdef VBOX_WITH_RAW_MODE2961 if (VM_IS_RAW_MODE_ENABLED(pVM))2962 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_LDT);2963 #endif2964 2916 } 2965 2917 … … 2984 2936 Assert(pCtx->tr.Attr.u & ~DESC_INTEL_UNUSABLE); 2985 2937 STAM_COUNTER_INC(&gStatREMTRChange); 2986 #ifdef VBOX_WITH_RAW_MODE2987 if (VM_IS_RAW_MODE_ENABLED(pVM))2988 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);2989 #endif2990 2938 } 2991 2939
Note:
See TracChangeset
for help on using the changeset viewer.