Changeset 87539 in vbox
- Timestamp:
- Feb 2, 2021 3:10:58 PM (4 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r87538 r87539 102 102 * enabled and disabled each time it's used to execute guest code. */ 103 103 static bool g_fHmGlobalInit; 104 104 /** Host kernel flags that HM might need to know (SUPKERNELFEATURES_XXX). */ 105 uint32_t g_fHmHostKernelFeatures; 105 106 /** Maximum allowed ASID/VPID (inclusive). 106 107 * @todo r=bird: This is exclusive for VT-x according to source code comment. … … 610 611 g_fHmSvmSupported = false; 611 612 g_uHmMaxAsid = 0; 613 614 /* 615 * Get host kernel features that HM might need to know in order 616 * to co-operate and function properly with the host OS (e.g. SMAP). 617 */ 618 g_fHmHostKernelFeatures = SUPR0GetKernelFeatures(); 612 619 613 620 /* … … 1235 1242 AssertReturn(!pVCpu->hmr0.s.uCurrentAsid, VERR_HM_IPE_3); 1236 1243 } 1237 1238 /*1239 * Get host kernel features that HM might need to know in order1240 * to co-operate and function properly with the host OS (e.g. SMAP).1241 *1242 * Technically, we could do this as part of the pre-init VM procedure1243 * but it shouldn't be done later than this point so we do it here.1244 */1245 pVM->hmr0.s.fHostKernelFeatures = SUPR0GetKernelFeatures();1246 1244 1247 1245 /* -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87531 r87539 4802 4802 4803 4803 /* If the host has made GDT read-only, we would need to temporarily toggle CR0.WP before writing the GDT. */ 4804 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 4805 if (pVM->hmr0.s.fHostKernelFeatures & SUPKERNELFEATURES_GDT_READ_ONLY) 4804 if (g_fHmHostKernelFeatures & SUPKERNELFEATURES_GDT_READ_ONLY) 4806 4805 fRestoreHostFlags |= VMX_RESTORE_HOST_GDT_READ_ONLY; 4807 if ( pVM->hmr0.s.fHostKernelFeatures & SUPKERNELFEATURES_GDT_NEED_WRITABLE)4806 if (g_fHmHostKernelFeatures & SUPKERNELFEATURES_GDT_NEED_WRITABLE) 4808 4807 { 4809 4808 /* The GDT is read-only but the writable GDT is available. */ -
trunk/src/VBox/VMM/include/HMInternal.h
r87538 r87539 637 637 /** Set if we can support 64-bit guests or not. */ 638 638 bool fAllow64BitGuests; 639 bool afAlignment0[2 +4];639 bool afAlignment0[2]; 640 640 641 641 /** The maximum number of resumes loops allowed in ring-0 (safety precaution). 642 642 * This number is set much higher when RTThreadPreemptIsPending is reliable. */ 643 643 uint32_t cMaxResumeLoops; 644 645 /** Host kernel flags that HM might need to know (SUPKERNELFEATURES_XXX). */646 uint32_t fHostKernelFeatures;647 644 648 645 /** VT-x specific data. */ … … 1442 1439 #ifdef IN_RING0 1443 1440 extern bool g_fHmVmxSupported; 1441 extern uint32_t g_fHmHostKernelFeatures; 1444 1442 extern uint32_t g_uHmMaxAsid; 1445 1443 extern bool g_fHmVmxUsePreemptTimer;
Note:
See TracChangeset
for help on using the changeset viewer.