VirtualBox

Changeset 54763 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Mar 15, 2015 3:15:58 AM (10 years ago)
Author:
vboxsync
Message:

PATM,CPUM: Redid the CPUID stuff by calling a patch helper function implemented by CPUM. This eliminates needing to expose CPUM guts to in patches that gets saved. Also reimplemented the lookup as a binary search (for the leaf, not sub-leaf).

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpum.h

    r54738 r54763  
    12801280
    12811281# if defined(VBOX_WITH_RAW_MODE) || defined(DOXYGEN_RUNNING)
    1282 /** @name APIs for the CPUID raw-mode patch.
     1282/** @name APIs for the CPUID raw-mode patch (legacy).
    12831283 * @{ */
    12841284VMMR3_INT_DECL(RCPTRTYPE(PCCPUMCPUID))     CPUMR3GetGuestCpuIdPatmDefRCPtr(PVM pVM);
    1285 VMMR3_INT_DECL(RCPTRTYPE(PCCPUMCPUIDLEAF)) CPUMR3GetGuestCpuIdPatmArrayRCPtr(PVM pVM);
    1286 VMMR3_INT_DECL(RCPTRTYPE(PCCPUMCPUIDLEAF)) CPUMR3GetGuestCpuIdPatmArrayEndRCPtr(PVM pVM);
    1287 VMMR3_INT_DECL(CPUMUNKNOWNCPUID)            CPUMR3GetGuestCpuIdPatmUnknownLeafMethod(PVM pVM);
    1288 /* Legacy: */
    12891285VMMR3_INT_DECL(uint32_t)                   CPUMR3GetGuestCpuIdPatmStdMax(PVM pVM);
    12901286VMMR3_INT_DECL(uint32_t)                   CPUMR3GetGuestCpuIdPatmExtMax(PVM pVM);
  • trunk/include/VBox/vmm/patm.h

    r53615 r54763  
    141141#define PATMIsEnabled(a_pVM)    ((a_pVM)->fPATMEnabled)
    142142
    143 VMMDECL(bool)           PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR pAddr);
     143VMMDECL(bool)           PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR uGCAddr);
     144VMMDECL(bool)           PATMIsPatchGCAddrExclHelpers(PVM pVM, RTRCUINTPTR uGCAddr);
    144145VMM_INT_DECL(int)       PATMReadPatchCode(PVM pVM, RTGCPTR GCPtrPatchCode, void *pvDst, size_t cbToRead, size_t *pcbRead);
    145146
     
    182183VMMR3_INT_DECL(int)             PATMR3Init(PVM pVM);
    183184VMMR3_INT_DECL(int)             PATMR3InitFinalize(PVM pVM);
    184 VMMR3_INT_DECL(void)            PATMR3Relocate(PVM pVM);
     185VMMR3_INT_DECL(void)            PATMR3Relocate(PVM pVM, RTRCINTPTR offDelta);
    185186VMMR3_INT_DECL(int)             PATMR3Term(PVM pVM);
    186187VMMR3_INT_DECL(int)             PATMR3Reset(PVM pVM);
    187188
    188 VMMR3_INT_DECL(void *)          PATMR3QueryPatchMemHC(PVM pVM, uint32_t *pcb);
    189 VMMR3_INT_DECL(RTRCPTR)         PATMR3QueryPatchMemGC(PVM pVM, uint32_t *pcb);
    190189VMMR3_INT_DECL(bool)            PATMR3IsInsidePatchJump(PVM pVM, RTRCPTR pAddr, PRTGCPTR32 pPatchAddr);
    191190VMMR3_INT_DECL(RTRCPTR)         PATMR3QueryPatchGCPtr(PVM pVM, RTRCPTR pAddrGC);
    192 VMMR3_INT_DECL(bool)            PATMR3IsPatchHCAddr(PVM pVM, void *pAddrHC);
    193191VMMR3_INT_DECL(void *)          PATMR3GCPtrToHCPtr(PVM pVM, RTRCPTR pAddrGC);
    194192VMMR3_INT_DECL(PPATMGCSTATE)    PATMR3QueryGCStateHC(PVM pVM);
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