1 | /* $Id: HWSVMR0.h 46297 2013-05-28 14:38:48Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * HM SVM (AMD-V) - Internal header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2012 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 | #ifndef ___VMMR0_HWSVMR0_h
|
---|
19 | #define ___VMMR0_HWSVMR0_h
|
---|
20 |
|
---|
21 | #include <VBox/cdefs.h>
|
---|
22 | #include <VBox/types.h>
|
---|
23 | #include <VBox/vmm/em.h>
|
---|
24 | #include <VBox/vmm/stam.h>
|
---|
25 | #include <VBox/dis.h>
|
---|
26 | #include <VBox/vmm/hm.h>
|
---|
27 | #include <VBox/vmm/pgm.h>
|
---|
28 | #include <VBox/vmm/hm_svm.h>
|
---|
29 |
|
---|
30 | RT_C_DECLS_BEGIN
|
---|
31 |
|
---|
32 | /** @defgroup grp_svm_int Internal
|
---|
33 | * @ingroup grp_svm
|
---|
34 | * @internal
|
---|
35 | * @{
|
---|
36 | */
|
---|
37 |
|
---|
38 | #ifdef IN_RING0
|
---|
39 |
|
---|
40 | VMMR0DECL(int) SVMR0GlobalInit(void);
|
---|
41 | VMMR0DECL(void) SVMR0GlobalTerm(void);
|
---|
42 | VMMR0DECL(int) SVMR0Enter(PVM pVM, PVMCPU pVCpu, PHMGLOBLCPUINFO pCpu);
|
---|
43 | VMMR0DECL(int) SVMR0Leave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
|
---|
44 | VMMR0DECL(int) SVMR0EnableCpu(PHMGLOBLCPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS HCPhysCpuPage, bool fEnabledBySystem);
|
---|
45 | VMMR0DECL(int) SVMR0DisableCpu(PHMGLOBLCPUINFO pCpu, void *pvPageCpu, RTHCPHYS pPageCpuPhys);
|
---|
46 | VMMR0DECL(int) SVMR0InitVM(PVM pVM);
|
---|
47 | VMMR0DECL(int) SVMR0TermVM(PVM pVM);
|
---|
48 | VMMR0DECL(int) SVMR0SetupVM(PVM pVM);
|
---|
49 | VMMR0DECL(int) SVMR0RunGuestCode(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
|
---|
50 | VMMR0DECL(int) SVMR0SaveHostState(PVM pVM, PVMCPU pVCpu);
|
---|
51 | VMMR0DECL(int) SVMR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
|
---|
52 |
|
---|
53 | #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
|
---|
54 | DECLASM(int) SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
|
---|
55 | VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
|
---|
56 | uint32_t *paParam);
|
---|
57 | #endif /* HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) */
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * Prepares for and executes VMRUN (32-bit guests).
|
---|
61 | *
|
---|
62 | * @returns VBox status code.
|
---|
63 | * @param pVMCBHostPhys Physical address of host VMCB.
|
---|
64 | * @param pVMCBPhys Physical address of the VMCB.
|
---|
65 | * @param pCtx Pointer to the guest CPU context.
|
---|
66 | * @param pVM Pointer to the VM. (not used)
|
---|
67 | * @param pVCpu Pointer to the VMCPU. (not used)
|
---|
68 | */
|
---|
69 | DECLASM(int) SVMR0VMRun(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
|
---|
70 |
|
---|
71 |
|
---|
72 | /**
|
---|
73 | * Prepares for and executes VMRUN (64-bit guests).
|
---|
74 | *
|
---|
75 | * @returns VBox status code.
|
---|
76 | * @param pVMCBHostPhys Physical address of host VMCB.
|
---|
77 | * @param pVMCBPhys Physical address of the VMCB.
|
---|
78 | * @param pCtx Pointer to the guest CPU context.
|
---|
79 | * @param pVM Pointer to the VM. (not used)
|
---|
80 | * @param pVCpu Pointer to the VMCPU. (not used)
|
---|
81 | */
|
---|
82 | DECLASM(int) SVMR0VMRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
|
---|
83 |
|
---|
84 | /**
|
---|
85 | * Executes INVLPGA.
|
---|
86 | *
|
---|
87 | * @param pPageGC Virtual page to invalidate.
|
---|
88 | * @param u32ASID Tagged TLB id.
|
---|
89 | */
|
---|
90 | DECLASM(void) SVMR0InvlpgA(RTGCPTR pPageGC, uint32_t u32ASID);
|
---|
91 |
|
---|
92 | #endif /* IN_RING0 */
|
---|
93 |
|
---|
94 | /** @} */
|
---|
95 |
|
---|
96 | RT_C_DECLS_END
|
---|
97 |
|
---|
98 | #endif /* !___VMMR0_HWSVMR0_h */
|
---|
99 |
|
---|