VirtualBox

Changeset 55118 in vbox for trunk/src/VBox/VMM/VMMRC


Ignore:
Timestamp:
Apr 7, 2015 3:21:45 PM (10 years ago)
Author:
vboxsync
Message:

VMM: GIM raw-mode support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp

    r55001 r55118  
    2727#include <VBox/vmm/dbgf.h>
    2828#include <VBox/vmm/em.h>
     29#include <VBox/vmm/gim.h>
    2930#include <VBox/vmm/csam.h>
    3031#include <VBox/vmm/patm.h>
     
    595596#ifdef DTRACE_EXPERIMENT /** @todo fix/remove/permanent-enable this when DIS/PATM handles invalid lock sequences. */
    596597            Assert(!PATMIsPatchGCAddr(pVM, pRegFrame->eip));
    597             rc = TRPMForwardTrap(pVCpu, pRegFrame, 0x6, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_TRAP, 0x6);
     598            rc = TRPMForwardTrap(pVCpu, pRegFrame, X86_XCPT_UD, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_TRAP, X86_XCPT_UD);
    598599            Assert(rc == VINF_EM_RAW_GUEST_TRAP);
    599600#else
     
    609610            rc = EMInterpretInstructionDisasState(pVCpu, &Cpu, pRegFrame, PC, EMCODETYPE_SUPERVISOR);
    610611        }
     612        else if (GIMShouldTrapXcptUD(pVM))
     613        {
     614            LogFlow(("TRPMGCTrap06Handler: -> GIMXcptUD\n"));
     615            rc = GIMXcptUD(pVCpu, CPUMCTX_FROM_CORE(pRegFrame), &Cpu);
     616            if (RT_FAILURE(rc))
     617            {
     618                LogFlow(("TRPMGCTrap06Handler: -> GIMXcptUD -> VINF_EM_RAW_EMULATE_INSTR\n"));
     619                rc = VINF_EM_RAW_EMULATE_INSTR;
     620            }
     621        }
    611622        /* Never generate a raw trap here; it might be an instruction, that requires emulation. */
    612623        else
     
    619630    {
    620631        LogFlow(("TRPMGCTrap06Handler: -> TRPMForwardTrap\n"));
    621         rc = TRPMForwardTrap(pVCpu, pRegFrame, 0x6, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_TRAP, 0x6);
     632        rc = TRPMForwardTrap(pVCpu, pRegFrame, X86_XCPT_UD, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_TRAP, X86_XCPT_UD);
    622633        Assert(rc == VINF_EM_RAW_GUEST_TRAP);
    623634    }
Note: See TracChangeset for help on using the changeset viewer.

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