Changeset 21115 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 1, 2009 12:37:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r20871 r21115 794 794 return VINF_EM_NO_MEMORY; 795 795 } 796 797 /* Check to see if we need to emulate the instruction as X86_CR0_WP has been cleared. */ 798 if ( CPUMGetGuestCPL(pVCpu, pRegFrame) == 0 799 && ((CPUMGetGuestCR0(pVCpu) & (X86_CR0_WP | X86_CR0_PG)) == X86_CR0_PG) 800 && (uErr & (X86_TRAP_PF_RW | X86_TRAP_PF_P)) == (X86_TRAP_PF_RW | X86_TRAP_PF_P)) 801 { 802 uint64_t fPageGst; 803 rc = PGMGstGetPage(pVCpu, pvFault, &fPageGst, NULL); 804 if ( RT_SUCCESS(rc) 805 && !(fPageGst & X86_PTE_RW)) 806 { 807 rc = PGMInterpretInstruction(pVM, pVCpu, pRegFrame, pvFault); 808 if (RT_SUCCESS(rc)) 809 STAM_COUNTER_INC(&pVCpu->pgm.s.StatRZTrap0eWPEmulInRZ); 810 else 811 STAM_COUNTER_INC(&pVCpu->pgm.s.StatRZTrap0eWPEmulToR3); 812 return rc; 813 } 814 AssertMsgFailed(("Unexpected r/w page %RGv flag=%x rc=%Rrc\n", pvFault, (uint32_t)fPageGst, rc)); 815 } 816 796 817 /// @todo count the above case; else 797 818 if (uErr & X86_TRAP_PF_US) … … 826 847 STAM_STATS({ pVCpu->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVCpu->pgm.s.StatRZTrap0eTime2OutOfSyncHndObs; }); 827 848 return VINF_SUCCESS; 828 }829 830 /* Check to see if we need to emulate the instruction as X86_CR0_WP has been cleared. */831 if ( CPUMGetGuestCPL(pVCpu, pRegFrame) == 0832 && ((CPUMGetGuestCR0(pVCpu) & (X86_CR0_WP | X86_CR0_PG)) == X86_CR0_PG)833 && (uErr & (X86_TRAP_PF_RW | X86_TRAP_PF_P)) == (X86_TRAP_PF_RW | X86_TRAP_PF_P))834 {835 uint64_t fPageGst;836 rc = PGMGstGetPage(pVCpu, pvFault, &fPageGst, NULL);837 if ( RT_SUCCESS(rc)838 && !(fPageGst & X86_PTE_RW))839 {840 rc = PGMInterpretInstruction(pVM, pVCpu, pRegFrame, pvFault);841 if (RT_SUCCESS(rc))842 STAM_COUNTER_INC(&pVCpu->pgm.s.StatRZTrap0eWPEmulInRZ);843 else844 STAM_COUNTER_INC(&pVCpu->pgm.s.StatRZTrap0eWPEmulToR3);845 return rc;846 }847 AssertMsgFailed(("Unexpected r/w page %RGv flag=%x rc=%Rrc\n", pvFault, (uint32_t)fPageGst, rc));848 849 } 849 850 }
Note:
See TracChangeset
for help on using the changeset viewer.