- Timestamp:
- Oct 29, 2018 2:30:00 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126229
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r74798 r75151 113 113 #include <VBox/vmm/mm.h> 114 114 #include <VBox/vmm/nem.h> 115 #include <VBox/vmm/iem.h> 115 116 #include <VBox/vmm/iom.h> 116 117 #include <VBox/vmm/trpm.h> … … 1556 1557 1557 1558 /** 1558 * VCPU worker for VMM SendStartupIpi.1559 * VCPU worker for VMMR3SendStartupIpi. 1559 1560 * 1560 1561 * @param pVM The cross context VM structure. … … 1568 1569 1569 1570 /* 1570 * Active, halt and shutdown states of the processor all block SIPIs. 1571 * So we can safely discard the SIPI. See Intel spec. 26.6.2 "Activity State". 1571 * In the INIT state, the target CPU is only responsive to an SIPI. 1572 * This is also true for when when the CPU is in VMX non-root mode. 1573 * 1574 * See AMD spec. 16.5 "Interprocessor Interrupts (IPI)". 1575 * See Intel spec. 26.6.2 "Activity State". 1572 1576 */ 1573 1577 if (EMGetState(pVCpu) != EMSTATE_WAIT_SIPI) 1574 return V ERR_ACCESS_DENIED;1578 return VINF_SUCCESS; 1575 1579 1576 1580 1577 1581 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1582 if (CPUMIsGuestInVmxRootMode(pCtx)) 1583 { 1584 /* If the CPU is in VMX non-root mode we must cause a VM-exit. */ 1585 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 1586 return IEMExecVmxVmexitStartupIpi(pVCpu, uVector); 1587 1588 /* If the CPU is in VMX root mode (and not in VMX non-root mode) SIPIs are blocked. */ 1589 return VINF_SUCCESS; 1590 } 1578 1591 1579 1592 pCtx->cs.Sel = uVector << 8; … … 1597 1610 1598 1611 1612 /** 1613 * VCPU worker for VMMR3SendInitIpi. 1614 * 1615 * @returns VBox status code. 1616 * @param pVM The cross context VM structure. 1617 * @param idCpu Virtual CPU to perform SIPI on. 1618 */ 1599 1619 static DECLCALLBACK(int) vmmR3SendInitIpi(PVM pVM, VMCPUID idCpu) 1600 1620 { … … 1603 1623 1604 1624 Log(("vmmR3SendInitIpi for VCPU %d\n", idCpu)); 1625 1626 /** @todo r=ramshankar: We should probably block INIT signal when the CPU is in 1627 * wait-for-SIPI state. Verify. */ 1628 1629 /* If the CPU is in VMX non-root mode, INIT signals cause VM-exits. */ 1630 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1631 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 1632 return IEMExecVmxVmexitInitIpi(pVCpu); 1605 1633 1606 1634 /** @todo Figure out how to handle a nested-guest intercepts here for INIT
Note:
See TracChangeset
for help on using the changeset viewer.