Changeset 36768 in vbox
- Timestamp:
- Apr 20, 2011 6:33:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.kmk
r35630 r36768 1384 1384 vslick.h: include/VBox/cdefs.h include/iprt/cdefs.h $(MAKEFILE) 1385 1385 $(RM) -f -- $@ [email protected] [email protected] [email protected] 1386 $(APPEND) [email protected] '// autogenerated'1387 1386 @$(APPEND) [email protected] '#define IN_SLICKEDIT ' 1388 1387 @$(APPEND) [email protected] '#define RT_C_DECLS_BEGIN ' … … 1503 1502 @$(APPEND) [email protected] '#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)' 1504 1503 1504 @$(APPEND) [email protected] '#define FNIEMOP_STUB(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; }' 1505 @$(APPEND) [email protected] '#define FNIEMOP_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)' 1506 @$(APPEND) [email protected] '#define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0)' 1507 @$(APPEND) [email protected] '#define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1)' 1508 @$(APPEND) [email protected] '#define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu)' 1509 @$(APPEND) [email protected] '#define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0)' 1510 @$(APPEND) [email protected] '#define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1)' 1511 @$(APPEND) [email protected] '#define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Name0, a_Type1, a_Name1, a_Type2, a_Name2) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1, , a_Type2 a_Name2)' 1512 @$(APPEND) [email protected] '#define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name' 1513 @$(APPEND) [email protected] '#define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name' 1514 @$(APPEND) [email protected] '#define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value' 1515 1505 1516 $(SED) -e '/__cdecl/d' \ 1506 1517 -e '/^ *# *define.*DECL/!d' \ … … 1532 1543 | $(SED_EXT) -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \ 1533 1544 | $(SED_EXT) -e 's/$$/\n/' --output [email protected] 1534 $( MV) -f [email protected] $@1545 $(SED) -e '/#define/s/$$/ \/\/ vbox/' --output $@ [email protected] 1535 1546 $(RM) -f [email protected] [email protected] [email protected] 1536 1547 ifeq ($(KBUILD_HOST),win) -
trunk/include/VBox/vmm/vm.h
r36448 r36768 150 150 } em; 151 151 152 /** IEM part. */ 153 union 154 { 155 #ifdef ___IEMInternal_h 156 struct IEMCPU s; 157 #endif 158 uint8_t padding[1024]; /* multiple of 64 */ 159 } iem; 160 152 161 /** TRPM part. */ 153 162 union … … 205 214 } dbgf; 206 215 207 #if 0208 216 /** Align the following members on page boundary. */ 209 uint8_t abAlignment2[32]; 210 #endif 217 uint8_t abAlignment2[3072]; 211 218 212 219 /** PGM part. */ -
trunk/src/VBox/VMM/Makefile.kmk
r36441 r36768 46 46 endif 47 47 # VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS 48 49 # Special IEM debug mode which compares the result with REM. 50 ifdef IEM_VERIFICATION_MODE 51 VMM_COMMON_DEFS += IEM_VERIFICATION_MODE 52 endif 48 53 49 54 … … 100 105 VMMR3/EMHwaccm.cpp \ 101 106 VMMR3/FTM.cpp \ 107 VMMR3/IEMR3.cpp \ 102 108 VMMR3/IOM.cpp \ 103 109 VMMR3/GMM.cpp \ … … 166 172 VMMAll/EMAllA.asm \ 167 173 VMMAll/FTMAll.cpp \ 174 VMMAll/IEMAll.cpp \ 175 VMMAll/IEMAllAImpl.asm \ 176 VMMAll/IEMAllAImplC.cpp \ 168 177 VMMAll/TMAll.cpp \ 169 178 VMMAll/TMAllCpu.cpp \ … … 570 579 PGMInline.o PGMInline.obj: PGMDbg.o 571 580 581 # Alias the IEM templates to the object in which they are instantiated. 582 IEMInternal.o \ 583 IEMAllInstructions.cpp.o IEMAllInstructions.cpp.obj \ 584 IEMAllCImplStrInstr.cpp.o IEMAllCImplStrInstr.cpp.obj: IEMAll.o 585 -
trunk/src/VBox/VMM/VMMR3/DBGF.cpp
r35466 r36768 244 244 #ifndef RT_OS_L4 245 245 246 # if !defined(DEBUG) || defined(DEBUG_sandervl) || defined(DEBUG_frank) 246 # if !defined(DEBUG) || defined(DEBUG_sandervl) || defined(DEBUG_frank) || defined(IEM_VERIFICATION_MODE) 247 247 int cWait = 10; 248 248 # else -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r36054 r36768 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 54 54 #include <VBox/vmm/hwaccm.h> 55 55 #include <VBox/vmm/patm.h> 56 #ifdef IEM_VERIFICATION_MODE 57 # include <VBox/vmm/iem.h> 58 #endif 56 59 #include "EMInternal.h" 57 60 #include "internal/em.h" … … 1057 1060 EMSTATE emR3Reschedule(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx) 1058 1061 { 1062 #ifdef IEM_VERIFICATION_MODE 1063 return EMSTATE_REM; 1064 #else 1065 1059 1066 /* 1060 1067 * When forcing raw-mode execution, things are simple. … … 1102 1109 } 1103 1110 1104 # ifndef VBOX_RAW_V861111 # ifndef VBOX_RAW_V86 1105 1112 if (EFlags.u32 & X86_EFL_VM) { 1106 1113 Log2(("raw mode refused: VM_MASK\n")); 1107 1114 return EMSTATE_REM; 1108 1115 } 1109 # endif1116 # endif 1110 1117 1111 1118 /** @todo check up the X86_CR0_AM flag in respect to raw mode!!! We're probably not emulating it right! */ … … 1179 1186 } 1180 1187 1181 # if !defined(VBOX_ALLOW_IF0) && !defined(VBOX_RUN_INTERRUPT_GATE_HANDLERS)1188 # if !defined(VBOX_ALLOW_IF0) && !defined(VBOX_RUN_INTERRUPT_GATE_HANDLERS) 1182 1189 if (!(EFlags.u32 & X86_EFL_IF)) 1183 1190 { … … 1186 1193 return EMSTATE_REM; 1187 1194 } 1188 # endif1195 # endif 1189 1196 1190 1197 /** @todo still necessary??? */ … … 1198 1205 Assert(PGMPhysIsA20Enabled(pVCpu)); 1199 1206 return EMSTATE_RAW; 1207 #endif /* !IEM_VERIFICATION_MODE */ 1208 1200 1209 } 1201 1210 … … 1986 1995 */ 1987 1996 case EMSTATE_RAW: 1997 #ifdef IEM_VERIFICATION_MODE /* remove later */ 1998 AssertFailed(); 1999 #endif 1988 2000 rc = emR3RawExecute(pVM, pVCpu, &fFFDone); 1989 2001 break; … … 1993 2005 */ 1994 2006 case EMSTATE_HWACC: 2007 #ifdef IEM_VERIFICATION_MODE /* remove later */ 2008 AssertFailed(); 2009 #endif 1995 2010 rc = emR3HwAccExecute(pVM, pVCpu, &fFFDone); 1996 2011 break; … … 2000 2015 */ 2001 2016 case EMSTATE_REM: 2017 #ifdef IEM_VERIFICATION_MODE 2018 rc = VBOXSTRICTRC_TODO(IEMExecOne(pVCpu)); fFFDone = false; 2019 #else 2002 2020 rc = emR3RemExecute(pVM, pVCpu, &fFFDone); 2021 #endif 2003 2022 Log2(("EMR3ExecuteVM: emR3RemExecute -> %Rrc\n", rc)); 2004 2023 break; -
trunk/src/VBox/VMM/VMMR3/VM.cpp
r36441 r36768 55 55 #include <VBox/vmm/pdmcritsect.h> 56 56 #include <VBox/vmm/em.h> 57 #include <VBox/vmm/iem.h> 57 58 #include <VBox/vmm/rem.h> 58 59 #include <VBox/vmm/tm.h> … … 926 927 if (RT_SUCCESS(rc)) 927 928 { 928 rc = DBGFR3Init(pVM);929 rc = IEMR3Init(pVM); 929 930 if (RT_SUCCESS(rc)) 930 931 { 931 rc = PDMR3Init(pVM);932 rc = DBGFR3Init(pVM); 932 933 if (RT_SUCCESS(rc)) 933 934 { 934 rc = PGMR3InitDynMap(pVM); 935 if (RT_SUCCESS(rc)) 936 rc = MMR3HyperInitFinalize(pVM); 937 if (RT_SUCCESS(rc)) 938 rc = PATMR3InitFinalize(pVM); 939 if (RT_SUCCESS(rc)) 940 rc = PGMR3InitFinalize(pVM); 941 if (RT_SUCCESS(rc)) 942 rc = SELMR3InitFinalize(pVM); 943 if (RT_SUCCESS(rc)) 944 rc = TMR3InitFinalize(pVM); 945 if (RT_SUCCESS(rc)) 946 rc = REMR3InitFinalize(pVM); 947 if (RT_SUCCESS(rc)) 948 rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3); 935 rc = PDMR3Init(pVM); 949 936 if (RT_SUCCESS(rc)) 950 937 { 951 LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS)); 952 return VINF_SUCCESS; 938 rc = PGMR3InitDynMap(pVM); 939 if (RT_SUCCESS(rc)) 940 rc = MMR3HyperInitFinalize(pVM); 941 if (RT_SUCCESS(rc)) 942 rc = PATMR3InitFinalize(pVM); 943 if (RT_SUCCESS(rc)) 944 rc = PGMR3InitFinalize(pVM); 945 if (RT_SUCCESS(rc)) 946 rc = SELMR3InitFinalize(pVM); 947 if (RT_SUCCESS(rc)) 948 rc = TMR3InitFinalize(pVM); 949 if (RT_SUCCESS(rc)) 950 rc = REMR3InitFinalize(pVM); 951 if (RT_SUCCESS(rc)) 952 rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3); 953 if (RT_SUCCESS(rc)) 954 { 955 LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS)); 956 return VINF_SUCCESS; 957 } 958 959 int rc2 = PDMR3Term(pVM); 960 AssertRC(rc2); 953 961 } 954 int rc2 = PDMR3Term(pVM);962 int rc2 = DBGFR3Term(pVM); 955 963 AssertRC(rc2); 956 964 } 957 int rc2 = DBGFR3Term(pVM);965 int rc2 = IEMR3Term(pVM); 958 966 AssertRC(rc2); 959 967 } … … 1157 1165 EMR3Relocate(pVM); 1158 1166 TMR3Relocate(pVM, offDelta); 1167 IEMR3Relocate(pVM); 1159 1168 DBGFR3Relocate(pVM, offDelta); 1160 1169 PDMR3Relocate(pVM, offDelta); … … 2394 2403 rc = PDMR3Term(pVM); 2395 2404 AssertRC(rc); 2405 rc = IEMR3Term(pVM); 2406 AssertRC(rc); 2396 2407 rc = EMR3Term(pVM); 2397 2408 AssertRC(rc); -
trunk/src/VBox/VMM/testcase/Makefile.kmk
r35346 r36768 43 43 tstCompiler \ 44 44 tstVMMR0CallHost-1 \ 45 tstVMMR0CallHost-2 45 tstVMMR0CallHost-2 \ 46 tstX86-1 46 47 ifneq ($(KBUILD_TARGET),l4) 47 48 PROGRAMS += tstAnimate … … 232 233 tstCompiler_SOURCES = tstCompiler.cpp 233 234 tstCompiler_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME) 235 236 tstX86-1_TEMPLATE = VBOXR3TSTEXE 237 tstX86-1_SOURCES = tstX86-1.cpp tstX86-1A.asm 238 tstX86-1_LIBS = $(LIB_RUNTIME) 234 239 235 240 ifdef VBOX_WITH_RAW_MODE -
trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp
r36669 r36768 77 77 #include "CSAMInternal.h" 78 78 #include "EMInternal.h" 79 #include "IEMInternal.h" 79 80 #include "REMInternal.h" 80 81 #include <VBox/vmm/vm.h> … … 150 151 GEN_CHECK_OFF(EMCPU, pStatsRC); 151 152 GEN_CHECK_OFF(EMCPU, pCliStatTree); 153 154 GEN_CHECK_SIZE(IEMCPU); 155 GEN_CHECK_OFF(IEMCPU, pCtxR0); 156 GEN_CHECK_OFF(IEMCPU, pCtxR3); 157 GEN_CHECK_OFF(IEMCPU, pCtxRC); 158 GEN_CHECK_OFF(IEMCPU, offVM); 159 GEN_CHECK_OFF(IEMCPU, offVMCpu); 160 GEN_CHECK_OFF(IEMCPU, enmCpuMode); 161 GEN_CHECK_OFF(IEMCPU, fPrefixes); 162 GEN_CHECK_OFF(IEMCPU, abOpcode); 163 GEN_CHECK_OFF(IEMCPU, cActiveMappings); 164 GEN_CHECK_OFF(IEMCPU, iNextMapping); 165 GEN_CHECK_OFF(IEMCPU, aMemMappings); 166 GEN_CHECK_OFF(IEMCPU, aMemMappings[1]); 167 GEN_CHECK_OFF(IEMCPU, aBounceBuffers); 168 GEN_CHECK_OFF(IEMCPU, aBounceBuffers[1]); 169 GEN_CHECK_OFF(IEMCPU, aMemBbMappings); 170 GEN_CHECK_OFF(IEMCPU, aMemBbMappings[1]); 152 171 153 172 GEN_CHECK_SIZE(IOM); -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r35346 r36768 49 49 #include "CSAMInternal.h" 50 50 #include "EMInternal.h" 51 #include "IEMInternal.h" 51 52 #include "REMInternal.h" 52 53 #include "../VMMR0/GMMR0Internal.h" … … 211 212 CHECK_PADDING_VM(64, csam); 212 213 CHECK_PADDING_VM(64, em); 214 /*CHECK_PADDING_VM(64, iem);*/ 213 215 CHECK_PADDING_VM(64, tm); 214 216 CHECK_PADDING_VM(64, dbgf); … … 222 224 CHECK_PADDING_VMCPU(64, hwaccm); 223 225 CHECK_PADDING_VMCPU(64, em); 226 CHECK_PADDING_VMCPU(64, iem); 224 227 CHECK_PADDING_VMCPU(64, trpm); 225 228 CHECK_PADDING_VMCPU(64, tm); -
trunk/src/recompiler/Makefile.kmk
r36140 r36768 65 65 #VBoxRemPrimary_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 66 66 #VBoxRemPrimary_DEFS += DEBUG_TMP_LOGGING # log qemu parts to "/tmp/vbox-qemu.log" - does not work with VBoxREM2. 67 ifdef IEM_VERIFICATION_MODE 68 VBoxRemPrimary_DEFS += IEM_VERIFICATION_MODE 69 endif 67 70 VBoxRemPrimary_DEFS.linux = _GNU_SOURCE 68 71 ifdef VBOX_SOLARIS_10 -
trunk/src/recompiler/cpu-exec.c
r36175 r36768 358 358 /* Clear CPU_INTERRUPT_SINGLE_INSTR and leave CPU_INTERRUPT_SINGLE_INSTR_IN_FLIGHT set. */ 359 359 ASMAtomicAndS32((int32_t volatile *)&env->interrupt_request, ~CPU_INTERRUPT_SINGLE_INSTR); 360 #ifdef IEM_VERIFICATION_MODE 361 env->exception_index = ret = EXCP_SINGLE_INSTR; 362 cpu_loop_exit(); 363 #endif 360 364 } 361 365
Note:
See TracChangeset
for help on using the changeset viewer.