Changeset 41247 in vbox
- Timestamp:
- May 10, 2012 8:07:11 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpumctx.h
r41218 r41247 27 27 #define ___VBox_vmm_cpumctx_h 28 28 29 #include <iprt/types.h> 30 #include <iprt/x86.h> 29 #ifndef VBOX_FOR_DTRACE_LIB 30 # include <iprt/x86.h> 31 #else 32 # pragma D depends_on library x86.d 33 #endif 31 34 32 35 … … 82 85 */ 83 86 #ifdef VBOX_FOR_DTRACE_LIB 84 # define CPUM_UNION_NAME u87 # define CPUM_UNION_NAME(a_Nm) a_Nm 85 88 #elif defined(VBOX_WITHOUT_UNNAMED_UNIONS) 86 # define CPUM_UNION_NAME u89 # define CPUM_UNION_NAME(a_Nm) a_Nm 87 90 #else 88 # define CPUM_UNION_NAME 91 # define CPUM_UNION_NAME(a_Nm) 89 92 #endif 90 93 … … 103 106 uint32_t edi; 104 107 uint64_t rdi; 105 } CPUM_UNION_NAME ;108 } CPUM_UNION_NAME(rdi); 106 109 union 107 110 { … … 109 112 uint32_t esi; 110 113 uint64_t rsi; 111 } CPUM_UNION_NAME ;114 } CPUM_UNION_NAME(rsi); 112 115 union 113 116 { … … 115 118 uint32_t ebp; 116 119 uint64_t rbp; 117 } CPUM_UNION_NAME ;120 } CPUM_UNION_NAME(rbp); 118 121 union 119 122 { … … 121 124 uint32_t eax; 122 125 uint64_t rax; 123 } CPUM_UNION_NAME ;126 } CPUM_UNION_NAME(rax); 124 127 union 125 128 { … … 127 130 uint32_t ebx; 128 131 uint64_t rbx; 129 } CPUM_UNION_NAME ;132 } CPUM_UNION_NAME(rbx); 130 133 union 131 134 { … … 133 136 uint32_t edx; 134 137 uint64_t rdx; 135 } CPUM_UNION_NAME ;138 } CPUM_UNION_NAME(rdx); 136 139 union 137 140 { … … 139 142 uint32_t ecx; 140 143 uint64_t rcx; 141 } CPUM_UNION_NAME ;144 } CPUM_UNION_NAME(rcx); 142 145 union 143 146 { … … 145 148 uint32_t esp; 146 149 uint64_t rsp; 147 } CPUM_UNION_NAME ;150 } CPUM_UNION_NAME(rsp); 148 151 /* Note: lss esp, [] in the switcher needs some space, so we reserve it here instead of relying on the exact esp & ss layout as before. */ 149 152 uint32_t lss_esp; … … 166 169 X86EFLAGS eflags; 167 170 X86RFLAGS rflags; 168 } CPUM_UNION_NAME ;171 } CPUM_UNION_NAME(rflags); 169 172 union 170 173 { … … 172 175 uint32_t eip; 173 176 uint64_t rip; 174 } CPUM_UNION_NAME ;177 } CPUM_UNION_NAME(rip); 175 178 176 179 uint64_t r8; … … 221 224 uint32_t edi; 222 225 uint64_t rdi; 223 } CPUM_UNION_NAME ;226 } CPUM_UNION_NAME(rdi); 224 227 union 225 228 { … … 228 231 uint32_t esi; 229 232 uint64_t rsi; 230 } CPUM_UNION_NAME ;233 } CPUM_UNION_NAME(rsi); 231 234 union 232 235 { … … 234 237 uint32_t ebp; 235 238 uint64_t rbp; 236 } CPUM_UNION_NAME ;239 } CPUM_UNION_NAME(rbp); 237 240 union 238 241 { … … 241 244 uint32_t eax; 242 245 uint64_t rax; 243 } CPUM_UNION_NAME ;246 } CPUM_UNION_NAME(rax); 244 247 union 245 248 { … … 248 251 uint32_t ebx; 249 252 uint64_t rbx; 250 } CPUM_UNION_NAME ;253 } CPUM_UNION_NAME(rbx); 251 254 union 252 255 { … … 255 258 uint32_t edx; 256 259 uint64_t rdx; 257 } CPUM_UNION_NAME ;260 } CPUM_UNION_NAME(rdx); 258 261 union 259 262 { … … 262 265 uint32_t ecx; 263 266 uint64_t rcx; 264 } CPUM_UNION_NAME ;267 } CPUM_UNION_NAME(rcx); 265 268 union 266 269 { … … 268 271 uint32_t esp; 269 272 uint64_t rsp; 270 } CPUM_UNION_NAME ;273 } CPUM_UNION_NAME(rsp); 271 274 /** @note lss esp, [] in the switcher needs some space, so we reserve it here 272 275 * instead of relying on the exact esp & ss layout as before (prevented … … 291 294 X86EFLAGS eflags; 292 295 X86RFLAGS rflags; 293 } CPUM_UNION_NAME ;296 } CPUM_UNION_NAME(rflags); 294 297 union 295 298 { … … 297 300 uint32_t eip; 298 301 uint64_t rip; 299 } CPUM_UNION_NAME ;302 } CPUM_UNION_NAME(rip); 300 303 301 304 uint64_t r8; … … 423 426 uint32_t edi; 424 427 uint64_t rdi; 425 } CPUM_UNION_NAME ;428 } CPUM_UNION_NAME(rdi); 426 429 union 427 430 { 428 431 uint32_t esi; 429 432 uint64_t rsi; 430 } CPUM_UNION_NAME ;433 } CPUM_UNION_NAME(rsi); 431 434 union 432 435 { 433 436 uint32_t ebp; 434 437 uint64_t rbp; 435 } CPUM_UNION_NAME ;438 } CPUM_UNION_NAME(rbp); 436 439 union 437 440 { 438 441 uint32_t eax; 439 442 uint64_t rax; 440 } CPUM_UNION_NAME ;443 } CPUM_UNION_NAME(rax); 441 444 union 442 445 { 443 446 uint32_t ebx; 444 447 uint64_t rbx; 445 } CPUM_UNION_NAME ;448 } CPUM_UNION_NAME(rbx); 446 449 union 447 450 { 448 451 uint32_t edx; 449 452 uint64_t rdx; 450 } CPUM_UNION_NAME ;453 } CPUM_UNION_NAME(rdx); 451 454 union 452 455 { 453 456 uint32_t ecx; 454 457 uint64_t rcx; 455 } CPUM_UNION_NAME ;458 } CPUM_UNION_NAME(rcx); 456 459 /** @note We rely on the exact layout, because we use lss esp, [] in the 457 460 * switcher. */ … … 477 480 X86EFLAGS eflags; 478 481 X86RFLAGS rflags; 479 } CPUM_UNION_NAME ;482 } CPUM_UNION_NAME(rflags); 480 483 union 481 484 { 482 485 uint32_t eip; 483 486 uint64_t rip; 484 } CPUM_UNION_NAME ;487 } CPUM_UNION_NAME(rip); 485 488 486 489 uint64_t r8; -
trunk/include/VBox/vmm/vm.h
r41218 r41247 27 27 #define ___VBox_vmm_vm_h 28 28 29 #include <VBox/types.h> 30 #include <VBox/vmm/cpum.h> 31 #include <VBox/vmm/stam.h> 32 #include <VBox/vmm/vmapi.h> 33 #include <VBox/vmm/vmm.h> 34 #include <VBox/sup.h> 29 #ifndef VBOX_FOR_DTRACE_LIB 30 # include <VBox/types.h> 31 # include <VBox/vmm/cpum.h> 32 # include <VBox/vmm/stam.h> 33 # include <VBox/vmm/vmapi.h> 34 # include <VBox/vmm/vmm.h> 35 # include <VBox/sup.h> 36 #else 37 # pragma D depends_on library vbox-types.d 38 #endif 39 35 40 36 41 … … 903 908 /** @} */ 904 909 910 #ifndef VBOX_FOR_DTRACE_LIB /** @todo VBoxCPP expression evaluation */ 905 911 #if HC_ARCH_BITS != 64 906 912 /** Padding - the unions must be aligned on a 64 bytes boundary and the unions 907 913 * must start at the same offset on both 64-bit and 32-bit hosts. */ 908 914 uint8_t abAlignment1[HC_ARCH_BITS == 32 ? 32 : 0]; 915 #endif 909 916 #endif 910 917 -
trunk/include/iprt/x86.h
r40222 r41247 29 29 #define ___iprt_x86_h 30 30 31 #include <iprt/types.h> 32 #include <iprt/assert.h> 31 #ifndef VBOX_FOR_DTRACE_LIB 32 # include <iprt/types.h> 33 # include <iprt/assert.h> 34 #else 35 # pragma D depends_on library vbox-types.d 36 #endif 33 37 34 38 /* Workaround for Solaris sys/regset.h defining CS, DS */ … … 1044 1048 #define MSR_K7_PERFCTR3 0xc0010007 1045 1049 1046 #define MSR_K8_HWCR 0xc00100151047 1048 1050 /** K8 LSTAR - Long mode SYSCALL target (RIP). */ 1049 1051 #define MSR_K8_LSTAR 0xc0000082 … … 2310 2312 unsigned u16OffsetHigh : 16; 2311 2313 } X86DESCGATE; 2314 #ifndef VBOX_FOR_DTRACE_LIB 2312 2315 AssertCompileSize(X86DESCGATE, 8); 2316 #endif 2313 2317 /** Pointer to a Call-, Interrupt-, Trap- or Task-gate descriptor entry. */ 2314 2318 typedef X86DESCGATE *PX86DESCGATE; … … 2338 2342 uint64_t u; 2339 2343 } X86DESC; 2344 #ifndef VBOX_FOR_DTRACE_LIB 2340 2345 AssertCompileSize(X86DESC, 8); 2346 #endif 2341 2347 #pragma pack() 2342 2348 /** Pointer to descriptor table entry. */ … … 2496 2502 unsigned u32Reserved : 32; 2497 2503 } X86DESC64GATE; 2504 #ifndef VBOX_FOR_DTRACE_LIB 2498 2505 AssertCompileSize(X86DESC64GATE, 16); 2506 #endif 2499 2507 /** Pointer to a Call-, Interrupt-, Trap- or Task-gate descriptor entry. */ 2500 2508 typedef X86DESC64GATE *PX86DESC64GATE; … … 2525 2533 uint64_t au64[2]; 2526 2534 } X86DESC64; 2535 #ifndef VBOX_FOR_DTRACE_LIB 2527 2536 AssertCompileSize(X86DESC64, 16); 2537 #endif 2528 2538 #pragma pack() 2529 2539 /** Pointer to descriptor table entry. */ … … 2758 2768 RTSEL selLdt; 2759 2769 } X86TSS16; 2770 #ifndef VBOX_FOR_DTRACE_LIB 2760 2771 AssertCompileSize(X86TSS16, 44); 2772 #endif 2761 2773 #pragma pack() 2762 2774 /** Pointer to a 16-bit task segment. */ … … 2885 2897 /** Pointer to a const 64-bit task segment. */ 2886 2898 typedef const X86TSS64 *PCX86TSS64; 2899 #ifndef VBOX_FOR_DTRACE_LIB 2887 2900 AssertCompileSize(X86TSS64, 136); 2901 #endif 2888 2902 2889 2903 /** @} */ … … 3034 3048 #define X86_MODRM_MOD_SMASK UINT8_C(0x03) 3035 3049 #define X86_MODRM_MOD_SHIFT 6 3050 #ifndef VBOX_FOR_DTRACE_LIB 3036 3051 AssertCompile((X86_MODRM_RM_MASK | X86_MODRM_REG_MASK | X86_MODRM_MOD_MASK) == 0xff); 3037 3052 AssertCompile((X86_MODRM_REG_MASK >> X86_MODRM_REG_SHIFT) == X86_MODRM_REG_SMASK); 3038 3053 AssertCompile((X86_MODRM_MOD_MASK >> X86_MODRM_MOD_SHIFT) == X86_MODRM_MOD_SMASK); 3054 #endif 3039 3055 /** @} */ 3040 3056 … … 3048 3064 #define X86_SIB_SCALE_SMASK UINT8_C(0x03) 3049 3065 #define X86_SIB_SCALE_SHIFT 6 3066 #ifndef VBOX_FOR_DTRACE_LIB 3050 3067 AssertCompile((X86_SIB_BASE_MASK | X86_SIB_INDEX_MASK | X86_SIB_SCALE_MASK) == 0xff); 3051 3068 AssertCompile((X86_SIB_INDEX_MASK >> X86_SIB_INDEX_SHIFT) == X86_SIB_INDEX_SMASK); 3052 3069 AssertCompile((X86_SIB_SCALE_MASK >> X86_SIB_SCALE_SHIFT) == X86_SIB_SCALE_SMASK); 3070 #endif 3053 3071 /** @} */ 3054 3072 -
trunk/src/VBox/VMM/Makefile.kmk
r41221 r41247 562 562 563 563 564 if ndef VBOX_ONLY_EXTPACKS565 ifdefined(VBOX_WITH_DTRACE_R3) \566 || defined(VBOX_WITH_DTRACE_R0) \567 || defined(VBOX_WITH_DTRACE_RC)564 if !defined(VBOX_ONLY_EXTPACKS) \ 565 && ( defined(VBOX_WITH_DTRACE_R3) \ 566 || defined(VBOX_WITH_DTRACE_R0) \ 567 || defined(VBOX_WITH_DTRACE_RC)) 568 568 # 569 569 # Install the dtrace library files. 570 570 # 571 571 INSTALLS += VMMLibDTrace 572 VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB) 572 VMMLibDTrace_INST = $(VBOX_INST_DTRACE_LIB)$(KBUILD_TARGET_ARCH)/ 573 573 VMMLibDTrace_SOURCES = \ 574 dtrace/lib/types.d \ 575 dtrace/lib/$(KBUILD_TARGET_ARCH)/types.d=>$(KBUILD_TARGET_ARCH)/types.d \ 576 $(VMMLibDTrace_0_OUTDIR)/vm.d=>$(KBUILD_TARGET_ARCH)/vm.d \ 577 $(VMMLibDTrace_0_OUTDIR)/cpumctx.d=>$(KBUILD_TARGET_ARCH)/cpumctx.d \ 574 dtrace/lib/vbox-types.d \ 575 dtrace/lib/$(KBUILD_TARGET_ARCH)/vbox-arch-types.d \ 576 $(VMMLibDTrace_0_OUTDIR)/vm.d \ 577 $(VMMLibDTrace_0_OUTDIR)/cpumctx.d \ 578 $(VMMLibDTrace_0_OUTDIR)/x86.d \ 578 579 579 580 … … 589 590 -D RT_C_DECLS_BEGIN= \ 590 591 -D RT_C_DECLS_END= \ 592 -D 'RCPTRTYPE(a_Type)=RTRCPTR' \ 593 -D 'R3PTRTYPE(a_Type)=RTR3PTR' \ 594 -D 'R0PTRTYPE(a_Type)=a_Type' \ 595 -D 'AssertCompile(a_Expr)=' \ 596 -D 'AssertCompileSize(a_Stuct, a_Size)=' \ 591 597 $$(addprefix -D ,$$(DEFS) $$(DEFS.$$(KBUILD_TARGET)) $$(DEFS.$(KBUILD_TARGET_ARCH))) $$< $$@ 592 598 endef 593 599 $(evalcall2 def_vmm_lib_dtrace_preprocess,vm.d,$(PATH_ROOT)/include/VBox/vmm/vm.h) 594 600 $(evalcall2 def_vmm_lib_dtrace_preprocess,cpumctx.d,$(PATH_ROOT)/include/VBox/vmm/cpumctx.h) 595 596 endif 601 $(evalcall2 def_vmm_lib_dtrace_preprocess,x86.d,$(PATH_ROOT)/include/iprt/x86.h) 602 597 603 endif 598 604 -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r40377 r41247 2117 2117 if (enmOldState != enmNewState) 2118 2118 { 2119 VBOXVMM_EM_STATE_CHANGED( pVCpu, enmOldState, enmNewState, rc);2119 VBOXVMM_EM_STATE_CHANGED((PVMCPU)VM_R0_ADDR(pVM, pVCpu), enmOldState, enmNewState, rc); 2120 2120 2121 2121 /* Clear MWait flags. */ -
trunk/src/VBox/VMM/dtrace/lib/amd64/vbox-arch-types.d
r41225 r41247 30 30 typedef uint64_t RTHCPTR; 31 31 32 33 34 typedef union RTFLOAT80U 35 { 36 uint16_t au16[5]; 37 } RTFLOAT80U; 38 39 typedef union RTFLOAT80U2 40 { 41 uint16_t au16[5]; 42 } RTFLOAT80U2; 43 44 typedef struct uint128_t 45 { 46 uint64_t au64[2]; 47 } uint128_t; 48 49 -
trunk/src/VBox/VMM/dtrace/lib/vbox-types.d
r41225 r41247 30 30 * These are taken from a variation of VBox and IPRT headers. 31 31 */ 32 #pragma D depends_on library vbox-arch-types.d 32 33 33 typedef uint32_t VMCPUID; 34 typedef uint32_t RTCPUID; 35 typedef struct UVMCPU *PUVMCPU; 36 typedef uintptr_t PVMR3; 37 typedef uint32_t PVMRC; 38 typedef struct VM *PVMR0; 39 typedef uintptr_t RTNATIVETHREAD; 34 typedef uint16_t RTSEL; 35 typedef uint32_t RTRCPTR; 36 typedef uintptr_t RTNATIVETHREAD; 37 typedef struct RTTHREADINT *RTTHREAD; 38 typedef struct RTTRACEBUFINT *RTTRACEBUF; 39 40 41 typedef uint32_t VMSTATE; 42 typedef uint32_t VMCPUID; 43 typedef uint32_t RTCPUID; 44 typedef struct UVMCPU *PUVMCPU; 45 typedef uintptr_t PVMR3; 46 typedef uint32_t PVMRC; 47 typedef struct VM *PVMR0; 48 typedef struct SUPDRVSESSION *PSUPDRVSESSION; 49 typedef struct UVM *PUVM; 50 typedef struct VBOXGDTR 51 { 52 uint16_t cb; 53 uint16_t au16Addr[4]; 54 } VBOXGDTR, VBOXIDTR; 40 55 41 56 typedef struct STAMPROFILEADV
Note:
See TracChangeset
for help on using the changeset viewer.