VirtualBox

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/VMMR3/GIMKvm.cpp

    r55037 r55118  
    3030
    3131#include <VBox/vmm/cpum.h>
     32#include <VBox/disopcode.h>
    3233#include <VBox/vmm/ssm.h>
    3334#include <VBox/vmm/vm.h>
     
    141142    }
    142143
     144    /*
     145     * Setup #UD and hypercall behaviour.
     146     */
     147    VMMHypercallsEnable(pVM);
     148    if (ASMIsAmdCpu())
     149    {
     150        pKvm->fTrapXcptUD   = true;
     151        pKvm->uOpCodeNative = OP_VMMCALL;
     152    }
     153    else
     154    {
     155        Assert(ASMIsIntelCpu() || ASMIsViaCentaurCpu());
     156        pKvm->fTrapXcptUD   = false;
     157        pKvm->uOpCodeNative = OP_VMCALL;
     158    }
     159    /* We always need to trap VMCALL/VMMCALL hypercall using #UDs for raw-mode VMs. */
     160    if (!HMIsEnabled(pVM))
     161        pKvm->fTrapXcptUD = true;
     162
    143163    return VINF_SUCCESS;
    144164}
     
    368388     * time = ((tsc * SysTime.u32TscScale) >> 32) + SysTime.u64NanoTS
    369389     */
    370     uint64_t u64TscFreq = TMCpuTicksPerSecond(pVM);
    371     SystemTime.i8TscShift  = 0;
     390    uint64_t u64TscFreq   = TMCpuTicksPerSecond(pVM);
     391    SystemTime.i8TscShift = 0;
    372392    while (u64TscFreq > 2 * RT_NS_1SEC_64)
    373393    {
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