VirtualBox

Changeset 31141 in vbox


Ignore:
Timestamp:
Jul 27, 2010 1:39:34 PM (14 years ago)
Author:
vboxsync
Message:

PGM: If we get to the end of Trap0eHandler it doesn't mean it is a guest fault, but that RT_FAILURE(rc). ASSUMING this always means that it is time for a guru meditation.

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r31140 r31141  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    18551855        PGM_REG_COUNTER(&pCpuStats->StatRZTrap0eSNXE,                  "/PGM/CPU%u/RZ/Trap0e/Err/Supervisor/NXE",      "Number of supervisor mode NXE page faults.");
    18561856        PGM_REG_COUNTER(&pCpuStats->StatRZTrap0eGuestPF,               "/PGM/CPU%u/RZ/Trap0e/GuestPF",                 "Number of real guest page faults.");
    1857         PGM_REG_COUNTER(&pCpuStats->StatRZTrap0eGuestPFUnh,            "/PGM/CPU%u/RZ/Trap0e/GuestPF/Unhandled",       "Number of real guest page faults from the 'unhandled' case.");
    18581857        PGM_REG_COUNTER(&pCpuStats->StatRZTrap0eGuestPFMapping,        "/PGM/CPU%u/RZ/Trap0e/GuestPF/InMapping",       "Number of real guest page faults in a mapping.");
    18591858        PGM_REG_COUNTER(&pCpuStats->StatRZTrap0eWPEmulInRZ,            "/PGM/CPU%u/RZ/Trap0e/WP/InRZ",                 "Number of guest page faults due to X86_CR0_WP emulation.");
  • trunk/src/VBox/VMM/PGMBth.h

    r31140 r31141  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/VMM/PGMInternal.h

    r31140 r31141  
    31653165    STAMCOUNTER StatRZTrap0eSNXE;                   /**< RC/R0: \#PF err kind */
    31663166    STAMCOUNTER StatRZTrap0eGuestPF;                /**< RC/R0: Real guest \#PFs. */
    3167     STAMCOUNTER StatRZTrap0eGuestPFUnh;             /**< RC/R0: Real guest \#PF ending up at the end of the \#PF code. */
    31683167    STAMCOUNTER StatRZTrap0eGuestPFMapping;         /**< RC/R0: Real guest \#PF to HMA or other mapping. */
    31693168    STAMCOUNTER StatRZTrap0eWPEmulInRZ;             /**< RC/R0: WP=0 virtualization trap, handled. */
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r31140 r31141  
    10081008    }
    10091009
    1010     /** @todo This point is only ever reached when something goes awry.  The
    1011      *        conclusion here is wrong, it is not a guest trap!  Will fix in
    1012      *        a bit... */
    1013 
    1014 #  if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)
    1015     /*
    1016      * Conclusion, this is a guest trap.
    1017      */
    1018     LogFlow(("PGM: Unhandled #PF -> route trap to recompiler!\n"));
    1019     STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eGuestPFUnh);
    1020     return VINF_EM_RAW_GUEST_TRAP;
    1021 #  else
    1022     /* present, but not a monitored page; perhaps the guest is probing physical memory */
    1023     return VINF_EM_RAW_EMULATE_INSTR;
    1024 #  endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */
    1025 
    1026 
    1027 # else /* PGM_GST_TYPE != PGM_TYPE_32BIT */
    1028 
     1010
     1011    /*
     1012     * If we get here it is because something failed above, i.e. most like guru
     1013     * meditiation time.
     1014     */
     1015    LogRel(("%s: returns rc=%Rrc pvFault=%RGv uErr=%RX64 cs:rip=%04x:%08RX64\n",
     1016            __PRETTY_FUNCTION__, rc, pvFault, (uint64_t)uErr, pRegFrame->cs, pRegFrame->rip));
     1017    return rc;
     1018
     1019# else  /* Nested paging, EPT except PGM_GST_TYPE = PROT   */
    10291020    AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE));
    10301021    return VERR_INTERNAL_ERROR;
    1031 # endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */
     1022# endif
    10321023}
    10331024#endif /* !IN_RING3 */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette