Changeset 75611 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
- Timestamp:
- Nov 20, 2018 11:20:25 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r75565 r75611 2729 2729 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 2730 2730 bool const fHostInLongMode = RT_BOOL(pVmcs->u32ExitCtls & VMX_EXIT_CTLS_HOST_ADDR_SPACE_SIZE); 2731 bool const fVirtApicAccess = RT_BOOL(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS);2732 2731 2733 2732 /* We cannot return from a long-mode guest to a host that is not in long mode. */ … … 2757 2756 2758 2757 /* De-register the handler for the APIC-access page. */ 2759 if (fVirtApicAccess) 2760 { 2758 if (pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS) 2759 { 2760 PVM pVM = pVCpu->CTX_SUFF(pVM); 2761 2761 RTGCPHYS const GCPhysApicAccess = pVmcs->u64AddrApicAccess.u; 2762 int rc = CPUMVmxApicAccessPageDeregister(pVCpu, GCPhysApicAccess); 2763 if (RT_FAILURE(rc)) 2764 return rc; 2762 if (PGMHandlerPhysicalIsRegistered(pVM, GCPhysApicAccess)) 2763 { 2764 /** @todo NSTVMX: This is broken! We cannot simply deregister the handler for the 2765 * physical address as other VCPUs executing other nested-VCPUs might have 2766 * it registered! */ 2767 int rc = PGMHandlerPhysicalDeregister(pVM, GCPhysApicAccess); 2768 if (RT_FAILURE(rc)) 2769 return rc; 2770 } 2765 2771 } 2766 2772 … … 3044 3050 Assert(pbIoBitmapA); 3045 3051 Assert(pbIoBitmapB); 3046 return CPUMVmxGetIoBitmapPermission(pbIoBitmapA, pbIoBitmapB, u16Port, cbAccess);3052 return HMVmxGetIoBitmapPermission(pbIoBitmapA, pbIoBitmapB, u16Port, cbAccess); 3047 3053 } 3048 3054 … … 6334 6340 6335 6341 /* Register the handler for the APIC-access page. */ 6336 int rc = CPUMVmxApicAccessPageRegister(pVCpu, GCPhysApicAccess); 6342 int rc = PGMHandlerPhysicalRegister(pVCpu->CTX_SUFF(pVM), GCPhysApicAccess, GCPhysApicAccess, 6343 pVCpu->iem.s.hVmxApicAccessPage, NIL_RTR3PTR /* pvUserR3 */, 6344 NIL_RTR0PTR /* pvUserR0 */, NIL_RTRCPTR /* pvUserRC */, NULL /* pszDesc */); 6337 6345 if (RT_FAILURE(rc)) 6338 6346 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_AddrApicAccessHandlerReg); … … 7057 7065 { 7058 7066 VMXMSREXITREAD enmRead; 7059 int rc = CPUMVmxGetMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), idMsr, &enmRead,7067 int rc = HMVmxGetMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), idMsr, &enmRead, 7060 7068 NULL /* penmWrite */); 7061 7069 AssertRC(rc); … … 7066 7074 { 7067 7075 VMXMSREXITWRITE enmWrite; 7068 int rc = CPUMVmxGetMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), idMsr, NULL /* penmRead */,7076 int rc = HMVmxGetMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), idMsr, NULL /* penmRead */, 7069 7077 &enmWrite); 7070 7078 AssertRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.