Changeset 51517 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 4, 2014 4:52:30 AM (11 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r48728 r51517 2477 2477 * the VM, in which case we'll drop the base memory pages. Presently we will 2478 2478 * make no attempt to preserve anything that happens to be present in the base 2479 * memory that is replaced, this is of course incorrect lybut it's too much2479 * memory that is replaced, this is of course incorrect but it's too much 2480 2480 * effort. 2481 2481 * … … 2747 2747 * @param pVM Pointer to the VM. 2748 2748 * @param pDevIns The device instance owning the region. 2749 * @param iRegion The index of the registered region. 2750 * @param GCPhys The guest-physical address to be remapped. 2749 2751 */ 2750 2752 VMMR3DECL(int) PGMR3PhysMMIO2Map(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys) -
trunk/src/VBox/VMM/VMMR3/STAM.cpp
r48235 r51517 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1655 1655 if (!fGVMMMatched) 1656 1656 { 1657 /** @todo match cpu leaves some rainy day. 1657 /** @todo match cpu leaves some rainy day. */ 1658 1658 } 1659 1659 … … 2663 2663 if (!fUpdate) 2664 2664 { 2665 /** @todo check the cpu leaves - rainy day. 2665 /** @todo check the cpu leaves - rainy day. */ 2666 2666 } 2667 2667 if (fUpdate) -
trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
r45618 r51517 5 5 6 6 /* 7 * Copyright (C) 2008-201 2Oracle Corporation7 * Copyright (C) 2008-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 54 54 # define PGMR0DYNMAP_PAGES_PER_CPU 256 55 55 /** The minimum number of pages we reserve per CPU. 56 * This must be equal or larger than the autoset size. 56 * This must be equal or larger than the autoset size. */ 57 57 # define PGMR0DYNMAP_PAGES_PER_CPU_MIN 64 58 58 /** Calcs the overload threshold (safety margin). Current set at 50%. */ 59 59 # define PGMR0DYNMAP_CALC_OVERLOAD(cPages) ((cPages) / 2) 60 60 /** The number of guard pages. 61 * @remarks Never do tuning of the hashing or whatnot with a strict build! 61 * @remarks Never do tuning of the hashing or whatnot with a strict build! */ 62 62 # if defined(VBOX_STRICT) 63 63 # define PGMR0DYNMAP_GUARD_PAGES 1 … … 73 73 /** Define this to just clear the present bit on guard pages. 74 74 * The alternative is to replace the entire PTE with an bad not-present 75 * PTE. Either way, XNU will screw us. :-/ 75 * PTE. Either way, XNU will screw us. :-/ */ 76 76 # define PGMR0DYNMAP_GUARD_NP 77 77 #endif … … 200 200 /** The physical address of the currently mapped page. 201 201 * This is duplicate for three reasons: cache locality, cache policy of the PT 202 * mappings and sanity checks. 202 * mappings and sanity checks. */ 203 203 RTHCPHYS HCPhys; 204 204 /** Pointer to the page. */ … … 220 220 } PGMR0DYNMAPENTRY; 221 221 /** Pointer a mapping cache entry for the ring-0. 222 * @sa PPGMRZDYNMAPENTRY, PPGMRCDYNMAPENTRY, 222 * @sa PPGMRZDYNMAPENTRY, PPGMRCDYNMAPENTRY, */ 223 223 typedef PGMR0DYNMAPENTRY *PPGMR0DYNMAPENTRY; 224 224 … … 240 240 /** Spinlock serializing the normal operation of the cache. */ 241 241 RTSPINLOCK hSpinlock; 242 /** Array for tracking and managing the pages. 242 /** Array for tracking and managing the pages. */ 243 243 PPGMR0DYNMAPENTRY paPages; 244 244 /** The cache size given as a number of pages. */ … … 298 298 299 299 /** Mapping cache entry for the current context. 300 * @sa PGMR0DYNMAPENTRY, PGMRCDYNMAPENTRY 300 * @sa PGMR0DYNMAPENTRY, PGMRCDYNMAPENTRY */ 301 301 typedef CTX_MID(PGM,DYNMAPENTRY) PGMRZDYNMAPENTRY; 302 302 /** Pointer a mapping cache entry for the current context. 303 * @sa PGMR0DYNMAPENTRY, PGMRCDYNMAPENTRY 303 * @sa PGMR0DYNMAPENTRY, PGMRCDYNMAPENTRY */ 304 304 typedef PGMRZDYNMAPENTRY *PPGMRZDYNMAPENTRY; 305 305 306 306 /** Pointer to the mapping cache instance for the current context. 307 * @sa PGMR0DYNMAP, PGMRCDYNMAP 307 * @sa PGMR0DYNMAP, PGMRCDYNMAP */ 308 308 typedef CTX_MID(PGM,DYNMAP) *PPGMRZDYNMAP; 309 309 -
trunk/src/VBox/VMM/include/CPUMInternal.h
r51301 r51517 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 97 97 #define CPUM_SYNC_DEBUG_REGS_GUEST RT_BIT(17) 98 98 /** Sync the debug state on next entry (32->64 switcher only). 99 * Almost the same as CPUM_USE_DEBUG_REGS_HYPER in the raw-mode switchers. 99 * Almost the same as CPUM_USE_DEBUG_REGS_HYPER in the raw-mode switchers. */ 100 100 #define CPUM_SYNC_DEBUG_REGS_HYPER RT_BIT(18) 101 101 /** Host CPU requires fxsave/fxrstor leaky bit handling. */ … … 129 129 /** The maximum physical address with of the CPU. */ 130 130 uint8_t cMaxPhysAddrWidth; 131 /** Alignment padding. 131 /** Alignment padding. */ 132 132 uint8_t abPadding[3]; 133 133 134 /** Supports MSRs. 134 /** Supports MSRs. */ 135 135 uint32_t fMsr : 1; 136 136 /** Supports the page size extension (4/2 MB pages). */ … … 139 139 * 4GB). */ 140 140 uint32_t fPse36 : 1; 141 /** Supports physical address extension (PAE). 141 /** Supports physical address extension (PAE). */ 142 142 uint32_t fPae : 1; 143 143 /** Page attribute table (PAT) support (page level cache control). */ … … 156 156 uint32_t fMonitorMWait : 1; 157 157 158 /** AMD64: Supports long mode. 158 /** AMD64: Supports long mode. */ 159 159 uint32_t fLongMode : 1; 160 160 /** AMD64: SYSCALL/SYSRET support. */ … … 169 169 /** Indicates that FPU instruction and data pointers may leak. 170 170 * This generally applies to recent AMD CPUs, where the FPU IP and DP pointer 171 * is only saved and restored if an exception is pending. 171 * is only saved and restored if an exception is pending. */ 172 172 uint32_t fLeakyFxSR : 1; 173 173 174 /** Alignment padding. 174 /** Alignment padding. */ 175 175 uint32_t fPadding : 9; 176 176 … … 200 200 * Set to cCpuIdLeaves if none present. */ 201 201 uint32_t iFirstExtCpuIdLeaf; 202 /** Alignment padding. 202 /** Alignment padding. */ 203 203 uint32_t uPadding; 204 204 /** How to handle unknown CPUID leaves. */ … … 438 438 } CR4; 439 439 440 /** The (more) portable CPUID level. 440 /** The (more) portable CPUID level. */ 441 441 uint8_t u8PortableCpuIdLevel; 442 442 /** Indicates that a state restore is pending. -
trunk/src/VBox/VMM/include/PGMInternal.h
r47786 r51517 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 494 494 #endif 495 495 496 /** Pointer to a shadow PAE PTE. 496 /** Pointer to a shadow PAE PTE. */ 497 497 typedef PGMSHWPTEPAE *PPGMSHWPTEPAE; 498 /** Pointer to a const shadow PAE PTE. 498 /** Pointer to a const shadow PAE PTE. */ 499 499 typedef PGMSHWPTEPAE const *PCPGMSHWPTEPAE; 500 500 501 /** Pointer to a shadow PAE page table. 501 /** Pointer to a shadow PAE page table. */ 502 502 typedef PGMSHWPTPAE *PPGMSHWPTPAE; 503 /** Pointer to a const shadow PAE page table. 503 /** Pointer to a const shadow PAE page table. */ 504 504 typedef PGMSHWPTPAE const *PCPGMSHWPTPAE; 505 /** @} 505 /** @} */ 506 506 507 507 … … 674 674 STAMPROFILE Stat; 675 675 #endif 676 /** Array of cached physical addresses for the monitored ranged. 676 /** Array of cached physical addresses for the monitored ranged. */ 677 677 PGMPHYS2VIRTHANDLER aPhysToVirt[HC_ARCH_BITS == 32 ? 1 : 2]; 678 678 } PGMVIRTHANDLER; … … 1321 1321 1322 1322 #if 0 1323 /** Enables sanity checking of write monitoring using CRC-32. 1323 /** Enables sanity checking of write monitoring using CRC-32. */ 1324 1324 # define PGMLIVESAVERAMPAGE_WITH_CRC32 1325 1325 #endif … … 1347 1347 /** Whether the page is/was write monitored earlier in this pass. */ 1348 1348 uint32_t fWriteMonitoredJustNow : 1; 1349 /** Bits reserved for future use. 1349 /** Bits reserved for future use. */ 1350 1350 uint32_t u2Reserved : 2; 1351 1351 #ifdef PGMLIVESAVERAMPAGE_WITH_CRC32 1352 /** CRC-32 for the page. This is for internal consistency checks. 1352 /** CRC-32 for the page. This is for internal consistency checks. */ 1353 1353 uint32_t u32Crc; 1354 1354 #endif … … 1571 1571 /** CRC-32 for the first half of the page. 1572 1572 * This is used together with u32CrcH2 to quickly detect changes in the page 1573 * during the non-final passes. 1573 * during the non-final passes. */ 1574 1574 uint32_t u32CrcH1; 1575 1575 /** CRC-32 for the second half of the page. */ … … 1634 1634 /** Makes a MMIO2 page ID out of a MMIO2 range ID and page index number. */ 1635 1635 #define PGM_MMIO2_PAGEID_MAKE(a_idMmio2, a_iPage) ( ((uint32_t)(a_idMmio2) << 24) | (uint32_t)(a_iPage) ) 1636 /** Gets the MMIO2 range ID from an MMIO2 page ID. 1636 /** Gets the MMIO2 range ID from an MMIO2 page ID. */ 1637 1637 #define PGM_MMIO2_PAGEID_GET_MMIO2_ID(a_idPage) ( (uint8_t)((a_idPage) >> 24) ) 1638 /** Gets the MMIO2 page index from an MMIO2 page ID. 1638 /** Gets the MMIO2 page index from an MMIO2 page ID. */ 1639 1639 #define PGM_MMIO2_PAGEID_GET_IDX(a_idPage) ( ((a_idPage) & UINT32_C(0x00ffffff)) ) 1640 1640 /** @} */ … … 1817 1817 /** The physical address of the currently mapped page. 1818 1818 * This is duplicate for three reasons: cache locality, cache policy of the PT 1819 * mappings and sanity checks. 1819 * mappings and sanity checks. */ 1820 1820 RTHCPHYS HCPhys; 1821 1821 /** Pointer to the page. */ … … 1851 1851 /** The usual magic number / eye catcher (PGMRZDYNMAP_MAGIC). */ 1852 1852 uint32_t u32Magic; 1853 /** Array for tracking and managing the pages. 1853 /** Array for tracking and managing the pages. */ 1854 1854 RCPTRTYPE(PPGMRCDYNMAPENTRY) paPages; 1855 1855 /** The cache size given as a number of pages. */ … … 1897 1897 * The max is UINT16_MAX - 1. */ 1898 1898 uint16_t cInlinedRefs; 1899 /** Unreferences. 1899 /** Unreferences. */ 1900 1900 uint16_t cUnrefs; 1901 1901 … … 2071 2071 PGMPOOLKIND_FREE, 2072 2072 2073 /** Shw: 32-bit page table; Gst: no paging 2073 /** Shw: 32-bit page table; Gst: no paging. */ 2074 2074 PGMPOOLKIND_32BIT_PT_FOR_PHYS, 2075 /** Shw: 32-bit page table; Gst: 32-bit page table. 2075 /** Shw: 32-bit page table; Gst: 32-bit page table. */ 2076 2076 PGMPOOLKIND_32BIT_PT_FOR_32BIT_PT, 2077 /** Shw: 32-bit page table; Gst: 4MB page. 2077 /** Shw: 32-bit page table; Gst: 4MB page. */ 2078 2078 PGMPOOLKIND_32BIT_PT_FOR_32BIT_4MB, 2079 /** Shw: PAE page table; Gst: no paging 2079 /** Shw: PAE page table; Gst: no paging. */ 2080 2080 PGMPOOLKIND_PAE_PT_FOR_PHYS, 2081 2081 /** Shw: PAE page table; Gst: 32-bit page table. */ 2082 2082 PGMPOOLKIND_PAE_PT_FOR_32BIT_PT, 2083 /** Shw: PAE page table; Gst: Half of a 4MB page. 2083 /** Shw: PAE page table; Gst: Half of a 4MB page. */ 2084 2084 PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB, 2085 2085 /** Shw: PAE page table; Gst: PAE page table. */ 2086 2086 PGMPOOLKIND_PAE_PT_FOR_PAE_PT, 2087 /** Shw: PAE page table; Gst: 2MB page. 2087 /** Shw: PAE page table; Gst: 2MB page. */ 2088 2088 PGMPOOLKIND_PAE_PT_FOR_PAE_2MB, 2089 2089 … … 2114 2114 /** Shw: 64-bit page directory pointer table; Gst: 64-bit page directory pointer table. */ 2115 2115 PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT, 2116 /** Shw: 64-bit page directory pointer table; Gst: no paging 2116 /** Shw: 64-bit page directory pointer table; Gst: no paging. */ 2117 2117 PGMPOOLKIND_64BIT_PDPT_FOR_PHYS, 2118 2118 /** Shw: 64-bit page directory table; Gst: 64-bit page directory table. */ 2119 2119 PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD, 2120 /** Shw: 64-bit page directory table; Gst: no paging 2120 /** Shw: 64-bit page directory table; Gst: no paging. */ 2121 2121 PGMPOOLKIND_64BIT_PD_FOR_PHYS, /* 24 */ 2122 2122 … … 2124 2124 PGMPOOLKIND_64BIT_PML4, 2125 2125 2126 /** Shw: EPT page directory pointer table; Gst: no paging 2126 /** Shw: EPT page directory pointer table; Gst: no paging. */ 2127 2127 PGMPOOLKIND_EPT_PDPT_FOR_PHYS, 2128 /** Shw: EPT page directory table; Gst: no paging 2128 /** Shw: EPT page directory table; Gst: no paging. */ 2129 2129 PGMPOOLKIND_EPT_PD_FOR_PHYS, 2130 /** Shw: EPT page table; Gst: no paging 2130 /** Shw: EPT page table; Gst: no paging. */ 2131 2131 PGMPOOLKIND_EPT_PT_FOR_PHYS, 2132 2132 … … 2231 2231 RTGCPTR GCPtrLastAccessHandlerFault; 2232 2232 uint64_t cLastAccessHandler; 2233 /** @} 2233 /** @} */ 2234 2234 /** Used to indicate that this page can't be flushed. Important for cr3 root pages or shadow pae pd pages. */ 2235 2235 uint32_t volatile cLocked; … … 2270 2270 /** The VM handle - RC Ptr. */ 2271 2271 PVMRC pVMRC; 2272 /** The max pool size. This includes the special IDs. 2272 /** The max pool size. This includes the special IDs. */ 2273 2273 uint16_t cMaxPages; 2274 2274 /** The current pool size. */ … … 2640 2640 2641 2641 /** The guest physical address that is the result of the walk. 2642 * @remarks only valid if fSucceeded is set. 2642 * @remarks only valid if fSucceeded is set. */ 2643 2643 RTGCPHYS GCPhys; 2644 2644 … … 3116 3116 bool fPhysWriteMonitoringEngaged; 3117 3117 /** Set if the CPU has less than 52-bit physical address width. 3118 * This is used 3118 * This is used */ 3119 3119 bool fLessThan52PhysicalAddressBits; 3120 3120 /** Set when nested paging is active. … … 3160 3160 RTGCPHYS GCPhys4MBPSEMask; 3161 3161 /** Mask containing the invalid bits of a guest physical address. 3162 * @remarks this does not stop at bit 52. 3162 * @remarks this does not stop at bit 52. */ 3163 3163 RTGCPHYS GCPhysInvAddrMask; 3164 3164 … … 3190 3190 R3PTRTYPE(PPGMMODEDATA) paModeData; 3191 3191 RTR3PTR R3PtrAlignment0; 3192 /** MMIO2 lookup array for ring-3. Indexed by idMmio2 minus 1. 3192 /** MMIO2 lookup array for ring-3. Indexed by idMmio2 minus 1. */ 3193 3193 R3PTRTYPE(PPGMMMIO2RANGE) apMmio2RangesR3[PGM_MMIO2_MAX_RANGES]; 3194 3194 … … 3211 3211 R0PTRTYPE(PPGMROMRANGE) pRomRangesR0; 3212 3212 RTR0PTR R0PtrAlignment0; 3213 /** MMIO2 lookup array for ring-3. Indexed by idMmio2 minus 1. 3213 /** MMIO2 lookup array for ring-3. Indexed by idMmio2 minus 1. */ 3214 3214 R0PTRTYPE(PPGMMMIO2RANGE) apMmio2RangesR0[PGM_MMIO2_MAX_RANGES]; 3215 3215 … … 3279 3279 /** The address of the raw-mode context mapping cache. */ 3280 3280 RCPTRTYPE(PPGMRCDYNMAP) pRCDynMap; 3281 /** The address of the ring-0 mapping cache if we're making use of it. 3281 /** The address of the ring-0 mapping cache if we're making use of it. */ 3282 3282 RTR0PTR pvR0DynMapUsed; 3283 3283 … … 3286 3286 uint32_t cDeprecatedPageLocks; 3287 3287 #if HC_ARCH_BITS == 64 3288 /** Alignment padding. 3288 /** Alignment padding. */ 3289 3289 uint32_t u32Alignment2; 3290 3290 #endif … … 3394 3394 struct 3395 3395 { 3396 /** The number of ready pages. 3396 /** The number of ready pages. */ 3397 3397 uint32_t cReadyPages; 3398 3398 /** The number of dirty pages. */ 3399 3399 uint32_t cDirtyPages; 3400 /** The number of ready zero pages. 3400 /** The number of ready zero pages. */ 3401 3401 uint32_t cZeroPages; 3402 3402 /** The number of write monitored pages. */ … … 3407 3407 /** The number of ignored pages in the RAM ranges (i.e. MMIO, MMIO2 and ROM). */ 3408 3408 uint32_t cIgnoredPages; 3409 /** Indicates that a live save operation is active. 3409 /** Indicates that a live save operation is active. */ 3410 3410 bool fActive; 3411 3411 /** Padding. */ … … 3422 3422 * link speed so we can decide when we're done. It is reset after the first 3423 3423 * 7 passes so the speed estimate doesn't get inflated by the initial set of 3424 * zero pages. 3424 * zero pages. */ 3425 3425 uint64_t cSavedPages; 3426 3426 /** The nanosecond timestamp when cSavedPages was 0. */ … … 3476 3476 RCPTRTYPE(PGMSTATS *) pStatsRC; 3477 3477 RTRCPTR RCPtrAlignment; 3478 /** @} 3478 /** @} */ 3479 3479 #endif 3480 3480 } PGM; … … 3841 3841 /** Mask containing the big page PDE bits that we shadow in the PTE. */ 3842 3842 uint64_t fGst64ShadowedBigPde4PteMask; 3843 /** @} 3843 /** @} */ 3844 3844 3845 3845 /** Pointer to the page of the current active CR3 - R3 Ptr. */ … … 3943 3943 /** @} */ 3944 3944 3945 #ifdef VBOX_WITH_STATISTICS /** @todo move this chunk to the heap. 3945 #ifdef VBOX_WITH_STATISTICS /** @todo move this chunk to the heap. */ 3946 3946 /** @name Statistics 3947 3947 * @{ */ … … 3958 3958 /** Alignment padding. */ 3959 3959 RTR3PTR pPaddingR3; 3960 /** @} 3960 /** @} */ 3961 3961 #endif /* VBOX_WITH_STATISTICS */ 3962 3962 } PGMCPU;
Note:
See TracChangeset
for help on using the changeset viewer.