VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/IEMR3.cpp@ 37529

Last change on this file since 37529 was 36788, checked in by vboxsync, 14 years ago

OSE build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/* $Id: IEMR3.cpp 36788 2011-04-21 09:33:24Z vboxsync $ */
2/** @file
3 * IEM - Interpreted Execution Manager.
4 */
5
6/*
7 * Copyright (C) 2011 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#define LOG_GROUP LOG_GROUP_EM
22#include <VBox/vmm/iem.h>
23#include "IEMInternal.h"
24#include <VBox/vmm/vm.h>
25#include <VBox/err.h>
26
27#include <iprt/assert.h>
28
29
30VMMR3DECL(int) IEMR3Init(PVM pVM)
31{
32 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
33 {
34 PVMCPU pVCpu = &pVM->aCpus[idCpu];
35 pVCpu->iem.s.offVM = -RT_OFFSETOF(VM, aCpus[idCpu].iem.s);
36 pVCpu->iem.s.offVMCpu = -RT_OFFSETOF(VMCPU, iem.s);
37 pVCpu->iem.s.pCtxR3 = CPUMQueryGuestCtxPtr(pVCpu);
38 pVCpu->iem.s.pCtxR0 = VM_R0_ADDR(pVM, pVCpu->iem.s.pCtxR3);
39 pVCpu->iem.s.pCtxRC = VM_RC_ADDR(pVM, pVCpu->iem.s.pCtxR3);
40 }
41 return VINF_SUCCESS;
42}
43
44
45VMMR3DECL(int) IEMR3Term(PVM pVM)
46{
47 return VINF_SUCCESS;
48}
49
50
51VMMR3DECL(void) IEMR3Relocate(PVM pVM)
52{
53 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
54 pVM->aCpus[idCpu].iem.s.pCtxRC = VM_RC_ADDR(pVM, pVM->aCpus[idCpu].iem.s.pCtxR3);
55}
56
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette