Changeset 104516 in vbox for trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
- Timestamp:
- May 4, 2024 1:53:42 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r104512 r104516 7634 7634 static uint32_t const s_aIOOpAnd[8] = { 0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0 }; /* AND masks for saving 7635 7635 the result (in AL/AX/EAX). */ 7636 PVMCC 7636 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 7637 7637 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 7638 7638 PSVMVMCB pVmcb = hmR0SvmGetCurrentVmcb(pVCpu); … … 7752 7752 else 7753 7753 { 7754 uint32_t u32Val = 0; 7755 rcStrict = IOMIOPortRead(pVM, pVCpu, IoExitInfo.n.u16Port, &u32Val, cbValue); 7756 if (IOM_SUCCESS(rcStrict)) 7754 rcStrict = VERR_GCM_NOT_HANDLED; 7755 if (GCMIsInterceptingIOPortRead(pVCpu, IoExitInfo.n.u16Port, cbValue)) 7757 7756 { 7758 /* Save result of I/O IN instr. in AL/AX/EAX. */ 7759 /** @todo r=bird: 32-bit op size should clear high bits of rax! */ 7760 pCtx->eax = (pCtx->eax & ~uAndVal) | (u32Val & uAndVal); 7757 rcStrict = GCMInterceptedIOPortRead(pVCpu, pCtx, IoExitInfo.n.u16Port, cbValue); 7758 if (rcStrict == VINF_GCM_HANDLED_ADVANCE_RIP || rcStrict == VINF_GCM_HANDLED) 7759 { 7760 fUpdateRipAlready = rcStrict != VINF_GCM_HANDLED_ADVANCE_RIP; 7761 rcStrict = VINF_SUCCESS; 7762 } 7763 else 7764 Assert(rcStrict == VERR_GCM_NOT_HANDLED); 7761 7765 } 7762 else if ( rcStrict == VINF_IOM_R3_IOPORT_READ 7763 && !pCtx->eflags.Bits.u1TF) 7764 rcStrict = EMRZSetPendingIoPortRead(pVCpu, IoExitInfo.n.u16Port, cbInstr, cbValue); 7766 7767 if (RT_LIKELY(rcStrict == VERR_GCM_NOT_HANDLED)) 7768 { 7769 uint32_t u32Val = 0; 7770 rcStrict = IOMIOPortRead(pVM, pVCpu, IoExitInfo.n.u16Port, &u32Val, cbValue); 7771 if (IOM_SUCCESS(rcStrict)) 7772 { 7773 /* Save result of I/O IN instr. in AL/AX/EAX. */ 7774 /** @todo r=bird: 32-bit op size should clear high bits of rax! */ 7775 pCtx->eax = (pCtx->eax & ~uAndVal) | (u32Val & uAndVal); 7776 } 7777 else if ( rcStrict == VINF_IOM_R3_IOPORT_READ 7778 && !pCtx->eflags.Bits.u1TF) 7779 rcStrict = EMRZSetPendingIoPortRead(pVCpu, IoExitInfo.n.u16Port, cbInstr, cbValue); 7780 } 7765 7781 7766 7782 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIORead);
Note:
See TracChangeset
for help on using the changeset viewer.