VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR0/HMSVMR0.h@ 72816

Last change on this file since 72816 was 72805, checked in by vboxsync, 6 years ago

VMM/HM: bugref:9193 Fixes honoring pending VMCPU_FF_HM_UPDATE_CR3 and VMCPU_FF_HM_UPDATE_PAE_PDPES
before re-entering guest execution with VT-x R0 code.
Avoid a couple of VMWRITES because we already have cache's of the values (CR4 Mask, CR0 mask).
Parameter cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.6 KB
Line 
1/* $Id: HMSVMR0.h 72805 2018-07-03 04:05:43Z vboxsync $ */
2/** @file
3 * HM SVM (AMD-V) - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-2017 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 ___HMSVMR0_h
19#define ___HMSVMR0_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
30RT_C_DECLS_BEGIN
31
32/** @defgroup grp_svm_int Internal
33 * @ingroup grp_svm
34 * @internal
35 * @{
36 */
37
38#ifdef IN_RING0
39
40VMMR0DECL(int) SVMR0GlobalInit(void);
41VMMR0DECL(void) SVMR0GlobalTerm(void);
42VMMR0DECL(int) SVMR0Enter(PVMCPU pVCpu, PHMGLOBALCPUINFO pHostCpu);
43VMMR0DECL(void) SVMR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit);
44VMMR0DECL(int) SVMR0EnableCpu(PHMGLOBALCPUINFO pHostCpu, PVM pVM, void *pvPageCpu, RTHCPHYS HCPhysCpuPage,
45 bool fEnabledBySystem, void *pvArg);
46VMMR0DECL(int) SVMR0DisableCpu(PHMGLOBALCPUINFO pHostCpu, void *pvPageCpu, RTHCPHYS pPageCpuPhys);
47VMMR0DECL(int) SVMR0InitVM(PVM pVM);
48VMMR0DECL(int) SVMR0TermVM(PVM pVM);
49VMMR0DECL(int) SVMR0SetupVM(PVM pVM);
50VMMR0DECL(VBOXSTRICTRC) SVMR0RunGuestCode(PVMCPU pVCpu, PCPUMCTX pCtx);
51VMMR0DECL(int) SVMR0ExportHostState(PVMCPU pVCpu);
52VMMR0DECL(int) SVMR0ImportStateOnDemand(PVMCPU pVCpu, uint64_t fWhat);
53VMMR0DECL(int) SVMR0InvalidatePage(PVMCPU pVCpu, RTGCPTR GCVirt);
54
55#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS)
56DECLASM(int) SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
57VMMR0DECL(int) SVMR0Execute64BitsHandler(PVMCPU pVCpu, HM64ON32OP enmOp, uint32_t cbParam, uint32_t *paParam);
58#endif /* HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) */
59
60/**
61 * Prepares for and executes VMRUN (32-bit guests).
62 *
63 * @returns VBox status code.
64 * @param pVMCBHostPhys Physical address of host VMCB.
65 * @param pVMCBPhys Physical address of the VMCB.
66 * @param pCtx Pointer to the guest CPU context.
67 * @param pVM The cross context VM structure. (Not used.)
68 * @param pVCpu The cross context virtual CPU structure. (Not used.)
69 */
70DECLASM(int) SVMR0VMRun(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
71
72
73/**
74 * Prepares for and executes VMRUN (64-bit guests).
75 *
76 * @returns VBox status code.
77 * @param pVMCBHostPhys Physical address of host VMCB.
78 * @param pVMCBPhys Physical address of the VMCB.
79 * @param pCtx Pointer to the guest CPU context.
80 * @param pVM The cross context VM structure. (Not used.)
81 * @param pVCpu The cross context virtual CPU structure. (Not used.)
82 */
83DECLASM(int) SVMR0VMRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
84
85/**
86 * Executes INVLPGA.
87 *
88 * @param pPageGC Virtual page to invalidate.
89 * @param u32ASID Tagged TLB id.
90 */
91DECLASM(void) SVMR0InvlpgA(RTGCPTR pPageGC, uint32_t u32ASID);
92
93#endif /* IN_RING0 */
94
95/** @} */
96
97RT_C_DECLS_END
98
99#endif /* !___HMSVMR0_h */
100
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