1 | /* $Id: PGMMap.cpp 91854 2021-10-20 00:50:11Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * PGM - Page Manager, Guest Context Mappings.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2020 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 | /*********************************************************************************************************************************
|
---|
20 | * Header Files *
|
---|
21 | *********************************************************************************************************************************/
|
---|
22 | #define LOG_GROUP LOG_GROUP_PGM
|
---|
23 | #include <VBox/vmm/pgm.h>
|
---|
24 | #include "PGMInternal.h"
|
---|
25 | #include <VBox/vmm/vm.h>
|
---|
26 |
|
---|
27 | #include <VBox/log.h>
|
---|
28 | #include <iprt/errcore.h>
|
---|
29 |
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * Gets the size of the current guest mappings if they were to be
|
---|
33 | * put next to one another.
|
---|
34 | *
|
---|
35 | * @returns VBox status code.
|
---|
36 | * @param pVM The cross context VM structure.
|
---|
37 | * @param pcb Where to store the size.
|
---|
38 | */
|
---|
39 | VMMR3DECL(int) PGMR3MappingsSize(PVM pVM, uint32_t *pcb)
|
---|
40 | {
|
---|
41 | RT_NOREF(pVM);
|
---|
42 | *pcb = 0;
|
---|
43 | Log(("PGMR3MappingsSize: returns zero\n"));
|
---|
44 | return VINF_SUCCESS;
|
---|
45 | }
|
---|
46 |
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Fixates the guest context mappings in a range reserved from the Guest OS.
|
---|
50 | *
|
---|
51 | * @returns VBox status code.
|
---|
52 | * @param pVM The cross context VM structure.
|
---|
53 | * @param GCPtrBase The address of the reserved range of guest memory.
|
---|
54 | * @param cb The size of the range starting at GCPtrBase.
|
---|
55 | */
|
---|
56 | VMMR3DECL(int) PGMR3MappingsFix(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb)
|
---|
57 | {
|
---|
58 | Log(("PGMR3MappingsFix: GCPtrBase=%RGv cb=%#x\n", GCPtrBase, cb));
|
---|
59 | RT_NOREF(pVM, GCPtrBase, cb);
|
---|
60 | return VINF_SUCCESS;
|
---|
61 | }
|
---|
62 |
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * Unfixes the mappings.
|
---|
66 | *
|
---|
67 | * Unless PGMR3MappingsDisable is in effect, mapping conflict detection will be
|
---|
68 | * enabled after this call. If the mappings are fixed, a full CR3 resync will
|
---|
69 | * take place afterwards.
|
---|
70 | *
|
---|
71 | * @returns VBox status code.
|
---|
72 | * @param pVM The cross context VM structure.
|
---|
73 | */
|
---|
74 | VMMR3DECL(int) PGMR3MappingsUnfix(PVM pVM)
|
---|
75 | {
|
---|
76 | Log(("PGMR3MappingsUnfix:\n"));
|
---|
77 | RT_NOREF(pVM);
|
---|
78 | return VINF_SUCCESS;
|
---|
79 | }
|
---|
80 |
|
---|