VirtualBox

Changeset 42371 in vbox


Ignore:
Timestamp:
Jul 24, 2012 7:34:46 PM (13 years ago)
Author:
vboxsync
Message:

SELM.cpp: Drop the conditional tracing of TSS, GDT and LDT - we require the tracing now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/SELM.cpp

    r41965 r42371  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    8080#include <iprt/string.h>
    8181
    82 
    83 /**
    84  * Enable or disable tracking of Guest's GDT/LDT/TSS.
    85  * @{
    86  */
    87 #define SELM_TRACK_GUEST_GDT_CHANGES
    88 #define SELM_TRACK_GUEST_LDT_CHANGES
    89 #define SELM_TRACK_GUEST_TSS_CHANGES
    90 /** @} */
    9182
    9283/**
     
    539530     */
    540531    int rc;
    541 #ifdef SELM_TRACK_GUEST_GDT_CHANGES
    542532    if (pVM->selm.s.GuestGdtr.pGdt != RTRCPTR_MAX && pVM->selm.s.fGDTRangeRegistered)
    543533    {
     
    548538    }
    549539    pVM->selm.s.fGDTRangeRegistered = false;
    550 #endif
    551 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
    552540    if (pVM->selm.s.GCPtrGuestLdt != RTRCPTR_MAX)
    553541    {
     
    556544        pVM->selm.s.GCPtrGuestLdt = RTRCPTR_MAX;
    557545    }
    558 #endif
    559 #ifdef SELM_TRACK_GUEST_TSS_CHANGES
    560546    if (pVM->selm.s.GCPtrGuestTss != RTRCPTR_MAX)
    561547    {
     
    565551        pVM->selm.s.GCSelTss      = RTSEL_MAX;
    566552    }
    567 #endif
    568553
    569554    /*
     
    596581     */
    597582    int rc;
    598 #ifdef SELM_TRACK_GUEST_GDT_CHANGES
    599583    if (pVM->selm.s.GuestGdtr.pGdt != RTRCPTR_MAX && pVM->selm.s.fGDTRangeRegistered)
    600584    {
     
    605589    }
    606590    pVM->selm.s.fGDTRangeRegistered = false;
    607 #endif
    608 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
    609591    if (pVM->selm.s.GCPtrGuestLdt != RTRCPTR_MAX)
    610592    {
     
    613595        pVM->selm.s.GCPtrGuestLdt = RTRCPTR_MAX;
    614596    }
    615 #endif
    616 #ifdef SELM_TRACK_GUEST_TSS_CHANGES
    617597    if (pVM->selm.s.GCPtrGuestTss != RTRCPTR_MAX)
    618598    {
     
    622602        pVM->selm.s.GCSelTss      = RTSEL_MAX;
    623603    }
    624 #endif
    625604
    626605    /*
     
    10401019            if (pVM->selm.s.GuestGdtr.cbGdt > GDTR.cbGdt)
    10411020                memset(pGDTE, 0, pVM->selm.s.GuestGdtr.cbGdt - GDTR.cbGdt);
    1042 #ifndef SELM_TRACK_GUEST_GDT_CHANGES
    1043             pVM->selm.s.GuestGdtr.cbGdt = GDTR.cbGdt;
    1044 #endif
    1045         }
    1046 
    1047 #ifdef SELM_TRACK_GUEST_GDT_CHANGES
     1021        }
     1022
    10481023        /*
    10491024         * Check if Guest's GDTR is changed.
    10501025         */
    1051         if (    GDTR.pGdt != pVM->selm.s.GuestGdtr.pGdt
     1026        if (    GDTR.pGdt  != pVM->selm.s.GuestGdtr.pGdt
    10521027            ||  GDTR.cbGdt != pVM->selm.s.GuestGdtr.cbGdt)
    10531028        {
     
    10721047            pVM->selm.s.fGDTRangeRegistered = true;
    10731048        }
    1074 #endif
    10751049    }
    10761050
     
    11131087            /* ldtr = 0 - update hyper LDTR and deregister any active handler. */
    11141088            CPUMSetHyperLDTR(pVCpu, 0);
    1115 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
    11161089            if (pVM->selm.s.GCPtrGuestLdt != RTRCPTR_MAX)
    11171090            {
     
    11201093                pVM->selm.s.GCPtrGuestLdt = RTRCPTR_MAX;
    11211094            }
    1122 #endif
    11231095            STAM_PROFILE_STOP(&pVM->selm.s.StatUpdateFromCPUM, a);
    11241096            return VINF_SUCCESS;
     
    11491121             */
    11501122            CPUMSetHyperLDTR(pVCpu, 0);
    1151 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
    11521123            if (pVM->selm.s.GCPtrGuestLdt != RTRCPTR_MAX)
    11531124            {
     
    11561127                pVM->selm.s.GCPtrGuestLdt = RTRCPTR_MAX;
    11571128            }
    1158 #endif
    11591129            STAM_PROFILE_STOP(&pVM->selm.s.StatUpdateFromCPUM, a);
    11601130            return VINF_SUCCESS;
     
    11711141
    11721142
    1173 #ifdef SELM_TRACK_GUEST_LDT_CHANGES
    11741143        /** @todo Handle only present LDT segments. */
    11751144    //    if (pDesc->Gen.u1Present)
     
    12181187            }
    12191188        }
    1220 #else
    1221         pVM->selm.s.cbLdtLimit = cbLdt;
    1222 #endif
    12231189
    12241190        /*
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