VirtualBox

Changeset 54897 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Mar 22, 2015 10:49:39 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99112
Message:

Moving CPUMCPU about...

Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/CPUMInternal.h

    r54799 r54897  
    530530{
    531531    /**
    532      * Hypervisor context.
    533      * Aligned on a 64-byte boundary.
    534      */
    535     CPUMCTX                 Hyper;
    536 
    537     /**
    538      * Saved host context. Only valid while inside GC.
    539      * Aligned on a 64-byte boundary.
    540      */
    541     CPUMHOSTCTX             Host;
    542 
    543 #ifdef VBOX_WITH_CRASHDUMP_MAGIC
    544     uint8_t                 aMagic[56];
    545     uint64_t                uMagic;
    546 #endif
    547 
    548     /**
    549532     * Guest context.
    550533     * Aligned on a 64-byte boundary.
     
    596579    bool                    fRemEntered;
    597580
    598     /** Align the structure on a 64-byte boundary. */
     581    /** Align the next member on a 64-bit boundrary. */
    599582    uint8_t                 abPadding2[64 - 16 - (HC_ARCH_BITS == 64 ? 8 : 4) - 4 - 1 - 2];
     583
     584    /** Saved host context.  Only valid while inside RC or HM contexts.
     585     * Must be aligned on a 64-byte boundary. */
     586    CPUMHOSTCTX             Host;
     587    /** Hypervisor context. Must be aligned on a 64-byte boundary. */
     588    CPUMCTX                 Hyper;
     589
     590#ifdef VBOX_WITH_CRASHDUMP_MAGIC
     591    uint8_t                 aMagic[56];
     592    uint64_t                uMagic;
     593#endif
    600594} CPUMCPU;
    601595/** Pointer to the CPUMCPU instance data residing in the shared VMCPU structure. */
  • trunk/src/VBox/VMM/include/CPUMInternal.mac

    r54763 r54897  
    123123struc CPUMCPU
    124124    ;
    125     ; Hypervisor Context.
    126     ;
    127     .Hyper.fpu                resb    512
    128     .Hyper.eax                resq    1
    129     .Hyper.ecx                resq    1
    130     .Hyper.edx                resq    1
    131     .Hyper.ebx                resq    1
    132     .Hyper.esp                resq    1
    133     .Hyper.ebp                resq    1
    134     .Hyper.esi                resq    1
    135     .Hyper.edi                resq    1
    136     .Hyper.r8                 resq    1
    137     .Hyper.r9                 resq    1
    138     .Hyper.r10                resq    1
    139     .Hyper.r11                resq    1
    140     .Hyper.r12                resq    1
    141     .Hyper.r13                resq    1
    142     .Hyper.r14                resq    1
    143     .Hyper.r15                resq    1
    144     .Hyper.es.Sel             resw    1
    145     .Hyper.es.PaddingSel      resw    1
    146     .Hyper.es.ValidSel        resw    1
    147     .Hyper.es.fFlags          resw    1
    148     .Hyper.es.u64Base         resq    1
    149     .Hyper.es.u32Limit        resd    1
    150     .Hyper.es.Attr            resd    1
    151     .Hyper.cs.Sel             resw    1
    152     .Hyper.cs.PaddingSel      resw    1
    153     .Hyper.cs.ValidSel        resw    1
    154     .Hyper.cs.fFlags          resw    1
    155     .Hyper.cs.u64Base         resq    1
    156     .Hyper.cs.u32Limit        resd    1
    157     .Hyper.cs.Attr            resd    1
    158     .Hyper.ss.Sel             resw    1
    159     .Hyper.ss.PaddingSel      resw    1
    160     .Hyper.ss.ValidSel        resw    1
    161     .Hyper.ss.fFlags          resw    1
    162     .Hyper.ss.u64Base         resq    1
    163     .Hyper.ss.u32Limit        resd    1
    164     .Hyper.ss.Attr            resd    1
    165     .Hyper.ds.Sel             resw    1
    166     .Hyper.ds.PaddingSel      resw    1
    167     .Hyper.ds.ValidSel        resw    1
    168     .Hyper.ds.fFlags          resw    1
    169     .Hyper.ds.u64Base         resq    1
    170     .Hyper.ds.u32Limit        resd    1
    171     .Hyper.ds.Attr            resd    1
    172     .Hyper.fs.Sel             resw    1
    173     .Hyper.fs.PaddingSel      resw    1
    174     .Hyper.fs.ValidSel        resw    1
    175     .Hyper.fs.fFlags          resw    1
    176     .Hyper.fs.u64Base         resq    1
    177     .Hyper.fs.u32Limit        resd    1
    178     .Hyper.fs.Attr            resd    1
    179     .Hyper.gs.Sel             resw    1
    180     .Hyper.gs.PaddingSel      resw    1
    181     .Hyper.gs.ValidSel        resw    1
    182     .Hyper.gs.fFlags          resw    1
    183     .Hyper.gs.u64Base         resq    1
    184     .Hyper.gs.u32Limit        resd    1
    185     .Hyper.gs.Attr            resd    1
    186     .Hyper.eip                resq    1
    187     .Hyper.eflags             resq    1
    188     .Hyper.cr0                resq    1
    189     .Hyper.cr2                resq    1
    190     .Hyper.cr3                resq    1
    191     .Hyper.cr4                resq    1
    192     .Hyper.dr                 resq    8
    193     .Hyper.gdtrPadding        resw    3
    194     .Hyper.gdtr               resw    0
    195     .Hyper.gdtr.cbGdt         resw    1
    196     .Hyper.gdtr.pGdt          resq    1
    197     .Hyper.idtrPadding        resw    3
    198     .Hyper.idtr               resw    0
    199     .Hyper.idtr.cbIdt         resw    1
    200     .Hyper.idtr.pIdt          resq    1
    201     .Hyper.ldtr.Sel           resw    1
    202     .Hyper.ldtr.PaddingSel    resw    1
    203     .Hyper.ldtr.ValidSel      resw    1
    204     .Hyper.ldtr.fFlags        resw    1
    205     .Hyper.ldtr.u64Base       resq    1
    206     .Hyper.ldtr.u32Limit      resd    1
    207     .Hyper.ldtr.Attr          resd    1
    208     .Hyper.tr.Sel             resw    1
    209     .Hyper.tr.PaddingSel      resw    1
    210     .Hyper.tr.ValidSel        resw    1
    211     .Hyper.tr.fFlags          resw    1
    212     .Hyper.tr.u64Base         resq    1
    213     .Hyper.tr.u32Limit        resd    1
    214     .Hyper.tr.Attr            resd    1
    215     .Hyper.SysEnter.cs        resb    8
    216     .Hyper.SysEnter.eip       resb    8
    217     .Hyper.SysEnter.esp       resb    8
    218     .Hyper.msrEFER            resb    8
    219     .Hyper.msrSTAR            resb    8
    220     .Hyper.msrPAT             resb    8
    221     .Hyper.msrLSTAR           resb    8
    222     .Hyper.msrCSTAR           resb    8
    223     .Hyper.msrSFMASK          resb    8
    224     .Hyper.msrKERNELGSBASE    resb    8
    225     .Hyper.msrApicBase        resb    8
    226 
    227     ;
    228     ; Host context state
    229     ;
    230     alignb 64
    231     .Host.fpu            resb    FPUSTATE_SIZE
    232 
    233 %if HC_ARCH_BITS == 64 || fVBOX_WITH_HYBRID_32BIT_KERNEL
    234     ;.Host.rax            resq    1 - scratch
    235     .Host.rbx            resq    1
    236     ;.Host.rcx            resq    1 - scratch
    237     ;.Host.rdx            resq    1 - scratch
    238     .Host.rdi            resq    1
    239     .Host.rsi            resq    1
    240     .Host.rbp            resq    1
    241     .Host.rsp            resq    1
    242     ;.Host.r8             resq    1 - scratch
    243     ;.Host.r9             resq    1 - scratch
    244     .Host.r10            resq    1
    245     .Host.r11            resq    1
    246     .Host.r12            resq    1
    247     .Host.r13            resq    1
    248     .Host.r14            resq    1
    249     .Host.r15            resq    1
    250     ;.Host.rip            resd    1 - scratch
    251     .Host.rflags         resq    1
    252 %endif
    253 %if HC_ARCH_BITS == 32
    254     ;.Host.eax            resd    1 - scratch
    255     .Host.ebx            resd    1
    256     ;.Host.edx            resd    1 - scratch
    257     ;.Host.ecx            resd    1 - scratch
    258     .Host.edi            resd    1
    259     .Host.esi            resd    1
    260     .Host.ebp            resd    1
    261     .Host.eflags         resd    1
    262     ;.Host.eip            resd    1 - scratch
    263     ; lss pair!
    264     .Host.esp            resd    1
    265 %endif
    266     .Host.ss             resw    1
    267     .Host.ssPadding      resw    1
    268     .Host.gs             resw    1
    269     .Host.gsPadding      resw    1
    270     .Host.fs             resw    1
    271     .Host.fsPadding      resw    1
    272     .Host.es             resw    1
    273     .Host.esPadding      resw    1
    274     .Host.ds             resw    1
    275     .Host.dsPadding      resw    1
    276     .Host.cs             resw    1
    277     .Host.csPadding      resw    1
    278 
    279 %if HC_ARCH_BITS == 32 && fVBOX_WITH_HYBRID_32BIT_KERNEL == 0
    280     .Host.cr0            resd    1
    281     ;.Host.cr2            resd    1 - scratch
    282     .Host.cr3            resd    1
    283     .Host.cr4            resd    1
    284 
    285     .Host.dr0            resd    1
    286     .Host.dr1            resd    1
    287     .Host.dr2            resd    1
    288     .Host.dr3            resd    1
    289     .Host.dr6            resd    1
    290     .Host.dr7            resd    1
    291 
    292     .Host.gdtr           resb    6           ; GDT limit + linear address
    293     .Host.gdtrPadding    resw    1
    294     .Host.idtr           resb    6           ; IDT limit + linear address
    295     .Host.idtrPadding    resw    1
    296     .Host.ldtr           resw    1
    297     .Host.ldtrPadding    resw    1
    298     .Host.tr             resw    1
    299     .Host.trPadding      resw    1
    300 
    301     .Host.SysEnterPadding resd   1
    302     .Host.SysEnter.cs    resq    1
    303     .Host.SysEnter.eip   resq    1
    304     .Host.SysEnter.esp   resq    1
    305     .Host.efer           resq    1
    306 
    307 %else ; 64-bit
    308 
    309     .Host.cr0            resq    1
    310     ;.Host.cr2            resq    1 - scratch
    311     .Host.cr3            resq    1
    312     .Host.cr4            resq    1
    313     .Host.cr8            resq    1
    314 
    315     .Host.dr0            resq    1
    316     .Host.dr1            resq    1
    317     .Host.dr2            resq    1
    318     .Host.dr3            resq    1
    319     .Host.dr6            resq    1
    320     .Host.dr7            resq    1
    321 
    322     .Host.gdtr           resb    10         ; GDT limit + linear address
    323     .Host.gdtrPadding    resw    1
    324     .Host.idtr           resb    10         ; IDT limit + linear address
    325     .Host.idtrPadding    resw    1
    326     .Host.ldtr           resw    1
    327     .Host.ldtrPadding    resw    1
    328     .Host.tr             resw    1
    329     .Host.trPadding      resw    1
    330 
    331     .Host.SysEnter.cs    resq    1
    332     .Host.SysEnter.eip   resq    1
    333     .Host.SysEnter.esp   resq    1
    334     .Host.FSbase         resq    1
    335     .Host.GSbase         resq    1
    336     .Host.efer           resq    1
    337 %endif ; 64-bit
    338 
    339 %ifdef VBOX_WITH_CRASHDUMP_MAGIC
    340     .aMagic              resb    56
    341     .uMagic              resq    1
    342 %endif
    343     ;
    344125    ; Guest context state
    345     ; (Identical to the .Hyper chunk above.)
     126    ; (Identical to the .Hyper chunk below.)
    346127    ;
    347128    alignb 64
     
    470251
    471252    .abPadding2           resb    (64 - 16 - RTR0PTR_CB - 4 - 1 - 2)
     253
     254    ;
     255    ; Host context state
     256    ;
     257    alignb 64
     258    .Host.fpu            resb    FPUSTATE_SIZE
     259
     260%if HC_ARCH_BITS == 64 || fVBOX_WITH_HYBRID_32BIT_KERNEL
     261    ;.Host.rax            resq    1 - scratch
     262    .Host.rbx            resq    1
     263    ;.Host.rcx            resq    1 - scratch
     264    ;.Host.rdx            resq    1 - scratch
     265    .Host.rdi            resq    1
     266    .Host.rsi            resq    1
     267    .Host.rbp            resq    1
     268    .Host.rsp            resq    1
     269    ;.Host.r8             resq    1 - scratch
     270    ;.Host.r9             resq    1 - scratch
     271    .Host.r10            resq    1
     272    .Host.r11            resq    1
     273    .Host.r12            resq    1
     274    .Host.r13            resq    1
     275    .Host.r14            resq    1
     276    .Host.r15            resq    1
     277    ;.Host.rip            resd    1 - scratch
     278    .Host.rflags         resq    1
     279%endif
     280%if HC_ARCH_BITS == 32
     281    ;.Host.eax            resd    1 - scratch
     282    .Host.ebx            resd    1
     283    ;.Host.edx            resd    1 - scratch
     284    ;.Host.ecx            resd    1 - scratch
     285    .Host.edi            resd    1
     286    .Host.esi            resd    1
     287    .Host.ebp            resd    1
     288    .Host.eflags         resd    1
     289    ;.Host.eip            resd    1 - scratch
     290    ; lss pair!
     291    .Host.esp            resd    1
     292%endif
     293    .Host.ss             resw    1
     294    .Host.ssPadding      resw    1
     295    .Host.gs             resw    1
     296    .Host.gsPadding      resw    1
     297    .Host.fs             resw    1
     298    .Host.fsPadding      resw    1
     299    .Host.es             resw    1
     300    .Host.esPadding      resw    1
     301    .Host.ds             resw    1
     302    .Host.dsPadding      resw    1
     303    .Host.cs             resw    1
     304    .Host.csPadding      resw    1
     305
     306%if HC_ARCH_BITS == 32 && fVBOX_WITH_HYBRID_32BIT_KERNEL == 0
     307    .Host.cr0            resd    1
     308    ;.Host.cr2            resd    1 - scratch
     309    .Host.cr3            resd    1
     310    .Host.cr4            resd    1
     311
     312    .Host.dr0            resd    1
     313    .Host.dr1            resd    1
     314    .Host.dr2            resd    1
     315    .Host.dr3            resd    1
     316    .Host.dr6            resd    1
     317    .Host.dr7            resd    1
     318
     319    .Host.gdtr           resb    6           ; GDT limit + linear address
     320    .Host.gdtrPadding    resw    1
     321    .Host.idtr           resb    6           ; IDT limit + linear address
     322    .Host.idtrPadding    resw    1
     323    .Host.ldtr           resw    1
     324    .Host.ldtrPadding    resw    1
     325    .Host.tr             resw    1
     326    .Host.trPadding      resw    1
     327
     328    .Host.SysEnterPadding resd   1
     329    .Host.SysEnter.cs    resq    1
     330    .Host.SysEnter.eip   resq    1
     331    .Host.SysEnter.esp   resq    1
     332    .Host.efer           resq    1
     333
     334%else ; 64-bit
     335
     336    .Host.cr0            resq    1
     337    ;.Host.cr2            resq    1 - scratch
     338    .Host.cr3            resq    1
     339    .Host.cr4            resq    1
     340    .Host.cr8            resq    1
     341
     342    .Host.dr0            resq    1
     343    .Host.dr1            resq    1
     344    .Host.dr2            resq    1
     345    .Host.dr3            resq    1
     346    .Host.dr6            resq    1
     347    .Host.dr7            resq    1
     348
     349    .Host.gdtr           resb    10         ; GDT limit + linear address
     350    .Host.gdtrPadding    resw    1
     351    .Host.idtr           resb    10         ; IDT limit + linear address
     352    .Host.idtrPadding    resw    1
     353    .Host.ldtr           resw    1
     354    .Host.ldtrPadding    resw    1
     355    .Host.tr             resw    1
     356    .Host.trPadding      resw    1
     357
     358    .Host.SysEnter.cs    resq    1
     359    .Host.SysEnter.eip   resq    1
     360    .Host.SysEnter.esp   resq    1
     361    .Host.FSbase         resq    1
     362    .Host.GSbase         resq    1
     363    .Host.efer           resq    1
     364%endif ; 64-bit
     365
     366    ;
     367    ; Hypervisor Context (same as .Guest above).
     368    ;
     369    alignb 64
     370    .Hyper.fpu                resb    512
     371    .Hyper.eax                resq    1
     372    .Hyper.ecx                resq    1
     373    .Hyper.edx                resq    1
     374    .Hyper.ebx                resq    1
     375    .Hyper.esp                resq    1
     376    .Hyper.ebp                resq    1
     377    .Hyper.esi                resq    1
     378    .Hyper.edi                resq    1
     379    .Hyper.r8                 resq    1
     380    .Hyper.r9                 resq    1
     381    .Hyper.r10                resq    1
     382    .Hyper.r11                resq    1
     383    .Hyper.r12                resq    1
     384    .Hyper.r13                resq    1
     385    .Hyper.r14                resq    1
     386    .Hyper.r15                resq    1
     387    .Hyper.es.Sel             resw    1
     388    .Hyper.es.PaddingSel      resw    1
     389    .Hyper.es.ValidSel        resw    1
     390    .Hyper.es.fFlags          resw    1
     391    .Hyper.es.u64Base         resq    1
     392    .Hyper.es.u32Limit        resd    1
     393    .Hyper.es.Attr            resd    1
     394    .Hyper.cs.Sel             resw    1
     395    .Hyper.cs.PaddingSel      resw    1
     396    .Hyper.cs.ValidSel        resw    1
     397    .Hyper.cs.fFlags          resw    1
     398    .Hyper.cs.u64Base         resq    1
     399    .Hyper.cs.u32Limit        resd    1
     400    .Hyper.cs.Attr            resd    1
     401    .Hyper.ss.Sel             resw    1
     402    .Hyper.ss.PaddingSel      resw    1
     403    .Hyper.ss.ValidSel        resw    1
     404    .Hyper.ss.fFlags          resw    1
     405    .Hyper.ss.u64Base         resq    1
     406    .Hyper.ss.u32Limit        resd    1
     407    .Hyper.ss.Attr            resd    1
     408    .Hyper.ds.Sel             resw    1
     409    .Hyper.ds.PaddingSel      resw    1
     410    .Hyper.ds.ValidSel        resw    1
     411    .Hyper.ds.fFlags          resw    1
     412    .Hyper.ds.u64Base         resq    1
     413    .Hyper.ds.u32Limit        resd    1
     414    .Hyper.ds.Attr            resd    1
     415    .Hyper.fs.Sel             resw    1
     416    .Hyper.fs.PaddingSel      resw    1
     417    .Hyper.fs.ValidSel        resw    1
     418    .Hyper.fs.fFlags          resw    1
     419    .Hyper.fs.u64Base         resq    1
     420    .Hyper.fs.u32Limit        resd    1
     421    .Hyper.fs.Attr            resd    1
     422    .Hyper.gs.Sel             resw    1
     423    .Hyper.gs.PaddingSel      resw    1
     424    .Hyper.gs.ValidSel        resw    1
     425    .Hyper.gs.fFlags          resw    1
     426    .Hyper.gs.u64Base         resq    1
     427    .Hyper.gs.u32Limit        resd    1
     428    .Hyper.gs.Attr            resd    1
     429    .Hyper.eip                resq    1
     430    .Hyper.eflags             resq    1
     431    .Hyper.cr0                resq    1
     432    .Hyper.cr2                resq    1
     433    .Hyper.cr3                resq    1
     434    .Hyper.cr4                resq    1
     435    .Hyper.dr                 resq    8
     436    .Hyper.gdtrPadding        resw    3
     437    .Hyper.gdtr               resw    0
     438    .Hyper.gdtr.cbGdt         resw    1
     439    .Hyper.gdtr.pGdt          resq    1
     440    .Hyper.idtrPadding        resw    3
     441    .Hyper.idtr               resw    0
     442    .Hyper.idtr.cbIdt         resw    1
     443    .Hyper.idtr.pIdt          resq    1
     444    .Hyper.ldtr.Sel           resw    1
     445    .Hyper.ldtr.PaddingSel    resw    1
     446    .Hyper.ldtr.ValidSel      resw    1
     447    .Hyper.ldtr.fFlags        resw    1
     448    .Hyper.ldtr.u64Base       resq    1
     449    .Hyper.ldtr.u32Limit      resd    1
     450    .Hyper.ldtr.Attr          resd    1
     451    .Hyper.tr.Sel             resw    1
     452    .Hyper.tr.PaddingSel      resw    1
     453    .Hyper.tr.ValidSel        resw    1
     454    .Hyper.tr.fFlags          resw    1
     455    .Hyper.tr.u64Base         resq    1
     456    .Hyper.tr.u32Limit        resd    1
     457    .Hyper.tr.Attr            resd    1
     458    .Hyper.SysEnter.cs        resb    8
     459    .Hyper.SysEnter.eip       resb    8
     460    .Hyper.SysEnter.esp       resb    8
     461    .Hyper.msrEFER            resb    8
     462    .Hyper.msrSTAR            resb    8
     463    .Hyper.msrPAT             resb    8
     464    .Hyper.msrLSTAR           resb    8
     465    .Hyper.msrCSTAR           resb    8
     466    .Hyper.msrSFMASK          resb    8
     467    .Hyper.msrKERNELGSBASE    resb    8
     468    .Hyper.msrApicBase        resb    8
     469    alignb 64
     470
     471%ifdef VBOX_WITH_CRASHDUMP_MAGIC
     472    .aMagic              resb    56
     473    .uMagic              resq    1
     474%endif
    472475endstruc
    473476
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