Changeset 79871 in vbox
- Timestamp:
- Jul 19, 2019 9:02:42 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r79870 r79871 83 83 #define HMVMX_READ_EXIT_INSTR_INFO RT_BIT_32(6) 84 84 #define HMVMX_READ_GUEST_LINEAR_ADDR RT_BIT_32(7) 85 #define HMVMX_READ_GUEST_PHYSICAL_ADDR RT_BIT_32(8) 85 86 86 87 /** All the VMCS fields required for processing of exception/NMI VM-exits. */ … … 214 215 /** The Guest-linear address. */ 215 216 uint64_t uGuestLinearAddr; 217 /** The Guest-physical address. */ 218 uint64_t uGuestPhysicalAddr; 216 219 217 220 /** The VM-exit interruption-information field. */ … … 1501 1504 AssertRCReturn(rc, rc); 1502 1505 pVmxTransient->fVmcsFieldsRead |= HMVMX_READ_GUEST_LINEAR_ADDR; 1506 } 1507 return VINF_SUCCESS; 1508 } 1509 1510 1511 /** 1512 * Reads the Guest-physical address from the VMCS into the VMX transient structure. 1513 * 1514 * @returns VBox status code. 1515 * @param pVCpu The cross context virtual CPU structure of the 1516 * calling EMT. (Required for the VMCS cache case.) 1517 * @param pVmxTransient The VMX-transient structure. 1518 */ 1519 DECLINLINE(int) hmR0VmxReadGuestPhysicalAddrVmcs(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient) 1520 { 1521 if (!(pVmxTransient->fVmcsFieldsRead & HMVMX_READ_GUEST_PHYSICAL_ADDR)) 1522 { 1523 int rc = VMXReadVmcs64(VMX_VMCS64_RO_GUEST_PHYS_ADDR_FULL, &pVmxTransient->uGuestPhysicalAddr); NOREF(pVCpu); 1524 AssertRCReturn(rc, rc); 1525 pVmxTransient->fVmcsFieldsRead |= HMVMX_READ_GUEST_PHYSICAL_ADDR; 1503 1526 } 1504 1527 return VINF_SUCCESS; … … 16353 16376 * Get sufficent state and update the exit history entry. 16354 16377 */ 16355 RTGCPHYS GCPhys;16356 16378 PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo; 16357 rc = VMXReadVmcs64(VMX_VMCS64_RO_GUEST_PHYS_ADDR_FULL, &GCPhys);16379 rc = hmR0VmxReadGuestPhysicalAddrVmcs(pVCpu, pVmxTransient); 16358 16380 rc |= hmR0VmxImportGuestState(pVCpu, pVmcsInfo, IEM_CPUMCTX_EXTRN_MUST_MASK); 16359 16381 AssertRCReturn(rc, rc); 16360 16382 16383 RTGCPHYS const GCPhys = pVmxTransient->uGuestPhysicalAddr; 16361 16384 PCEMEXITREC pExitRec = EMHistoryUpdateFlagsAndTypeAndPC(pVCpu, 16362 16385 EMEXIT_MAKE_FT(EMEXIT_F_KIND_EM | EMEXIT_F_HM, EMEXITTYPE_MMIO), … … 16440 16463 } 16441 16464 16442 RTGCPHYS GCPhys;16443 16465 PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo; 16444 rc = VMXReadVmcs64(VMX_VMCS64_RO_GUEST_PHYS_ADDR_FULL, &GCPhys);16466 rc = hmR0VmxReadGuestPhysicalAddrVmcs(pVCpu, pVmxTransient); 16445 16467 rc |= hmR0VmxImportGuestState(pVCpu, pVmcsInfo, IEM_CPUMCTX_EXTRN_MUST_MASK); 16446 16468 AssertRCReturn(rc, rc); 16447 16469 16470 RTGCPHYS const GCPhys = pVmxTransient->uGuestPhysicalAddr; 16448 16471 uint64_t const uExitQual = pVmxTransient->uExitQual; 16449 16472 AssertMsg(((pVmxTransient->uExitQual >> 7) & 3) != 2, ("%#RX64", uExitQual));
Note:
See TracChangeset
for help on using the changeset viewer.