VirtualBox

Changeset 41147 in vbox


Ignore:
Timestamp:
May 3, 2012 8:15:27 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77764
Message:

SUPDrv,VMM: Tracepoints in raw-mode.

Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r41134 r41147  
    625625endif
    626626# Set this to enable dtrace probes raw-mode context code.
    627 #VBOX_WITH_DTRACE_RC = 1
     627##ifn1of ($(KBUILD_TARGET), os2)
     628## VBOX_WITH_DTRACE_RC = 1
     629##endif
    628630# Set this to enable support for dtrace probes in guest code.
    629631#VBOX_WITH_DTRACE_GST = 1
     
    26912693  TEMPLATE_VBoxRc_DTRACETOOL         = VBoxTpG
    26922694  TEMPLATE_VBoxRc_DEFS              += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_RC
     2695  TEMPLATE_VBoxRc_DTRACE_OBJ_FLAGS   = --probe-fn-name "VMMRCProbeFire"
    26932696 else
    26942697  TEMPLATE_VBoxRc_DTRACETOOL         = VBoxTpG-Disabled
  • trunk/include/VBox/err.h

    r41117 r41147  
    11021102/** The ring-3 call didn't set an RC. */
    11031103#define VERR_VMM_RING3_CALL_NO_RC           (-2711)
     1104/** Reason for leaving RC: Caller the tracer in ring-0. */
     1105#define VINF_VMM_CALL_TRACER                (2712)
    11041106/** @} */
    11051107
  • trunk/include/VBox/sup.h

    r41130 r41147  
    16701670SUPR0DECL(void) SUPR0TracerFireProbe(struct VTGPROBELOC *pVtgProbeLoc, uintptr_t uArg0, uintptr_t uArg1, uintptr_t uArg2,
    16711671                                     uintptr_t uArg3, uintptr_t uArg4);
     1672SUPR0DECL(void) SUPR0TracerUmodProbeFire(PSUPDRVSESSION pSession, PSUPDRVTRACERUSRCTX pCtx);
    16721673/** @}  */
    16731674
  • trunk/include/VBox/sup.mac

    r40769 r41147  
    6969endstruc
    7070
     71struc SUPDRVTRACERUSRCTX32
     72        .idProbe                resd 1
     73        .cBits                  resb 1
     74        .abReserved             resb 3
     75        .u.X86.uVtgProbeLoc     resd 1
     76        .u.X86.aArgs            resd 20
     77        .u.X86.eip              resd 1
     78        .u.X86.eflags           resd 1
     79        .u.X86.eax              resd 1
     80        .u.X86.ecx              resd 1
     81        .u.X86.edx              resd 1
     82        .u.X86.ebx              resd 1
     83        .u.X86.esp              resd 1
     84        .u.X86.ebp              resd 1
     85        .u.X86.esi              resd 1
     86        .u.X86.edi              resd 1
     87        .u.X86.cs               resw 1
     88        .u.X86.ss               resw 1
     89        .u.X86.ds               resw 1
     90        .u.X86.es               resw 1
     91        .u.X86.fs               resw 1
     92        .u.X86.gs               resw 1
     93endstruc
     94
     95struc SUPDRVTRACERUSRCTX64
     96        .idProbe                resd 1
     97        .cBits                  resb 1
     98        .abReserved             resb 3
     99        .u.Amd64.uVtgProbeLoc   resq 1
     100        .u.Amd64.aArgs          resq 10
     101        .u.Amd64.rip            resq 1
     102        .u.Amd64.rflags         resq 1
     103        .u.Amd64.rax            resq 1
     104        .u.Amd64.rcx            resq 1
     105        .u.Amd64.rdx            resq 1
     106        .u.Amd64.rbx            resq 1
     107        .u.Amd64.rsp            resq 1
     108        .u.Amd64.rbp            resq 1
     109        .u.Amd64.rsi            resq 1
     110        .u.Amd64.rdi            resq 1
     111        .u.Amd64.r8             resq 1
     112        .u.Amd64.r9             resq 1
     113        .u.Amd64.r10            resq 1
     114        .u.Amd64.r11            resq 1
     115        .u.Amd64.r12            resq 1
     116        .u.Amd64.r13            resq 1
     117        .u.Amd64.r14            resq 1
     118        .u.Amd64.r15            resq 1
     119endstruc
     120
    71121
    72122%endif
  • trunk/include/VBox/vmm/vm.h

    r40656 r41147  
    183183        struct VMMCPU       s;
    184184#endif
    185         uint8_t             padding[384];       /* multiple of 64 */
     185        uint8_t             padding[640];       /* multiple of 64 */
    186186    } vmm;
    187187
     
    215215
    216216    /** Align the following members on page boundary. */
    217     uint8_t                 abAlignment2[1024 - 64];
     217    uint8_t                 abAlignment2[1024 - 320];
    218218
    219219    /** PGM part. */
  • trunk/include/VBox/vmm/vm.mac

    r40405 r41147  
    138138    alignb 64
    139139
    140     .cpum                   resb 4096
     140    .cpum                   resb 3456
     141    .hwaccm                 resb 5376
     142    .em                     resb 1472
     143    .iem                    resb 3072
     144    .trpm                   resb 128
     145    .tm                     resb 384
     146    .vmm                    resb 640
     147    .pdm                    resb 128
     148    .iom                    resb 512
     149    .dbgf                   resb 64
     150    alignb 4096
     151    .pgm                    resb 4096
    141152endstruc
    142153
  • trunk/include/VBox/vmm/vmm.h

    r39917 r41147  
    111111    VMMCALLRING3_32BIT_HACK = 0x7fffffff
    112112} VMMCALLRING3;
     113
     114
     115/**
     116 * VMMRZCallRing0 operations.
     117 */
     118typedef enum VMMCALLRING0
     119{
     120    /** Invalid operation.  */
     121    VMMCALLRING0_INVALID = 0,
     122    /** A probe fired, call SUPR0TracerUmodProbeFire. */
     123    VMMCALLRING0_TRACER_UMOD_PROBE_FIRE,
     124    /** The usual 32-bit hack. */
     125    VMMCALLRING0_32BIT_HACK = 0x7fffffff
     126} VMMCALLRING0;
     127
    113128
    114129/**
     
    498513VMMRCDECL(void)     VMMGCGuestToHost(PVM pVM, int rc);
    499514VMMRCDECL(void)     VMMGCLogFlushIfFull(PVM pVM);
     515VMMRZDECL(int)      VMMRCCallRing0(PVM pVM, PVMCPU pVCpu, VMMCALLRING0 enmOperation, uint64_t uArg);
    500516/** @} */
    501517#endif /* IN_RC */
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r41117 r41147  
    194194    { "SUPR0TracerRegisterImpl",                (void *)SUPR0TracerRegisterImpl },
    195195    { "SUPR0TracerRegisterModule",              (void *)SUPR0TracerRegisterModule },
     196    { "SUPR0TracerUmodProbeFire",               (void *)SUPR0TracerUmodProbeFire },
    196197    { "SUPR0UnlockMem",                         (void *)SUPR0UnlockMem },
    197198    { "SUPSemEventClose",                       (void *)SUPSemEventClose },
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r41117 r41147  
    194194 *          - Remove RTSpinlockReleaseNoInts.
    195195 */
    196 #define SUPDRV_IOC_VERSION                              0x001a0002
     196#define SUPDRV_IOC_VERSION                              0x001a0003
    197197
    198198/** SUP_IOCTL_COOKIE. */
  • trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp

    r41135 r41147  
    335335        uint64_t u64Tmp = pVtgHdr->uProbeLocsEnd.u64 - pVtgHdr->uProbeLocs.u64;
    336336        if (u64Tmp >= UINT32_MAX)
     337        {
     338            SUPR0Printf("supdrvVtgValidateHdr: VERR_SUPDRV_VTG_BAD_HDR_TOO_MUCH - u64Tmp=%#llx ProbeLocs=%#llx ProbeLocsEnd=%#llx\n",
     339                        u64Tmp, pVtgHdr->uProbeLocs.u64, pVtgHdr->uProbeLocsEnd.u64);
    337340            return VERR_SUPDRV_VTG_BAD_HDR_TOO_MUCH;
     341        }
    338342        pVtgHdr->cbProbeLocs  = (uint32_t)u64Tmp;
    339343
    340344        u64Tmp = pVtgHdr->uProbeLocs.u64 - uVtgHdrAddr;
    341345        if ((int64_t)u64Tmp != (int32_t)u64Tmp)
     346        {
     347            SUPR0Printf("supdrvVtgValidateHdr: VERR_SUPDRV_VTG_BAD_HDR_PTR - u64Tmp=%#llx uProbeLocs=%#llx uVtgHdrAddr=%RTptr\n",
     348                        u64Tmp, pVtgHdr->uProbeLocs.u64, uVtgHdrAddr);
    342349            return VERR_SUPDRV_VTG_BAD_HDR_PTR;
     350        }
    343351        pVtgHdr->offProbeLocs = (int32_t)u64Tmp;
    344352    }
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r41117 r41147  
    269269        CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
    270270        const uint32_t uMinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x00190000
    271                                    ? 0x00190002
     271                                   ? 0x00190003
    272272                                   : SUPDRV_IOC_VERSION & 0xffff0000;
    273273        CookieReq.u.In.u32MinVersion = uMinVersion;
     
    25702570        pVtgHdr->cbProbeLocs  = (uint32_t)u64Tmp;
    25712571
    2572         u64Tmp = pVtgHdr->uProbeLocs.u64 - (uintptr_t)pVtgHdr;
     2572        u64Tmp = pVtgHdr->uProbeLocs.u64 - uVtgHdrAddr;
    25732573        if ((int64_t)u64Tmp != (int32_t)u64Tmp)
     2574        {
     2575            LogRel(("SUPR3TracerRegisterModule: VERR_SUPDRV_VTG_BAD_HDR_PTR - u64Tmp=%#llx uProbeLocs=%#llx uVtgHdrAddr=%RTptr\n",
     2576                    u64Tmp, pVtgHdr->uProbeLocs.u64, uVtgHdrAddr));
    25742577            return VERR_SUPDRV_VTG_BAD_HDR_PTR;
     2578        }
    25752579        pVtgHdr->offProbeLocs = (int32_t)u64Tmp;
    25762580    }
     
    26172621    Req.u.In.fFlags         = fFlags;
    26182622
    2619     memcpy(Req.u.In.szName, pszModule, cchModule);
     2623    memcpy(Req.u.In.szName, pszModule, cchModule + 1);
    26202624    if (!RTPathHasExt(Req.u.In.szName))
    26212625    {
  • trunk/src/VBox/HostDrivers/Support/SUPLibTracerA.asm

    r41127 r41147  
    2929;*******************************************************************************
    3030%include "iprt/asmdefs.mac"
     31%include "VBox/sup.mac"
    3132
    3233; This should go into asmdefs.mac
     
    4344;*******************************************************************************
    4445struc SUPREQHDR
    45 
    4646        .u32Cookie              resd 1
    4747        .u32SessionCookie       resd 1
     
    5050        .fFlags                 resd 1
    5151        .rc                     resd 1
    52 endstruc
    53 
    54 struc SUPDRVTRACERUSRCTX32
    55         .idProbe                resd 1
    56         .cBits                  resb 1
    57         .abReserved             resb 3
    58         .u.X86.uVtgProbeLoc     resd 1
    59         .u.X86.aArgs            resd 20
    60         .u.X86.eip              resd 1
    61         .u.X86.eflags           resd 1
    62         .u.X86.eax              resd 1
    63         .u.X86.ecx              resd 1
    64         .u.X86.edx              resd 1
    65         .u.X86.ebx              resd 1
    66         .u.X86.esp              resd 1
    67         .u.X86.ebp              resd 1
    68         .u.X86.esi              resd 1
    69         .u.X86.edi              resd 1
    70         .u.X86.cs               resw 1
    71         .u.X86.ss               resw 1
    72         .u.X86.ds               resw 1
    73         .u.X86.es               resw 1
    74         .u.X86.fs               resw 1
    75         .u.X86.gs               resw 1
    76 endstruc
    77 
    78 struc SUPDRVTRACERUSRCTX64
    79         .idProbe                resd 1
    80         .cBits                  resb 1
    81         .abReserved             resb 3
    82         .u.Amd64.uVtgProbeLoc   resq 1
    83         .u.Amd64.aArgs          resq 10
    84         .u.Amd64.rip            resq 1
    85         .u.Amd64.rflags         resq 1
    86         .u.Amd64.rax            resq 1
    87         .u.Amd64.rcx            resq 1
    88         .u.Amd64.rdx            resq 1
    89         .u.Amd64.rbx            resq 1
    90         .u.Amd64.rsp            resq 1
    91         .u.Amd64.rbp            resq 1
    92         .u.Amd64.rsi            resq 1
    93         .u.Amd64.rdi            resq 1
    94         .u.Amd64.r8             resq 1
    95         .u.Amd64.r9             resq 1
    96         .u.Amd64.r10            resq 1
    97         .u.Amd64.r11            resq 1
    98         .u.Amd64.r12            resq 1
    99         .u.Amd64.r13            resq 1
    100         .u.Amd64.r14            resq 1
    101         .u.Amd64.r15            resq 1
    10252endstruc
    10353
  • trunk/src/VBox/VMM/Makefile.kmk

    r41076 r41147  
    5353ifdef VBOX_WITH_PCI_PASSTHROUGH
    5454 VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
     55endif
     56ifdef VBOX_WITH_DTRACE_RC
     57 VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
    5558endif
    5659# VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r40763 r41147  
    666666                {
    667667                    RTCCUINTREG uFlags = ASMIntDisableFlags();
    668                     VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    669 
    670                     TMNotifyStartOfExecution(pVCpu);
    671                     rc = pVM->vmm.s.pfnHostToGuestR0(pVM);
    672                     pVCpu->vmm.s.iLastGZRc = rc;
    673                     TMNotifyEndOfExecution(pVCpu);
    674 
    675                     VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED);
     668
     669                    for (;;)
     670                    {
     671                        VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
     672                        TMNotifyStartOfExecution(pVCpu);
     673
     674                        rc = pVM->vmm.s.pfnHostToGuestR0(pVM);
     675                        pVCpu->vmm.s.iLastGZRc = rc;
     676
     677                        TMNotifyEndOfExecution(pVCpu);
     678                        VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED);
     679
     680                        if (rc != VINF_VMM_CALL_TRACER)
     681                            break;
     682                        SUPR0TracerUmodProbeFire(pVM->pSession, &pVCpu->vmm.s.TracerCtx);
     683                    }
    676684
    677685                    /* Re-enable VT-x if previously turned off. */
  • trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp

    r39078 r41147  
    3232#include <VBox/err.h>
    3333#include <VBox/vmm/hwaccm.h>
     34#include <VBox/VBoxTpG.h>
    3435
    3536#include <VBox/log.h>
     
    168169
    169170/**
    170  * Applies relocations to GC modules.
     171 * Applies relocations to RC modules.
    171172 *
    172173 * This must be done very early in the relocation
    173  * process so that components can resolve GC symbols during relocation.
     174 * process so that components can resolve RC symbols during relocation.
    174175 *
    175176 * @param   pUVM        Pointer to the user mode VM structure.
     
    182183
    183184    /*
    184      * GC Modules.
     185     * RC Modules.
    185186     */
    186187    RTCritSectEnter(&pUVM->pdm.s.ListCritSect);
     
    431432
    432433/**
    433  * Loads a module into the guest context (i.e. into the Hypervisor memory region).
     434 * Loads a module into the raw-mode context (i.e. into the Hypervisor memory
     435 * region).
    434436 *
    435437 * @returns VBox status code.
     
    528530                        if (RT_SUCCESS(rc))
    529531                        {
     532#ifdef VBOX_WITH_DTRACE_RC
     533                            /*
     534                             * Register the tracer bits if present.
     535                             */
     536                            RTLDRADDR uValue;
     537                            rc = RTLdrGetSymbolEx(pModule->hLdrMod, pModule->pvBits, pModule->ImageBase,
     538                                                  "g_VTGObjHeader", &uValue);
     539                            if (RT_SUCCESS(rc))
     540                            {
     541                                PVTGOBJHDR pVtgHdr = (PVTGOBJHDR)MMHyperRCToCC(pVM, (RTRCPTR)uValue);
     542                                if (   pVtgHdr
     543                                    && !memcmp(pVtgHdr->szMagic, VTGOBJHDR_MAGIC, sizeof(pVtgHdr->szMagic)))
     544                                    rc = SUPR3TracerRegisterModule(~(uintptr_t)0, pModule->szName, pVtgHdr, uValue,
     545                                                                   SUP_TRACER_UMOD_FLAGS_SHARED);
     546                                else
     547                                    rc = pVtgHdr ? VERR_INVALID_MAGIC : VERR_INVALID_POINTER;
     548                                if (RT_FAILURE(rc))
     549                                    LogRel(("PDM: Failed to register tracepoints for '%s': %Rrc\n", pModule->szName, rc));
     550                            }
     551#endif
     552
    530553                            /*
    531554                             * Insert the module.
     
    542565                                pUVM->pdm.s.pModules = pModule; /* (pNext is zeroed by alloc) */
    543566                            Log(("PDM: RC Module at %RRv %s (%s)\n", (RTRCPTR)pModule->ImageBase, pszName, pszFilename));
     567
    544568                            RTCritSectLeave(&pUVM->pdm.s.ListCritSect);
    545569                            RTMemTmpFree(pszFile);
    546570                            RTMemTmpFree(paPages);
     571
    547572                            return VINF_SUCCESS;
    548573                        }
  • trunk/src/VBox/VMM/VMMRC/VMMRC.cpp

    r39078 r41147  
    210210
    211211/**
     212 * Calls the ring-0 host code.
     213 *
     214 * @param   pVM             The VM handle.
     215 */
     216DECLASM(void) vmmRCProbeFireHelper(PVM pVM)
     217{
     218    pVM->vmm.s.pfnGuestToHostRC(VINF_VMM_CALL_TRACER);
     219}
     220
     221
     222
     223/**
    212224 * Execute the trap testcase.
    213225 *
  • trunk/src/VBox/VMM/VMMRC/VMMRC.def

    r39357 r41147  
    6666    MMGCRamReadNoTrapHandler
    6767    VMMGetSvnRev
     68    VMMRCProbeFire
    6869    vmmGCLoggerFlush
    6970    vmmGCLoggerWrapper
  • trunk/src/VBox/VMM/VMMRC/VMMRCA.asm

    r37955 r41147  
    44;
    55
    6 ; Copyright (C) 2006-2007 Oracle Corporation
     6;
     7; Copyright (C) 2006-2012 Oracle Corporation
    78;
    89; This file is part of VirtualBox Open Source Edition (OSE), as
     
    2021%include "VBox/asmdefs.mac"
    2122%include "iprt/x86.mac"
     23%include "VBox/sup.mac"
     24%include "VBox/vmm/vm.mac"
     25%include "VMMInternal.mac"
    2226
    2327
     
    4852;* External Symbols                                                            *
    4953;*******************************************************************************
     54extern IMPNAME(g_VM)
    5055extern IMPNAME(g_Logger)
    5156extern IMPNAME(g_RelLogger)
    5257extern NAME(RTLogLogger)
     58extern NAME(vmmRCProbeFireHelper)
    5359
    5460
     
    214220ENDPROC vmmGCTestTrap0e
    215221
     222
     223
     224;;
     225; The raw-mode context equivalent of SUPTracerFireProbe. 
     226;
     227; See also SUPLibTracerA.asm.
     228;
     229EXPORTEDNAME VMMRCProbeFire
     230        push    ebp
     231        mov     ebp, esp
     232
     233        ;
     234        ; Save edx and eflags so we can use them.
     235        ;
     236        pushf
     237        push    edx
     238
     239        ;
     240        ; Get the address of the tracer context record after first checking
     241        ; that host calls hasn't been disabled.
     242        ;
     243        mov     edx, IMP(g_VM)
     244        add     edx, [ecx + VM.offVMCPU]
     245        cmp     dword [edx + VMMCPU.cCallRing3Disabled], 0
     246        jnz     .return
     247        add     edx, [VMCPU.vmm + VMMCPU.TracerCtx]
     248
     249        ;
     250        ; Save the X86 context.
     251        ;
     252        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.eax], eax
     253        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.ecx], ecx
     254        pop     eax
     255        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.edx], eax
     256        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.ebx], ebx
     257        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.esi], esi
     258        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.edi], edi
     259        pop     eax
     260        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.eflags], eax
     261        mov     eax, [ebp + 4]
     262        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.eip], eax
     263        mov     eax, [ebp]
     264        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.ebp], eax
     265        lea     eax, [ebp + 4*2]
     266        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.esp], eax
     267
     268        mov     ecx, [ebp + 4*2]
     269        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.uVtgProbeLoc], ecx
     270
     271        mov     eax, [ecx + 4]          ; VTGPROBELOC::idProbe.
     272        mov     [edx + SUPDRVTRACERUSRCTX32.idProbe], eax
     273        mov     dword [edx + SUPDRVTRACERUSRCTX32.cBits], 32
     274
     275        ; Copy the arguments off the stack.
     276%macro COPY_ONE_ARG 1
     277        mov     eax, [ebp + 8 + %1 * 4]
     278        mov     [edx + SUPDRVTRACERUSRCTX32.u.X86.aArgs + %1*4], eax
     279%endmacro
     280        COPY_ONE_ARG 0
     281        COPY_ONE_ARG 1
     282        COPY_ONE_ARG 2
     283        COPY_ONE_ARG 3
     284        COPY_ONE_ARG 4
     285        COPY_ONE_ARG 5
     286        COPY_ONE_ARG 6
     287        COPY_ONE_ARG 7
     288        COPY_ONE_ARG 8
     289        COPY_ONE_ARG 9
     290        COPY_ONE_ARG 10
     291        COPY_ONE_ARG 11
     292        COPY_ONE_ARG 12
     293        COPY_ONE_ARG 13
     294        COPY_ONE_ARG 14
     295        COPY_ONE_ARG 15
     296        COPY_ONE_ARG 16
     297        COPY_ONE_ARG 17
     298        COPY_ONE_ARG 18
     299        COPY_ONE_ARG 19
     300
     301        ;
     302        ; Call the helper (too lazy to do the VMM structure stuff).
     303        ;
     304        mov     ecx, IMP(g_VM)
     305        push    ecx
     306        call    NAME(vmmRCProbeFireHelper)
     307
     308.return:
     309        leave
     310        ret
     311ENDPROC      VMMRCProbeFire
     312
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r39303 r41147  
    2020
    2121#include <VBox/cdefs.h>
     22#include <VBox/sup.h>
    2223#include <VBox/vmm/stam.h>
    2324#include <VBox/log.h>
     
    425426     *  attempts at recursive rendezvous. */
    426427    bool volatile               fInRendezvous;
    427     bool                        afPadding[HC_ARCH_BITS == 32 ? 7 : 3];
     428    bool                        afPadding[HC_ARCH_BITS == 32 ? 3 : 7];
    428429    /** @} */
     430
     431    /** @name Raw-mode context tracting data.
     432     * @{ */
     433    SUPDRVTRACERUSRCTX          TracerCtx;
     434    /** @} */
     435
     436    /** Alignment padding, making sure u64CallRing3Arg is nicly aligned. */
     437    uint32_t                    u32Padding1;
    429438
    430439    /** @name Call Ring-3
     
    439448    /** The argument to the operation. */
    440449    uint64_t                    u64CallRing3Arg;
    441     /** The Ring-0 jmp buffer. */
     450    /** The Ring-0 jmp buffer.
     451     * @remarks The size of this type isn't stable in assembly, so don't put
     452     *          anything that needs to be accessed from assembly after it. */
    442453    VMMR0JMPBUF                 CallRing3JmpBufR0;
    443454    /** @} */
    444455
    445456} VMMCPU;
     457AssertCompileMemberAlignment(VMMCPU, TracerCtx, 8);
    446458/** Pointer to VMMCPU. */
    447459typedef VMMCPU *PVMMCPU;
  • trunk/src/VBox/VMM/include/VMMInternal.mac

    r35333 r41147  
    1717
    1818%include "VBox/asmdefs.mac"
     19%include "VBox/sup.mac"
    1920
    2021;
     
    9596endstruc
    9697
     98
     99struc VMMCPU
     100                               
     101        .offVMCPU               resd 1
     102        .iLastGZRc              resd 1
     103        .pbEMTStackR3           RTR3PTR_RES 1
     104        .pbEMTStackRC           RTRCPTR_RES 1
     105        .pbEMTStackBottomRC     RTRCPTR_RES 1
     106%ifdef LOG_ENABLED
     107        .pR0LoggerR3            RTR3PTR_RES 1
     108        .pR0LoggerR0            RTR0PTR_RES 1
     109%endif
     110
     111        .fInRendezvous          resb 1
     112%if HC_ARCH_BITS == 32
     113        .afPadding              resb 7
     114%else
     115        .afPadding              resb 3
     116%endif
     117
     118        alignb 8
     119        .TracerCtx              resb SUPDRVTRACERUSRCTX64_size
     120
     121
     122        .cCallRing3Disabled     resd 1
     123        .enmCallRing3Operation  resd 1
     124        .rcCallRing3            resd 1
     125        .u64CallRing3Arg        resq 1
     126        ; .CallRing3JmpBufR0    resb no-can-do
     127
     128endstruc
     129
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