Changeset 94012 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 1, 2022 8:52:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r93922 r94012 2401 2401 #endif /* PGM_SHW_TYPE != PGM_TYPE_NONE */ 2402 2402 #if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && PGM_SHW_TYPE != PGM_TYPE_NONE 2403 2404 /**2405 * CheckPageFault helper for returning a page fault indicating a non-present2406 * (NP) entry in the page translation structures.2407 *2408 * @returns VINF_EM_RAW_GUEST_TRAP.2409 * @param pVCpu The cross context virtual CPU structure.2410 * @param uErr The error code of the shadow fault. Corrections to2411 * TRPM's copy will be made if necessary.2412 * @param GCPtrPage For logging.2413 * @param uPageFaultLevel For logging.2414 */2415 DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnNP)(PVMCPUCC pVCpu, uint32_t uErr, RTGCPTR GCPtrPage, unsigned uPageFaultLevel)2416 {2417 STAM_COUNTER_INC(&pVCpu->pgm.s.Stats.CTX_MID_Z(Stat,DirtyTrackRealPF));2418 AssertMsg(!(uErr & X86_TRAP_PF_P), ("%#x\n", uErr));2419 AssertMsg(!(uErr & X86_TRAP_PF_RSVD), ("%#x\n", uErr));2420 if (uErr & (X86_TRAP_PF_RSVD | X86_TRAP_PF_P))2421 TRPMSetErrorCode(pVCpu, uErr & ~(X86_TRAP_PF_RSVD | X86_TRAP_PF_P));2422 2423 Log(("CheckPageFault: real page fault (notp) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));2424 RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);2425 return VINF_EM_RAW_GUEST_TRAP;2426 }2427 2428 2429 /**2430 * CheckPageFault helper for returning a page fault indicating a reserved bit2431 * (RSVD) error in the page translation structures.2432 *2433 * @returns VINF_EM_RAW_GUEST_TRAP.2434 * @param pVCpu The cross context virtual CPU structure.2435 * @param uErr The error code of the shadow fault. Corrections to2436 * TRPM's copy will be made if necessary.2437 * @param GCPtrPage For logging.2438 * @param uPageFaultLevel For logging.2439 */2440 DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnRSVD)(PVMCPUCC pVCpu, uint32_t uErr, RTGCPTR GCPtrPage, unsigned uPageFaultLevel)2441 {2442 STAM_COUNTER_INC(&pVCpu->pgm.s.Stats.CTX_MID_Z(Stat,DirtyTrackRealPF));2443 if ((uErr & (X86_TRAP_PF_RSVD | X86_TRAP_PF_P)) != (X86_TRAP_PF_RSVD | X86_TRAP_PF_P))2444 TRPMSetErrorCode(pVCpu, uErr | X86_TRAP_PF_RSVD | X86_TRAP_PF_P);2445 2446 Log(("CheckPageFault: real page fault (rsvd) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));2447 RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);2448 return VINF_EM_RAW_GUEST_TRAP;2449 }2450 2451 2452 /**2453 * CheckPageFault helper for returning a page protection fault (P).2454 *2455 * @returns VINF_EM_RAW_GUEST_TRAP.2456 * @param pVCpu The cross context virtual CPU structure.2457 * @param uErr The error code of the shadow fault. Corrections to2458 * TRPM's copy will be made if necessary.2459 * @param GCPtrPage For logging.2460 * @param uPageFaultLevel For logging.2461 */2462 DECLINLINE(int) PGM_BTH_NAME(CheckPageFaultReturnProt)(PVMCPUCC pVCpu, uint32_t uErr, RTGCPTR GCPtrPage, unsigned uPageFaultLevel)2463 {2464 STAM_COUNTER_INC(&pVCpu->pgm.s.Stats.CTX_MID_Z(Stat,DirtyTrackRealPF));2465 AssertMsg(uErr & (X86_TRAP_PF_RW | X86_TRAP_PF_US | X86_TRAP_PF_ID), ("%#x\n", uErr));2466 if ((uErr & (X86_TRAP_PF_P | X86_TRAP_PF_RSVD)) != X86_TRAP_PF_P)2467 TRPMSetErrorCode(pVCpu, (uErr & ~X86_TRAP_PF_RSVD) | X86_TRAP_PF_P);2468 2469 Log(("CheckPageFault: real page fault (prot) at %RGv (%d)\n", GCPtrPage, uPageFaultLevel));2470 RT_NOREF_PV(GCPtrPage); RT_NOREF_PV(uPageFaultLevel);2471 return VINF_EM_RAW_GUEST_TRAP;2472 }2473 2474 2403 2475 2404 /**
Note:
See TracChangeset
for help on using the changeset viewer.