Changeset 80170 in vbox
- Timestamp:
- Aug 7, 2019 4:59:59 AM (5 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp
r80161 r80170 1327 1327 pVCpu->hm.s.vmx.fSwitchedNstGstFlushTlb = true; 1328 1328 1329 /** @todo Handle releasing of the page-mapping lock later. */ 1330 #if 0 1329 1331 if (pVCpu->hm.s.vmx.fVirtApicPageLocked) 1330 1332 { … … 1332 1334 pVCpu->hm.s.vmx.fVirtApicPageLocked = false; 1333 1335 } 1336 #endif 1334 1337 } 1335 1338 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r80151 r80170 10013 10013 10014 10014 /** @todo NSTVMX: This is not really correct but currently is required to make 10015 * things work. We need to re- registerthe page handler when we fallback to10015 * things work. We need to re-enable the page handler when we fallback to 10016 10016 * IEM execution of the nested-guest! */ 10017 PGMHandlerPhysical Deregister(pVM, GCPhysApicAccess);10018 10019 void *pvPage;10020 PGMPAGEMAPLOCK Pg MapLockApicAccess;10021 int rc = PGMPhysGCPhys2CCPtr(pVM, GCPhysApicAccess, &pvPage, &Pg MapLockApicAccess);10017 PGMHandlerPhysicalPageTempOff(pVM, GCPhysApicAccess, GCPhysApicAccess); 10018 10019 void *pvPage; 10020 PGMPAGEMAPLOCK PgLockApicAccess; 10021 int rc = PGMPhysGCPhys2CCPtr(pVM, GCPhysApicAccess, &pvPage, &PgLockApicAccess); 10022 10022 if (RT_SUCCESS(rc)) 10023 10023 { … … 10025 10025 AssertMsgRCReturn(rc, ("Failed to get host-physical address for APIC-access page at %#RGp\n", GCPhysApicAccess), rc); 10026 10026 10027 /* 10028 * We can release the page lock here because the APIC-access page is never read or 10029 * written to but merely serves as a placeholder in the shadow/nested page tables 10030 * to cause VM-exits or re-direct the access to the virtual-APIC page. 10031 */ 10032 PGMPhysReleasePageMappingLock(pVCpu->CTX_SUFF(pVM), &PgMapLockApicAccess); 10027 /** @todo Handle proper releasing of page-mapping lock later. */ 10028 PGMPhysReleasePageMappingLock(pVCpu->CTX_SUFF(pVM), &PgLockApicAccess); 10033 10029 } 10034 10030 else … … 10047 10043 { 10048 10044 Assert(pVM->hm.s.vmx.Msrs.ProcCtls.n.allowed1 & VMX_PROC_CTLS_USE_TPR_SHADOW); 10049 10050 void *pvPage;10051 10045 RTGCPHYS const GCPhysVirtApic = pVmcsNstGst->u64AddrVirtApic.u; 10052 int rc = PGMPhysGCPhys2CCPtr(pVM, GCPhysVirtApic, &pvPage, &pVCpu->hm.s.vmx.PgMapLockVirtApic); 10053 AssertMsgRCReturn(rc, ("Failed to get current-context pointer for virtual-APIC page at %#RGp\n", GCPhysVirtApic), rc); 10054 10055 rc = PGMPhysGCPhys2HCPhys(pVM, GCPhysVirtApic, &HCPhysVirtApic); 10056 AssertMsgRCReturn(rc, ("Failed to get host-physical address for virtual-APIC page at %#RGp\n", GCPhysVirtApic), rc); 10057 pVCpu->hm.s.vmx.fVirtApicPageLocked = true; 10046 10047 void *pvPage; 10048 PGMPAGEMAPLOCK PgLockVirtApic; 10049 int rc = PGMPhysGCPhys2CCPtr(pVM, GCPhysVirtApic, &pvPage, &PgLockVirtApic); 10050 if (RT_SUCCESS(rc)) 10051 { 10052 rc = PGMPhysGCPhys2HCPhys(pVM, GCPhysVirtApic, &HCPhysVirtApic); 10053 AssertMsgRCReturn(rc, ("Failed to get host-physical address for virtual-APIC page at %#RGp\n", GCPhysVirtApic), rc); 10054 10055 /** @todo Handle proper releasing of page-mapping lock later. */ 10056 PGMPhysReleasePageMappingLock(pVCpu->CTX_SUFF(pVM), &PgLockVirtApic); 10057 } 10058 else 10059 return rc; 10058 10060 10059 10061 u32TprThreshold = pVmcsNstGst->u32TprThreshold; … … 16725 16727 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, &pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_APIC_ACCESS)); 16726 16728 16729 Log4Func(("at offset %#x type=%u\n", VMX_EXIT_QUAL_APIC_ACCESS_OFFSET(pVmxTransient->uExitQual), 16730 VMX_EXIT_QUAL_APIC_ACCESS_TYPE(pVmxTransient->uExitQual))); 16731 16727 16732 VMXVEXITINFO ExitInfo; 16728 16733 RT_ZERO(ExitInfo); -
trunk/src/VBox/VMM/include/HMInternal.h
r80152 r80170 912 912 * nested-geust. */ 913 913 bool fSwitchedNstGstFlushTlb; 914 915 bool fVirtApicPageLocked;916 914 /** Alignment. */ 917 bool afAlignment0[ 3];915 bool afAlignment0[4]; 918 916 /** Cached guest APIC-base MSR for identifying when to map the APIC-access page. */ 919 917 uint64_t u64GstMsrApicBase; 920 PGMPAGEMAPLOCK PgMapLockVirtApic;921 918 /** @} */ 922 919
Note:
See TracChangeset
for help on using the changeset viewer.