VirtualBox

Changeset 72253 in vbox


Ignore:
Timestamp:
May 17, 2018 6:33:58 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122700
Message:

NEM: Handle HvMessageTypeUnrecoverableException. bugref:9044

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/nt/hyperv.h

    r72213 r72253  
    14701470        uint64_t                            Payload[HV_MESSAGE_MAX_PAYLOAD_QWORD_COUNT];
    14711471
    1472         /** Common header for X64 intercept messages. */
     1472        /** Common header for X64 intercept messages.
     1473         * The HvMessageTypeUnrecoverableException message only has this.  */
    14731474        HV_X64_INTERCEPT_MESSAGE_HEADER     X64InterceptHeader;
    14741475        /** HvMessageTypeGpaIntercept, HvMessageTypeUnmappedGpa. */
  • trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h

    r72229 r72253  
    14111411 * @param   pVCpu           The cross context per CPU structure.
    14121412 * @param   pMsg            The message.
     1413 * @param   pCtx            The register context.
    14131414 * @param   pGVCpu          The global (ring-0) per CPU structure (NULL in r3).
    14141415 */
     
    15341535 * @param   pVCpu           The cross context per CPU structure.
    15351536 * @param   pMsg            The message.
     1537 * @param   pCtx            The register context.
    15361538 * @param   pGVCpu          The global (ring-0) per CPU structure (NULL in r3).
    15371539 */
     
    15591561    RT_NOREF(pVM, pGVCpu);
    15601562    return VINF_SUCCESS;
     1563}
     1564
     1565
     1566/**
     1567 * Deals with unrecoverable exception (triple fault).
     1568 *
     1569 * @returns Strict VBox status code.
     1570 * @param   pVCpu           The cross context per CPU structure.
     1571 * @param   pMsgHdr         The message header.
     1572 * @param   pCtx            The register context.
     1573 */
     1574NEM_TMPL_STATIC VBOXSTRICTRC nemHCWinHandleMessageUnrecoverableException(PVMCPU pVCpu,
     1575                                                                         HV_X64_INTERCEPT_MESSAGE_HEADER const *pMsgHdr,
     1576                                                                         PCPUMCTX pCtx)
     1577{
     1578    /*
     1579     * Assert message sanity.
     1580     */
     1581    //Assert(   pMsgHdr->InterceptAccessType == HV_INTERCEPT_ACCESS_EXECUTE
     1582    //       || pMsgHdr->InterceptAccessType == HV_INTERCEPT_ACCESS_READ   // READ & WRITE are probably not used here
     1583    //       || pMsgHdr->InterceptAccessType == HV_INTERCEPT_ACCESS_WRITE);
     1584    AssertMsg(pMsgHdr->InstructionLength < 0x10, ("%#x\n", pMsgHdr->InstructionLength));
     1585
     1586    /*
     1587     * Just copy the state we've got and handle it in the loop for now.
     1588     */
     1589    nemHCWinCopyStateFromX64Header(pVCpu, pCtx, pMsgHdr);
     1590    Log(("TripleExit/%u: %04x:%08RX64: RFL=%#RX64 -> VINF_EM_TRIPLE_FAULT\n",
     1591         pVCpu->idCpu, pMsgHdr->CsSegment.Selector, pMsgHdr->Rip, pMsgHdr->Rflags));
     1592    return VINF_EM_TRIPLE_FAULT;
    15611593}
    15621594
     
    16061638                return nemHCWinHandleMessageInterruptWindow(pVM, pVCpu, &pMsg->X64InterruptWindow, pCtx, pGVCpu);
    16071639
     1640            case HvMessageTypeUnrecoverableException:
     1641                Assert(pMsg->Header.PayloadSize == sizeof(pMsg->X64InterceptHeader));
     1642                return nemHCWinHandleMessageUnrecoverableException(pVCpu, &pMsg->X64InterceptHeader, pCtx);
     1643
    16081644            case HvMessageTypeInvalidVpRegisterValue:
    1609             case HvMessageTypeUnrecoverableException:
    16101645            case HvMessageTypeUnsupportedFeature:
    16111646            case HvMessageTypeTlbPageSizeMismatch:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette