Changeset 846 in vbox
- Timestamp:
- Feb 12, 2007 1:18:55 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 18546
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/CSAM.cpp
r760 r846 28 28 #include <VBox/patm.h> 29 29 #include <VBox/csam.h> 30 #include <VBox/cpumdis.h> 30 31 #include <VBox/pgm.h> 31 32 #include <VBox/iom.h> … … 2234 2235 continue; 2235 2236 } 2237 /* OpenBSD guest specific patch test. */ 2236 2238 if (iGate >= 0x20) 2237 2239 { 2238 /* OpenBSD guest specific patch test (3.7 & 3.8) */ 2239 rc = PATMR3InstallPatch(pVM, pHandler - 3, PATMFL_CODE32 | PATMFL_GUEST_SPECIFIC); 2240 if (VBOX_FAILURE(rc)) 2241 /* OpenBSD guest specific patch test (3.9 & 4.0) */ 2242 rc = PATMR3InstallPatch(pVM, pHandler - 0x2B, PATMFL_CODE32 | PATMFL_GUEST_SPECIFIC); 2243 if (VBOX_SUCCESS(rc)) 2244 Log(("Installed OpenBSD interrupt handler prefix instruction (push cs) patch\n")); 2240 PCPUMCTX pCtx; 2241 DISCPUSTATE cpu; 2242 RTGCUINTPTR aOpenBsdPushCSOffset[3] = {0x03, /* OpenBSD 3.7 & 3.8 */ 2243 0x2B, /* OpenBSD 4.0 installation ISO */ 2244 0x2F}; /* OpenBSD 4.0 after install */ 2245 2246 rc = CPUMQueryGuestCtxPtr(pVM, &pCtx); 2247 AssertRC(rc); /* can't fail */ 2248 2249 for (int i=0;i<ELEMENTS(aOpenBsdPushCSOffset);i++) 2250 { 2251 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pHandler - aOpenBsdPushCSOffset[i], &cpu, NULL); 2252 if ( rc == VINF_SUCCESS 2253 && cpu.pCurInstr->opcode == OP_PUSH 2254 && cpu.pCurInstr->param1 == OP_PARM_REG_CS) 2255 { 2256 rc = PATMR3InstallPatch(pVM, pHandler - aOpenBsdPushCSOffset[i], PATMFL_CODE32 | PATMFL_GUEST_SPECIFIC); 2257 if (VBOX_SUCCESS(rc)) 2258 Log(("Installed OpenBSD interrupt handler prefix instruction (push cs) patch\n")); 2259 } 2260 } 2245 2261 } 2246 2262
Note:
See TracChangeset
for help on using the changeset viewer.