Changeset 72469 in vbox for trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp
- Timestamp:
- Jun 7, 2018 11:35:23 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122954
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp
r72462 r72469 1381 1381 1382 1382 /** 1383 * Checks the currently disassembled instruction and executes the hypercall if 1384 * it's a hypercall instruction. 1383 * Checks the instruction and executes the hypercall if it's a valid hypercall 1384 * instruction. 1385 * 1386 * This interface is used by \#UD handlers and IEM. 1385 1387 * 1386 1388 * @returns Strict VBox status code. 1387 1389 * @param pVCpu The cross context virtual CPU structure. 1388 1390 * @param pCtx Pointer to the guest-CPU context. 1389 * @param pDis Pointer to the disassembled instruction state at RIP. 1391 * @param uDisOpcode The disassembler opcode. 1392 * @param cbInstr The instruction length. 1390 1393 * 1391 1394 * @thread EMT(pVCpu). 1392 * 1393 * @todo Make this function static when @bugref{7270#c168} is addressed. 1394 */ 1395 VMM_INT_DECL(VBOXSTRICTRC) gimHvExecHypercallInstr(PVMCPU pVCpu, PCPUMCTX pCtx, PDISCPUSTATE pDis) 1395 */ 1396 VMM_INT_DECL(VBOXSTRICTRC) gimHvHypercallEx(PVMCPU pVCpu, PCPUMCTX pCtx, unsigned uDisOpcode, uint8_t cbInstr) 1396 1397 { 1397 1398 Assert(pVCpu); 1398 1399 Assert(pCtx); 1399 Assert(pDis);1400 1400 VMCPU_ASSERT_EMT(pVCpu); 1401 1401 1402 1402 PVM pVM = pVCpu->CTX_SUFF(pVM); 1403 CPUMCPUVENDOR const enmGuestCpuVendor = CPUMGetGuestCpuVendor(pVM);1404 if ( ( pDis->pCurInstr->uOpcode == OP_VMCALL1403 CPUMCPUVENDOR const enmGuestCpuVendor = (CPUMCPUVENDOR)pVM->cpum.ro.GuestFeatures.enmCpuVendor; 1404 if ( ( uDisOpcode == OP_VMCALL 1405 1405 && ( enmGuestCpuVendor == CPUMCPUVENDOR_INTEL 1406 1406 || enmGuestCpuVendor == CPUMCPUVENDOR_VIA)) 1407 || ( pDis->pCurInstr->uOpcode == OP_VMMCALL1407 || ( uDisOpcode == OP_VMMCALL 1408 1408 && enmGuestCpuVendor == CPUMCPUVENDOR_AMD)) 1409 {1410 1409 return gimHvHypercall(pVCpu, pCtx); 1411 } 1412 1410 1411 RT_NOREF_PV(cbInstr); 1413 1412 return VERR_GIM_INVALID_HYPERCALL_INSTR; 1414 1413 } … … 1460 1459 if (pcbInstr) 1461 1460 *pcbInstr = (uint8_t)cbInstr; 1462 return gimHv ExecHypercallInstr(pVCpu, pCtx, &Dis);1461 return gimHvHypercallEx(pVCpu, pCtx, Dis.pCurInstr->uOpcode, Dis.cbInstr); 1463 1462 } 1464 1463 … … 1467 1466 } 1468 1467 1469 return gimHv ExecHypercallInstr(pVCpu, pCtx, pDis);1468 return gimHvHypercallEx(pVCpu, pCtx, pDis->pCurInstr->uOpcode, pDis->cbInstr); 1470 1469 } 1471 1470
Note:
See TracChangeset
for help on using the changeset viewer.