VirtualBox

Ignore:
Timestamp:
Apr 8, 2015 11:31:47 AM (10 years ago)
Author:
vboxsync
Message:

VMM/GIM: Allow dynamic enabling of #UD traps and per-VCPU hypercalls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMAll.cpp

    r55118 r55129  
    510510 * Notifies HM that paravirtualized hypercalls are now enabled.
    511511 *
    512  * @param   pVM     Pointer to the VM.
    513  */
    514 VMM_INT_DECL(void) HMHypercallsEnable(PVM pVM)
    515 {
    516     pVM->hm.s.fHypercallsEnabled = true;
     512 * @param   pVCpu   Pointer to the VMCPU.
     513 */
     514VMM_INT_DECL(void) HMHypercallsEnable(PVMCPU pVCpu)
     515{
     516    pVCpu->hm.s.fHypercallsEnabled = true;
    517517}
    518518
     
    521521 * Notifies HM that paravirtualized hypercalls are now disabled.
    522522 *
    523  * @param   pVM     Pointer to the VM.
    524  */
    525 VMM_INT_DECL(void) HMHypercallsDisable(PVM pVM)
    526 {
    527     pVM->hm.s.fHypercallsEnabled = false;
    528 }
    529 
     523 * @param   pVCpu   Pointer to the VMCPU.
     524 */
     525VMM_INT_DECL(void) HMHypercallsDisable(PVMCPU pVCpu)
     526{
     527    pVCpu->hm.s.fHypercallsEnabled = false;
     528}
     529
     530
     531/**
     532 * Notifies HM that GIM provider wants to trap #UD.
     533 *
     534 * @param   pVCpu   Pointer to the VMCPU.
     535 */
     536VMM_INT_DECL(void) HMTrapXcptUDForGIMEnable(PVMCPU pVCpu)
     537{
     538    pVCpu->hm.s.fGIMTrapXcptUD = true;
     539    HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS);
     540}
     541
     542
     543/**
     544 * Notifies HM that GIM provider no longer wants to trap #UD.
     545 *
     546 * @param   pVCpu   Pointer to the VMCPU.
     547 */
     548VMM_INT_DECL(void) HMTrapXcptUDForGIMDisable(PVMCPU pVCpu)
     549{
     550    pVCpu->hm.s.fGIMTrapXcptUD = false;
     551    HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_XCPT_INTERCEPTS);
     552}
     553
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