VirtualBox

source: vbox/trunk/include/VBox/vmm/pgm.h@ 93596

Last change on this file since 93596 was 93596, checked in by vboxsync, 3 years ago

VMM/PGM: Init HCPhysZeroPg and HCPhysMmioPg in ring-0 and forget MMR3HyperHCVirt2HCPhys. bugref:10093

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 51.9 KB
Line 
1/** @file
2 * PGM - Page Monitor / Monitor.
3 */
4
5/*
6 * Copyright (C) 2006-2022 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef VBOX_INCLUDED_vmm_pgm_h
27#define VBOX_INCLUDED_vmm_pgm_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <VBox/types.h>
33#include <VBox/sup.h>
34#include <VBox/vmm/vmapi.h>
35#include <VBox/vmm/gmm.h> /* for PGMMREGISTERSHAREDMODULEREQ */
36#include <VBox/vmm/hm_vmx.h>
37#include <iprt/x86.h>
38#include <VBox/param.h>
39
40RT_C_DECLS_BEGIN
41
42/** @defgroup grp_pgm The Page Monitor / Manager API
43 * @ingroup grp_vmm
44 * @{
45 */
46
47/**
48 * FNPGMRELOCATE callback mode.
49 */
50typedef enum PGMRELOCATECALL
51{
52 /** The callback is for checking if the suggested address is suitable. */
53 PGMRELOCATECALL_SUGGEST = 1,
54 /** The callback is for executing the relocation. */
55 PGMRELOCATECALL_RELOCATE
56} PGMRELOCATECALL;
57
58
59/**
60 * Callback function which will be called when PGM is trying to find
61 * a new location for the mapping.
62 *
63 * The callback is called in two modes, 1) the check mode and 2) the relocate mode.
64 * In 1) the callback should say if it objects to a suggested new location. If it
65 * accepts the new location, it is called again for doing it's relocation.
66 *
67 *
68 * @returns true if the location is ok.
69 * @returns false if another location should be found.
70 * @param pVM The cross context VM structure.
71 * @param GCPtrOld The old virtual address.
72 * @param GCPtrNew The new virtual address.
73 * @param enmMode Used to indicate the callback mode.
74 * @param pvUser User argument.
75 * @remark The return value is no a failure indicator, it's an acceptance
76 * indicator. Relocation can not fail!
77 */
78typedef DECLCALLBACKTYPE(bool, FNPGMRELOCATE,(PVM pVM, RTGCPTR GCPtrOld, RTGCPTR GCPtrNew, PGMRELOCATECALL enmMode, void *pvUser));
79/** Pointer to a relocation callback function. */
80typedef FNPGMRELOCATE *PFNPGMRELOCATE;
81
82
83/**
84 * Memory access origin.
85 */
86typedef enum PGMACCESSORIGIN
87{
88 /** Invalid zero value. */
89 PGMACCESSORIGIN_INVALID = 0,
90 /** IEM is access memory. */
91 PGMACCESSORIGIN_IEM,
92 /** HM is access memory. */
93 PGMACCESSORIGIN_HM,
94 /** Some device is access memory. */
95 PGMACCESSORIGIN_DEVICE,
96 /** Someone debugging is access memory. */
97 PGMACCESSORIGIN_DEBUGGER,
98 /** SELM is access memory. */
99 PGMACCESSORIGIN_SELM,
100 /** FTM is access memory. */
101 PGMACCESSORIGIN_FTM,
102 /** REM is access memory. */
103 PGMACCESSORIGIN_REM,
104 /** IOM is access memory. */
105 PGMACCESSORIGIN_IOM,
106 /** End of valid values. */
107 PGMACCESSORIGIN_END,
108 /** Type size hack. */
109 PGMACCESSORIGIN_32BIT_HACK = 0x7fffffff
110} PGMACCESSORIGIN;
111
112
113/**
114 * Physical page access handler kind.
115 */
116typedef enum PGMPHYSHANDLERKIND
117{
118 /** MMIO range. Pages are not present, all access is done in interpreter or recompiler. */
119 PGMPHYSHANDLERKIND_MMIO = 1,
120 /** Handler all write access to a physical page range. */
121 PGMPHYSHANDLERKIND_WRITE,
122 /** Handler all access to a physical page range. */
123 PGMPHYSHANDLERKIND_ALL
124
125} PGMPHYSHANDLERKIND;
126
127/**
128 * Guest Access type
129 */
130typedef enum PGMACCESSTYPE
131{
132 /** Read access. */
133 PGMACCESSTYPE_READ = 1,
134 /** Write access. */
135 PGMACCESSTYPE_WRITE
136} PGMACCESSTYPE;
137
138
139/** @def PGM_ALL_CB_DECL
140 * Macro for declaring a handler callback for all contexts. The handler
141 * callback is static in ring-3, and exported in RC and R0.
142 * @sa PGM_ALL_CB2_DECL.
143 */
144#if defined(IN_RC) || defined(IN_RING0)
145# ifdef __cplusplus
146# define PGM_ALL_CB_DECL(type) extern "C" DECLCALLBACK(DECLEXPORT(type))
147# else
148# define PGM_ALL_CB_DECL(type) DECLCALLBACK(DECLEXPORT(type))
149# endif
150#else
151# define PGM_ALL_CB_DECL(type) static DECLCALLBACK(type)
152#endif
153
154/** @def PGM_ALL_CB2_DECL
155 * Macro for declaring a handler callback for all contexts. The handler
156 * callback is hidden in ring-3, and exported in RC and R0.
157 * @sa PGM_ALL_CB2_DECL.
158 */
159#if defined(IN_RC) || defined(IN_RING0)
160# ifdef __cplusplus
161# define PGM_ALL_CB2_DECL(type) extern "C" DECLCALLBACK(DECLEXPORT(type))
162# else
163# define PGM_ALL_CB2_DECL(type) DECLCALLBACK(DECLEXPORT(type))
164# endif
165#else
166# define PGM_ALL_CB2_DECL(type) DECL_HIDDEN_CALLBACK(type)
167#endif
168
169/** @def PGM_ALL_CB2_PROTO
170 * Macro for declaring a handler callback for all contexts. The handler
171 * callback is hidden in ring-3, and exported in RC and R0.
172 * @param fnType The callback function type.
173 * @sa PGM_ALL_CB2_DECL.
174 */
175#if defined(IN_RC) || defined(IN_RING0)
176# ifdef __cplusplus
177# define PGM_ALL_CB2_PROTO(fnType) extern "C" DECLEXPORT(fnType)
178# else
179# define PGM_ALL_CB2_PROTO(fnType) DECLEXPORT(fnType)
180# endif
181#else
182# define PGM_ALL_CB2_PROTO(fnType) DECLHIDDEN(fnType)
183#endif
184
185
186/**
187 * \#PF Handler callback for physical access handler ranges in RC and R0.
188 *
189 * @returns Strict VBox status code (appropriate for ring-0 and raw-mode).
190 * @param pVM The cross context VM structure.
191 * @param pVCpu The cross context virtual CPU structure of the calling EMT.
192 * @param uErrorCode CPU Error code.
193 * @param pRegFrame Trap register frame.
194 * NULL on DMA and other non CPU access.
195 * @param pvFault The fault address (cr2).
196 * @param GCPhysFault The GC physical address corresponding to pvFault.
197 * @param pvUser User argument.
198 * @thread EMT(pVCpu)
199 */
200typedef DECLCALLBACKTYPE(VBOXSTRICTRC, FNPGMRZPHYSPFHANDLER,(PVMCC pVM, PVMCPUCC pVCpu, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame,
201 RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser));
202/** Pointer to PGM access callback. */
203typedef FNPGMRZPHYSPFHANDLER *PFNPGMRZPHYSPFHANDLER;
204
205
206/**
207 * Access handler callback for physical access handler ranges.
208 *
209 * The handler can not raise any faults, it's mainly for monitoring write access
210 * to certain pages (like MMIO).
211 *
212 * @returns Strict VBox status code in ring-0 and raw-mode context, in ring-3
213 * the only supported informational status code is
214 * VINF_PGM_HANDLER_DO_DEFAULT.
215 * @retval VINF_SUCCESS if the handler have carried out the operation.
216 * @retval VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the
217 * access operation.
218 * @retval VINF_EM_XXX in ring-0 and raw-mode context.
219 *
220 * @param pVM The cross context VM structure.
221 * @param pVCpu The cross context virtual CPU structure of the calling EMT.
222 * @param GCPhys The physical address the guest is writing to.
223 * @param pvPhys The HC mapping of that address.
224 * @param pvBuf What the guest is reading/writing.
225 * @param cbBuf How much it's reading/writing.
226 * @param enmAccessType The access type.
227 * @param enmOrigin The origin of this call.
228 * @param pvUser User argument.
229 * @thread EMT(pVCpu)
230 */
231typedef DECLCALLBACKTYPE(VBOXSTRICTRC, FNPGMPHYSHANDLER,(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, void *pvPhys,
232 void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType,
233 PGMACCESSORIGIN enmOrigin, void *pvUser));
234/** Pointer to PGM access callback. */
235typedef FNPGMPHYSHANDLER *PFNPGMPHYSHANDLER;
236
237
238/**
239 * Paging mode.
240 *
241 * @note Part of saved state. Change with extreme care.
242 */
243typedef enum PGMMODE
244{
245 /** The usual invalid value. */
246 PGMMODE_INVALID = 0,
247 /** Real mode. */
248 PGMMODE_REAL,
249 /** Protected mode, no paging. */
250 PGMMODE_PROTECTED,
251 /** 32-bit paging. */
252 PGMMODE_32_BIT,
253 /** PAE paging. */
254 PGMMODE_PAE,
255 /** PAE paging with NX enabled. */
256 PGMMODE_PAE_NX,
257 /** 64-bit AMD paging (long mode). */
258 PGMMODE_AMD64,
259 /** 64-bit AMD paging (long mode) with NX enabled. */
260 PGMMODE_AMD64_NX,
261 /** 32-bit nested paging mode (shadow only; guest physical to host physical). */
262 PGMMODE_NESTED_32BIT,
263 /** PAE nested paging mode (shadow only; guest physical to host physical). */
264 PGMMODE_NESTED_PAE,
265 /** AMD64 nested paging mode (shadow only; guest physical to host physical). */
266 PGMMODE_NESTED_AMD64,
267 /** Extended paging (Intel) mode. */
268 PGMMODE_EPT,
269 /** Special mode used by NEM to indicate no shadow paging necessary. */
270 PGMMODE_NONE,
271 /** The max number of modes */
272 PGMMODE_MAX,
273 /** 32bit hackishness. */
274 PGMMODE_32BIT_HACK = 0x7fffffff
275} PGMMODE;
276
277/**
278 * Second level address translation (SLAT) mode.
279 */
280typedef enum PGMSLAT
281{
282 /** The usual invalid value. */
283 PGMSLAT_INVALID = 0,
284 /** No second level translation. */
285 PGMSLAT_DIRECT,
286 /** Intel Extended Page Tables (EPT). */
287 PGMSLAT_EPT,
288 /** AMD-V Nested Paging 32-bit. */
289 PGMSLAT_32BIT,
290 /** AMD-V Nested Paging PAE. */
291 PGMSLAT_PAE,
292 /** AMD-V Nested Paging 64-bit. */
293 PGMSLAT_AMD64,
294 /** 32bit hackishness. */
295 PGMSLAT_32BIT_HACK = 0x7fffffff
296} PGMSLAT;
297
298
299/** @name PGMPTWALK::fFailed flags.
300 * These flags indicate the type of a page-walk failure.
301 * @{
302 */
303typedef uint32_t PGMWALKFAIL;
304/** Regular page fault (MBZ since guest Walk code don't set these explicitly). */
305#define PGM_WALKFAIL_PAGE_FAULT UINT32_C(0)
306/** EPT violation - Intel. */
307#define PGM_WALKFAIL_EPT_VIOLATION RT_BIT_32(0)
308/** EPT violation, convertible to \#VE exception - Intel. */
309#define PGM_WALKFAIL_EPT_VIOLATION_CONVERTIBLE RT_BIT_32(1)
310/** EPT misconfiguration - Intel. */
311#define PGM_WALKFAIL_EPT_MISCONFIG RT_BIT_32(2)
312
313/** Mask of all EPT induced page-walk failures - Intel. */
314#define PGM_WALKFAIL_EPT ( PGM_WALKFAIL_EPT_VIOLATION \
315 | PGM_WALKFAIL_EPT_VIOLATION_CONVERTIBLE \
316 | PGM_WALKFAIL_EPT_MISCONFIG)
317/** @} */
318
319
320/** @name PGMPTATTRS - PGM page-table attributes.
321 *
322 * This is VirtualBox's combined page table attributes. It combines regular page
323 * table and Intel EPT attributes. It's 64-bit in size so there's ample room for
324 * bits added in the future to EPT or regular page tables (for e.g. Protection Key).
325 *
326 * The following bits map 1:1 (shifted by PGM_PTATTRS_EPT_SHIFT) to the Intel EPT
327 * attributes as these are unique to EPT and fit within 64-bits despite the shift:
328 * - EPT_R : Read access.
329 * - EPT_W : Write access.
330 * - EPT_X_SUPER : Execute or execute for supervisor-mode linear addr access.
331 * - EPT_MEMTYPE : EPT memory type.
332 * - EPT_IGNORE_PAT: Ignore PAT memory type.
333 * - EPT_X_USER : Execute access for user-mode linear addresses.
334 *
335 * For regular page tables, the R bit is always 1 (same as P bit).
336 * For Intel EPT, the EPT_R and EPT_W bits are copied to R and W bits respectively.
337 *
338 * The following EPT attributes are mapped to the following positions because they
339 * exist in the regular page tables at these positions OR are exclusive to EPT and
340 * have been mapped to arbitrarily chosen positions:
341 * - EPT_A : Accessed (EPT bit 8 maps to bit 5).
342 * - EPT_D : Dirty (EPT bit 9 maps to bit 6).
343 * - EPT_SUPER_SHW_STACK : Supervisor Shadow Stack (EPT bit 60 maps to bit 24).
344 * - EPT_SUPPRESS_VE_XCPT: Suppress \#VE exception (EPT bit 63 maps to bit 25).
345 *
346 * Bits 12, 11:9 and 43 are deliberately kept unused (correspond to bit PS and bits
347 * 11:9 in the regular page-table structures and to bit 11 in the EPT structures
348 * respectively) as bit 12 is the page-size bit and bits 11:9 are reserved for
349 * use by software and we may want to use/preserve them in the future.
350 *
351 * @{ */
352typedef uint64_t PGMPTATTRS;
353/** Pointer to a PGMPTATTRS type. */
354typedef PGMPTATTRS *PPGMPTATTRS;
355
356/** Read bit (always 1 for regular PT, copy of EPT_R for EPT). */
357#define PGM_PTATTRS_R_SHIFT 0
358#define PGM_PTATTRS_R_MASK RT_BIT_64(PGM_PTATTRS_R_SHIFT)
359/** Write access bit (aka read/write bit for regular PT). */
360#define PGM_PTATTRS_W_SHIFT 1
361#define PGM_PTATTRS_W_MASK RT_BIT_64(PGM_PTATTRS_W_SHIFT)
362/** User-mode access bit. */
363#define PGM_PTATTRS_US_SHIFT 2
364#define PGM_PTATTRS_US_MASK RT_BIT_64(PGM_PTATTRS_US_SHIFT)
365/** Write through cache bit. */
366#define PGM_PTATTRS_PWT_SHIFT 3
367#define PGM_PTATTRS_PWT_MASK RT_BIT_64(PGM_PTATTRS_PWT_SHIFT)
368/** Cache disabled bit. */
369#define PGM_PTATTRS_PCD_SHIFT 4
370#define PGM_PTATTRS_PCD_MASK RT_BIT_64(PGM_PTATTRS_PCD_SHIFT)
371/** Accessed bit. */
372#define PGM_PTATTRS_A_SHIFT 5
373#define PGM_PTATTRS_A_MASK RT_BIT_64(PGM_PTATTRS_A_SHIFT)
374/** Dirty bit. */
375#define PGM_PTATTRS_D_SHIFT 6
376#define PGM_PTATTRS_D_MASK RT_BIT_64(PGM_PTATTRS_D_SHIFT)
377/** The PAT bit. */
378#define PGM_PTATTRS_PAT_SHIFT 7
379#define PGM_PTATTRS_PAT_MASK RT_BIT_64(PGM_PTATTRS_PAT_SHIFT)
380/** The global bit. */
381#define PGM_PTATTRS_G_SHIFT 8
382#define PGM_PTATTRS_G_MASK RT_BIT_64(PGM_PTATTRS_G_SHIFT)
383/** Reserved (bits 12:9) unused. */
384#define PGM_PTATTRS_RSVD_12_9_SHIFT 9
385#define PGM_PTATTRS_RSVD_12_9_MASK UINT64_C(0x0000000000001e00)
386/** Read access bit - EPT only. */
387#define PGM_PTATTRS_EPT_R_SHIFT 13
388#define PGM_PTATTRS_EPT_R_MASK RT_BIT_64(PGM_PTATTRS_EPT_R_SHIFT)
389/** Write access bit - EPT only. */
390#define PGM_PTATTRS_EPT_W_SHIFT 14
391#define PGM_PTATTRS_EPT_W_MASK RT_BIT_64(PGM_PTATTRS_EPT_W_SHIFT)
392/** Execute or execute access for supervisor-mode linear addresses - EPT only. */
393#define PGM_PTATTRS_EPT_X_SUPER_SHIFT 15
394#define PGM_PTATTRS_EPT_X_SUPER_MASK RT_BIT_64(PGM_PTATTRS_EPT_X_SUPER_SHIFT)
395/** EPT memory type - EPT only. */
396#define PGM_PTATTRS_EPT_MEMTYPE_SHIFT 16
397#define PGM_PTATTRS_EPT_MEMTYPE_MASK UINT64_C(0x0000000000070000)
398/** Ignore PAT memory type - EPT only. */
399#define PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT 19
400#define PGM_PTATTRS_EPT_IGNORE_PAT_MASK RT_BIT_64(PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT)
401/** Reserved (bits 22:20) unused. */
402#define PGM_PTATTRS_RSVD_22_20_SHIFT 20
403#define PGM_PTATTRS_RSVD_22_20_MASK UINT64_C(0x0000000000700000)
404/** Execute access for user-mode linear addresses - EPT only. */
405#define PGM_PTATTRS_EPT_X_USER_SHIFT 23
406#define PGM_PTATTRS_EPT_X_USER_MASK RT_BIT_64(PGM_PTATTRS_EPT_X_USER_SHIFT)
407/** Reserved (bit 23) - unused. */
408#define PGM_PTATTRS_RSVD_23_SHIFT 24
409#define PGM_PTATTRS_RSVD_23_MASK UINT64_C(0x0000000001000000)
410/** Supervisor shadow stack - EPT only. */
411#define PGM_PTATTRS_EPT_SUPER_SHW_STACK_SHIFT 25
412#define PGM_PTATTRS_EPT_SUPER_SHW_STACK_MASK RT_BIT_64(PGM_PTATTRS_EPT_SUPER_SHW_STACK_SHIFT)
413/** Suppress \#VE exception - EPT only. */
414#define PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_SHIFT 26
415#define PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_MASK RT_BIT_64(PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_SHIFT)
416/** Reserved (bits 62:27) - unused. */
417#define PGM_PTATTRS_RSVD_62_27_SHIFT 27
418#define PGM_PTATTRS_RSVD_62_27_MASK UINT64_C(0x7ffffffff8000000)
419/** No-execute bit. */
420#define PGM_PTATTRS_NX_SHIFT 63
421#define PGM_PTATTRS_NX_MASK RT_BIT_64(PGM_PTATTRS_NX_SHIFT)
422
423RT_BF_ASSERT_COMPILE_CHECKS(PGM_PTATTRS_, UINT64_C(0), UINT64_MAX,
424 (R, W, US, PWT, PCD, A, D, PAT, G, RSVD_12_9, EPT_R, EPT_W, EPT_X_SUPER, EPT_MEMTYPE, EPT_IGNORE_PAT,
425 RSVD_22_20, EPT_X_USER, RSVD_23, EPT_SUPER_SHW_STACK, EPT_SUPPRESS_VE_XCPT, RSVD_62_27, NX));
426
427/** The bit position where the EPT specific attributes begin. */
428#define PGM_PTATTRS_EPT_SHIFT PGM_PTATTRS_EPT_R_SHIFT
429/** The mask of EPT bits (bits 26:ATTR_SHIFT). In the future we might choose to
430 * use higher unused bits for something else, in that case adjust this mask. */
431#define PGM_PTATTRS_EPT_MASK UINT64_C(0x0000000007ffe000)
432
433/** The mask of all PGM page attribute bits for regular page-tables. */
434#define PGM_PTATTRS_PT_VALID_MASK ( PGM_PTATTRS_R_MASK \
435 | PGM_PTATTRS_W_MASK \
436 | PGM_PTATTRS_US_MASK \
437 | PGM_PTATTRS_PWT_MASK \
438 | PGM_PTATTRS_PCD_MASK \
439 | PGM_PTATTRS_A_MASK \
440 | PGM_PTATTRS_D_MASK \
441 | PGM_PTATTRS_PAT_MASK \
442 | PGM_PTATTRS_G_MASK \
443 | PGM_PTATTRS_NX_MASK)
444
445/** The mask of all PGM page attribute bits for EPT. */
446#define PGM_PTATTRS_EPT_VALID_MASK ( PGM_PTATTRS_R_MASK \
447 | PGM_PTATTRS_W_MASK \
448 | PGM_PTATTRS_A_MASK \
449 | PGM_PTATTRS_D_MASK \
450 | PGM_PTATTRS_EPT_R_MASK \
451 | PGM_PTATTRS_EPT_W_MASK \
452 | PGM_PTATTRS_EPT_X_SUPER \
453 | PGM_PTATTRS_EPT_MEMTYPE \
454 | PGM_PTATTRS_EPT_IGNORE_PAT \
455 | PGM_PTATTRS_EPT_X_USER \
456 | PGM_PTATTRS_EPT_SUPER_SHW_STACK \
457 | PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT)
458
459/* The mask of all PGM page attribute bits (combined). */
460#define PGM_PTATTRS_VALID_MASK (PGM_PTATTRS_PT_VALID_MASK | PGM_PTATTRS_PT_VALID_MASK)
461
462/* Verify bits match the regular PT bits. */
463AssertCompile(PGM_PTATTRS_W_SHIFT == X86_PTE_BIT_RW);
464AssertCompile(PGM_PTATTRS_US_SHIFT == X86_PTE_BIT_US);
465AssertCompile(PGM_PTATTRS_PWT_SHIFT == X86_PTE_BIT_PWT);
466AssertCompile(PGM_PTATTRS_PCD_SHIFT == X86_PTE_BIT_PCD);
467AssertCompile(PGM_PTATTRS_A_SHIFT == X86_PTE_BIT_A);
468AssertCompile(PGM_PTATTRS_D_SHIFT == X86_PTE_BIT_D);
469AssertCompile(PGM_PTATTRS_PAT_SHIFT == X86_PTE_BIT_PAT);
470AssertCompile(PGM_PTATTRS_G_SHIFT == X86_PTE_BIT_G);
471AssertCompile(PGM_PTATTRS_W_MASK == X86_PTE_RW);
472AssertCompile(PGM_PTATTRS_US_MASK == X86_PTE_US);
473AssertCompile(PGM_PTATTRS_PWT_MASK == X86_PTE_PWT);
474AssertCompile(PGM_PTATTRS_PCD_MASK == X86_PTE_PCD);
475AssertCompile(PGM_PTATTRS_A_MASK == X86_PTE_A);
476AssertCompile(PGM_PTATTRS_D_MASK == X86_PTE_D);
477AssertCompile(PGM_PTATTRS_PAT_MASK == X86_PTE_PAT);
478AssertCompile(PGM_PTATTRS_G_MASK == X86_PTE_G);
479AssertCompile(PGM_PTATTRS_NX_MASK == X86_PTE_PAE_NX);
480
481/* Verify those EPT bits that must map 1:1 (after shifting). */
482AssertCompile(PGM_PTATTRS_EPT_R_SHIFT - PGM_PTATTRS_EPT_SHIFT == EPT_E_BIT_READ);
483AssertCompile(PGM_PTATTRS_EPT_W_SHIFT - PGM_PTATTRS_EPT_SHIFT == EPT_E_BIT_WRITE);
484AssertCompile(PGM_PTATTRS_EPT_X_SUPER_SHIFT - PGM_PTATTRS_EPT_SHIFT == EPT_E_BIT_EXECUTE);
485AssertCompile(PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT - PGM_PTATTRS_EPT_SHIFT == EPT_E_BIT_IGNORE_PAT);
486AssertCompile(PGM_PTATTRS_EPT_X_USER_SHIFT - PGM_PTATTRS_EPT_SHIFT == EPT_E_BIT_USER_EXECUTE);
487/** @} */
488
489
490/**
491 * Page table walk information.
492 *
493 * This provides extensive information regarding page faults (or EPT
494 * violations/misconfigurations) while traversing page tables.
495 */
496typedef struct PGMPTWALK
497{
498 /** The linear address that is being resolved (input). */
499 RTGCPTR GCPtr;
500
501 /** The second-level physical address (input/output).
502 * @remarks only valid if fIsSlat is set. */
503 RTGCPHYS GCPhysNested;
504
505 /** The physical address that is the result of the walk (output).
506 * @remarks This is page aligned and only valid if fSucceeded is set. */
507 RTGCPHYS GCPhys;
508
509 /** Set if the walk succeeded. */
510 bool fSucceeded;
511 /** Whether this is a second-level address translation. */
512 bool fIsSlat;
513 /** Whether the linear address (GCPtr) caused the second-level
514 * address translation. */
515 bool fIsLinearAddrValid;
516 /** The level problem arrised at.
517 * PTE is level 1, PDE is level 2, PDPE is level 3, PML4 is level 4, CR3 is
518 * level 8. This is 0 on success. */
519 uint8_t uLevel;
520 /** Set if the page isn't present. */
521 bool fNotPresent;
522 /** Encountered a bad physical address. */
523 bool fBadPhysAddr;
524 /** Set if there was reserved bit violations. */
525 bool fRsvdError;
526 /** Set if it involves a big page (2/4 MB). */
527 bool fBigPage;
528 /** Set if it involves a gigantic page (1 GB). */
529 bool fGigantPage;
530 bool afPadding[3];
531 /** Page-walk failure type, PGM_WALKFAIL_XXX. */
532 PGMWALKFAIL fFailed;
533
534 /** The effective page-table attributes, PGM_PTATTRS_XXX. */
535 PGMPTATTRS fEffective;
536} PGMPTWALK;
537/** Pointer to page walk information. */
538typedef PGMPTWALK *PPGMPTWALK;
539/** Pointer to const page walk information. */
540typedef PGMPTWALK const *PCPGMPTWALK;
541
542
543/** Macro for checking if the guest is using paging.
544 * @param enmMode PGMMODE_*.
545 * @remark ASSUMES certain order of the PGMMODE_* values.
546 */
547#define PGMMODE_WITH_PAGING(enmMode) ((enmMode) >= PGMMODE_32_BIT)
548
549/** Macro for checking if it's one of the long mode modes.
550 * @param enmMode PGMMODE_*.
551 */
552#define PGMMODE_IS_LONG_MODE(enmMode) ((enmMode) == PGMMODE_AMD64_NX || (enmMode) == PGMMODE_AMD64)
553
554/** Macro for checking if it's one of the AMD64 nested modes.
555 * @param enmMode PGMMODE_*.
556 */
557#define PGMMODE_IS_NESTED(enmMode) ( (enmMode) == PGMMODE_NESTED_32BIT \
558 || (enmMode) == PGMMODE_NESTED_PAE \
559 || (enmMode) == PGMMODE_NESTED_AMD64)
560
561/** Macro for checking if it's one of the PAE modes.
562 * @param enmMode PGMMODE_*.
563 */
564#define PGMMODE_IS_PAE(enmMode) ( (enmMode) == PGMMODE_PAE \
565 || (enmMode) == PGMMODE_PAE_NX)
566
567/**
568 * Is the ROM mapped (true) or is the shadow RAM mapped (false).
569 *
570 * @returns boolean.
571 * @param enmProt The PGMROMPROT value, must be valid.
572 */
573#define PGMROMPROT_IS_ROM(enmProt) \
574 ( (enmProt) == PGMROMPROT_READ_ROM_WRITE_IGNORE \
575 || (enmProt) == PGMROMPROT_READ_ROM_WRITE_RAM )
576
577
578VMMDECL(bool) PGMIsLockOwner(PVMCC pVM);
579
580VMMDECL(int) PGMRegisterStringFormatTypes(void);
581VMMDECL(void) PGMDeregisterStringFormatTypes(void);
582VMMDECL(RTHCPHYS) PGMGetHyperCR3(PVMCPU pVCpu);
583VMMDECL(int) PGMTrap0eHandler(PVMCPUCC pVCpu, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault);
584VMMDECL(int) PGMPrefetchPage(PVMCPUCC pVCpu, RTGCPTR GCPtrPage);
585VMMDECL(VBOXSTRICTRC) PGMInterpretInstruction(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault);
586VMMDECL(int) PGMShwGetPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys);
587VMMDECL(int) PGMShwMakePageReadonly(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
588VMMDECL(int) PGMShwMakePageWritable(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
589VMMDECL(int) PGMShwMakePageNotPresent(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
590/** @name Flags for PGMShwMakePageReadonly, PGMShwMakePageWritable and
591 * PGMShwMakePageNotPresent
592 * @{ */
593/** The call is from an access handler for dealing with the a faulting write
594 * operation. The virtual address is within the same page. */
595#define PGM_MK_PG_IS_WRITE_FAULT RT_BIT(0)
596/** The page is an MMIO2. */
597#define PGM_MK_PG_IS_MMIO2 RT_BIT(1)
598/** @}*/
599VMMDECL(int) PGMGstGetPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, PPGMPTWALK pWalk);
600VMMDECL(int) PGMGstModifyPage(PVMCPUCC pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
601VMM_INT_DECL(bool) PGMGstArePaePdpesValid(PVMCPUCC pVCpu, PCX86PDPE paPaePdpes);
602VMM_INT_DECL(int) PGMGstMapPaePdpes(PVMCPUCC pVCpu, PCX86PDPE paPaePdpes);
603VMM_INT_DECL(int) PGMGstMapPaePdpesAtCr3(PVMCPUCC pVCpu, uint64_t cr3);
604
605VMMDECL(int) PGMInvalidatePage(PVMCPUCC pVCpu, RTGCPTR GCPtrPage);
606VMMDECL(int) PGMFlushTLB(PVMCPUCC pVCpu, uint64_t cr3, bool fGlobal);
607VMMDECL(int) PGMSyncCR3(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal);
608VMMDECL(int) PGMUpdateCR3(PVMCPUCC pVCpu, uint64_t cr3);
609VMMDECL(int) PGMChangeMode(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr4, uint64_t efer, bool fForce);
610VMM_INT_DECL(int) PGMHCChangeMode(PVMCC pVM, PVMCPUCC pVCpu, PGMMODE enmGuestMode);
611VMMDECL(void) PGMCr0WpEnabled(PVMCPUCC pVCpu);
612VMMDECL(PGMMODE) PGMGetGuestMode(PVMCPU pVCpu);
613VMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu);
614VMMDECL(PGMMODE) PGMGetHostMode(PVM pVM);
615VMMDECL(const char *) PGMGetModeName(PGMMODE enmMode);
616#ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
617VMM_INT_DECL(const char *) PGMGetSlatModeName(PGMSLAT enmSlatMode);
618#endif
619VMM_INT_DECL(RTGCPHYS) PGMGetGuestCR3Phys(PVMCPU pVCpu);
620VMM_INT_DECL(void) PGMNotifyNxeChanged(PVMCPU pVCpu, bool fNxe);
621VMMDECL(bool) PGMHasDirtyPages(PVM pVM);
622VMM_INT_DECL(void) PGMSetGuestEptPtr(PVMCPUCC pVCpu, uint64_t uEptPtr);
623
624/** PGM physical access handler type registration handle (heap offset, valid
625 * cross contexts without needing fixing up). Callbacks and handler type is
626 * associated with this and it is shared by all handler registrations. */
627typedef uint32_t PGMPHYSHANDLERTYPE;
628/** Pointer to a PGM physical handler type registration handle. */
629typedef PGMPHYSHANDLERTYPE *PPGMPHYSHANDLERTYPE;
630/** NIL value for PGM physical access handler type handle. */
631#define NIL_PGMPHYSHANDLERTYPE UINT32_MAX
632VMMDECL(uint32_t) PGMHandlerPhysicalTypeRelease(PVMCC pVM, PGMPHYSHANDLERTYPE hType);
633VMMDECL(uint32_t) PGMHandlerPhysicalTypeRetain(PVM pVM, PGMPHYSHANDLERTYPE hType);
634
635VMMDECL(int) PGMHandlerPhysicalRegister(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast, PGMPHYSHANDLERTYPE hType,
636 RTR3PTR pvUserR3, RTR0PTR pvUserR0, RTRCPTR pvUserRC,
637 R3PTRTYPE(const char *) pszDesc);
638VMMDECL(int) PGMHandlerPhysicalModify(PVMCC pVM, RTGCPHYS GCPhysCurrent, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast);
639VMMDECL(int) PGMHandlerPhysicalDeregister(PVMCC pVM, RTGCPHYS GCPhys);
640VMMDECL(int) PGMHandlerPhysicalChangeUserArgs(PVMCC pVM, RTGCPHYS GCPhys, RTR3PTR pvUserR3, RTR0PTR pvUserR0);
641VMMDECL(int) PGMHandlerPhysicalSplit(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysSplit);
642VMMDECL(int) PGMHandlerPhysicalJoin(PVMCC pVM, RTGCPHYS GCPhys1, RTGCPHYS GCPhys2);
643VMMDECL(int) PGMHandlerPhysicalPageTempOff(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage);
644VMMDECL(int) PGMHandlerPhysicalPageAliasMmio2(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage,
645 PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS offMMio2PageRemap);
646VMMDECL(int) PGMHandlerPhysicalPageAliasHC(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTHCPHYS HCPhysPageRemap);
647VMMDECL(int) PGMHandlerPhysicalReset(PVMCC pVM, RTGCPHYS GCPhys);
648VMMDECL(bool) PGMHandlerPhysicalIsRegistered(PVMCC pVM, RTGCPHYS GCPhys);
649
650
651/**
652 * Page type.
653 *
654 * @remarks This enum has to fit in a 3-bit field (see PGMPAGE::u3Type).
655 * @remarks This is used in the saved state, so changes to it requires bumping
656 * the saved state version.
657 * @todo So, convert to \#defines!
658 */
659typedef enum PGMPAGETYPE
660{
661 /** The usual invalid zero entry. */
662 PGMPAGETYPE_INVALID = 0,
663 /** RAM page. (RWX) */
664 PGMPAGETYPE_RAM,
665 /** MMIO2 page. (RWX) */
666 PGMPAGETYPE_MMIO2,
667 /** MMIO2 page aliased over an MMIO page. (RWX)
668 * See PGMHandlerPhysicalPageAlias(). */
669 PGMPAGETYPE_MMIO2_ALIAS_MMIO,
670 /** Special page aliased over an MMIO page. (RWX)
671 * See PGMHandlerPhysicalPageAliasHC(), but this is generally only used for
672 * VT-x's APIC access page at the moment. Treated as MMIO by everyone except
673 * the shadow paging code. */
674 PGMPAGETYPE_SPECIAL_ALIAS_MMIO,
675 /** Shadowed ROM. (RWX) */
676 PGMPAGETYPE_ROM_SHADOW,
677 /** ROM page. (R-X) */
678 PGMPAGETYPE_ROM,
679 /** MMIO page. (---) */
680 PGMPAGETYPE_MMIO,
681 /** End of valid entries. */
682 PGMPAGETYPE_END
683} PGMPAGETYPE;
684AssertCompile(PGMPAGETYPE_END == 8);
685
686/** @name PGM page type predicates.
687 * @{ */
688#define PGMPAGETYPE_IS_READABLE(a_enmType) ( (a_enmType) <= PGMPAGETYPE_ROM )
689#define PGMPAGETYPE_IS_WRITEABLE(a_enmType) ( (a_enmType) <= PGMPAGETYPE_ROM_SHADOW )
690#define PGMPAGETYPE_IS_RWX(a_enmType) ( (a_enmType) <= PGMPAGETYPE_ROM_SHADOW )
691#define PGMPAGETYPE_IS_ROX(a_enmType) ( (a_enmType) == PGMPAGETYPE_ROM )
692#define PGMPAGETYPE_IS_NP(a_enmType) ( (a_enmType) == PGMPAGETYPE_MMIO )
693/** @} */
694
695
696VMM_INT_DECL(PGMPAGETYPE) PGMPhysGetPageType(PVMCC pVM, RTGCPHYS GCPhys);
697
698VMM_INT_DECL(int) PGMPhysGCPhys2HCPhys(PVMCC pVM, RTGCPHYS GCPhys, PRTHCPHYS pHCPhys);
699VMM_INT_DECL(int) PGMPhysGCPtr2HCPhys(PVMCPUCC pVCpu, RTGCPTR GCPtr, PRTHCPHYS pHCPhys);
700VMM_INT_DECL(int) PGMPhysGCPhys2CCPtr(PVMCC pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
701VMM_INT_DECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVMCC pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
702VMM_INT_DECL(int) PGMPhysGCPtr2CCPtr(PVMCPU pVCpu, RTGCPTR GCPtr, void **ppv, PPGMPAGEMAPLOCK pLock);
703VMM_INT_DECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVMCPUCC pVCpu, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock);
704
705VMMDECL(bool) PGMPhysIsA20Enabled(PVMCPU pVCpu);
706VMMDECL(bool) PGMPhysIsGCPhysValid(PVMCC pVM, RTGCPHYS GCPhys);
707VMMDECL(bool) PGMPhysIsGCPhysNormal(PVMCC pVM, RTGCPHYS GCPhys);
708VMMDECL(int) PGMPhysGCPtr2GCPhys(PVMCPUCC pVCpu, RTGCPTR GCPtr, PRTGCPHYS pGCPhys);
709VMMDECL(void) PGMPhysReleasePageMappingLock(PVMCC pVM, PPGMPAGEMAPLOCK pLock);
710VMMDECL(void) PGMPhysBulkReleasePageMappingLocks(PVMCC pVM, uint32_t cPages, PPGMPAGEMAPLOCK paLock);
711
712/** @def PGM_PHYS_RW_IS_SUCCESS
713 * Check whether a PGMPhysRead, PGMPhysWrite, PGMPhysReadGCPtr or
714 * PGMPhysWriteGCPtr call completed the given task.
715 *
716 * @returns true if completed, false if not.
717 * @param a_rcStrict The status code.
718 * @sa IOM_SUCCESS
719 */
720#ifdef IN_RING3
721# define PGM_PHYS_RW_IS_SUCCESS(a_rcStrict) \
722 ( (a_rcStrict) == VINF_SUCCESS \
723 || (a_rcStrict) == VINF_EM_DBG_STOP \
724 || (a_rcStrict) == VINF_EM_DBG_EVENT \
725 || (a_rcStrict) == VINF_EM_DBG_BREAKPOINT \
726 )
727#elif defined(IN_RING0)
728# define PGM_PHYS_RW_IS_SUCCESS(a_rcStrict) \
729 ( (a_rcStrict) == VINF_SUCCESS \
730 || (a_rcStrict) == VINF_IOM_R3_MMIO_COMMIT_WRITE \
731 || (a_rcStrict) == VINF_EM_OFF \
732 || (a_rcStrict) == VINF_EM_SUSPEND \
733 || (a_rcStrict) == VINF_EM_RESET \
734 || (a_rcStrict) == VINF_EM_HALT \
735 || (a_rcStrict) == VINF_EM_DBG_STOP \
736 || (a_rcStrict) == VINF_EM_DBG_EVENT \
737 || (a_rcStrict) == VINF_EM_DBG_BREAKPOINT \
738 )
739#elif defined(IN_RC)
740# define PGM_PHYS_RW_IS_SUCCESS(a_rcStrict) \
741 ( (a_rcStrict) == VINF_SUCCESS \
742 || (a_rcStrict) == VINF_IOM_R3_MMIO_COMMIT_WRITE \
743 || (a_rcStrict) == VINF_EM_OFF \
744 || (a_rcStrict) == VINF_EM_SUSPEND \
745 || (a_rcStrict) == VINF_EM_RESET \
746 || (a_rcStrict) == VINF_EM_HALT \
747 || (a_rcStrict) == VINF_SELM_SYNC_GDT \
748 || (a_rcStrict) == VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT \
749 || (a_rcStrict) == VINF_EM_DBG_STOP \
750 || (a_rcStrict) == VINF_EM_DBG_EVENT \
751 || (a_rcStrict) == VINF_EM_DBG_BREAKPOINT \
752 )
753#endif
754/** @def PGM_PHYS_RW_DO_UPDATE_STRICT_RC
755 * Updates the return code with a new result.
756 *
757 * Both status codes must be successes according to PGM_PHYS_RW_IS_SUCCESS.
758 *
759 * @param a_rcStrict The current return code, to be updated.
760 * @param a_rcStrict2 The new return code to merge in.
761 */
762#ifdef IN_RING3
763# define PGM_PHYS_RW_DO_UPDATE_STRICT_RC(a_rcStrict, a_rcStrict2) \
764 do { \
765 Assert(rcStrict == VINF_SUCCESS); \
766 Assert(rcStrict2 == VINF_SUCCESS); \
767 } while (0)
768#elif defined(IN_RING0)
769# define PGM_PHYS_RW_DO_UPDATE_STRICT_RC(a_rcStrict, a_rcStrict2) \
770 do { \
771 Assert(PGM_PHYS_RW_IS_SUCCESS(rcStrict)); \
772 Assert(PGM_PHYS_RW_IS_SUCCESS(rcStrict2)); \
773 AssertCompile(VINF_IOM_R3_MMIO_COMMIT_WRITE > VINF_EM_LAST); \
774 if ((a_rcStrict2) == VINF_SUCCESS || (a_rcStrict) == (a_rcStrict2)) \
775 { /* likely */ } \
776 else if ( (a_rcStrict) == VINF_SUCCESS \
777 || (a_rcStrict) > (a_rcStrict2)) \
778 (a_rcStrict) = (a_rcStrict2); \
779 } while (0)
780#elif defined(IN_RC)
781# define PGM_PHYS_RW_DO_UPDATE_STRICT_RC(a_rcStrict, a_rcStrict2) \
782 do { \
783 Assert(PGM_PHYS_RW_IS_SUCCESS(rcStrict)); \
784 Assert(PGM_PHYS_RW_IS_SUCCESS(rcStrict2)); \
785 AssertCompile(VINF_SELM_SYNC_GDT > VINF_EM_LAST); \
786 AssertCompile(VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT > VINF_EM_LAST); \
787 AssertCompile(VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT < VINF_SELM_SYNC_GDT); \
788 AssertCompile(VINF_IOM_R3_MMIO_COMMIT_WRITE > VINF_EM_LAST); \
789 AssertCompile(VINF_IOM_R3_MMIO_COMMIT_WRITE > VINF_SELM_SYNC_GDT); \
790 AssertCompile(VINF_IOM_R3_MMIO_COMMIT_WRITE > VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT); \
791 if ((a_rcStrict2) == VINF_SUCCESS || (a_rcStrict) == (a_rcStrict2)) \
792 { /* likely */ } \
793 else if ((a_rcStrict) == VINF_SUCCESS) \
794 (a_rcStrict) = (a_rcStrict2); \
795 else if ( ( (a_rcStrict) > (a_rcStrict2) \
796 && ( (a_rcStrict2) <= VINF_EM_RESET \
797 || (a_rcStrict) != VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT) ) \
798 || ( (a_rcStrict2) == VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT \
799 && (a_rcStrict) > VINF_EM_RESET) ) \
800 (a_rcStrict) = (a_rcStrict2); \
801 } while (0)
802#endif
803
804VMMDECL(VBOXSTRICTRC) PGMPhysRead(PVMCC pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, PGMACCESSORIGIN enmOrigin);
805VMMDECL(VBOXSTRICTRC) PGMPhysWrite(PVMCC pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, PGMACCESSORIGIN enmOrigin);
806VMMDECL(VBOXSTRICTRC) PGMPhysReadGCPtr(PVMCPUCC pVCpu, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, PGMACCESSORIGIN enmOrigin);
807VMMDECL(VBOXSTRICTRC) PGMPhysWriteGCPtr(PVMCPUCC pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb, PGMACCESSORIGIN enmOrigin);
808
809VMMDECL(int) PGMPhysSimpleReadGCPhys(PVMCC pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb);
810VMMDECL(int) PGMPhysSimpleWriteGCPhys(PVMCC pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb);
811VMMDECL(int) PGMPhysSimpleReadGCPtr(PVMCPUCC pVCpu, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
812VMMDECL(int) PGMPhysSimpleWriteGCPtr(PVMCPUCC pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
813VMMDECL(int) PGMPhysSimpleDirtyWriteGCPtr(PVMCPUCC pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
814
815VMM_INT_DECL(int) PGMPhysIemGCPhys2Ptr(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, bool fWritable, bool fByPassHandlers, void **ppv, PPGMPAGEMAPLOCK pLock);
816VMM_INT_DECL(int) PGMPhysIemQueryAccess(PVMCC pVM, RTGCPHYS GCPhys, bool fWritable, bool fByPassHandlers);
817VMM_INT_DECL(int) PGMPhysIemGCPhys2PtrNoLock(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, uint64_t const volatile *puTlbPhysRev,
818#if defined(IN_RC)
819 R3PTRTYPE(uint8_t *) *ppb,
820#else
821 R3R0PTRTYPE(uint8_t *) *ppb,
822#endif
823 uint64_t *pfTlb);
824/** @name Flags returned by PGMPhysIemGCPhys2PtrNoLock
825 * @{ */
826#define PGMIEMGCPHYS2PTR_F_NO_WRITE RT_BIT_32(3) /**< Not writable (IEMTLBE_F_PG_NO_WRITE). */
827#define PGMIEMGCPHYS2PTR_F_NO_READ RT_BIT_32(4) /**< Not readable (IEMTLBE_F_PG_NO_READ). */
828#define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(7) /**< No ring-3 mapping (IEMTLBE_F_NO_MAPPINGR3). */
829/** @} */
830
831/** Information returned by PGMPhysNemQueryPageInfo. */
832typedef struct PGMPHYSNEMPAGEINFO
833{
834 /** The host physical address of the page, NIL_HCPHYS if invalid page. */
835 RTHCPHYS HCPhys;
836 /** The NEM access mode for the page, NEM_PAGE_PROT_XXX */
837 uint32_t fNemProt : 8;
838 /** The NEM state associated with the PAGE. */
839 uint32_t u2NemState : 2;
840 /** The NEM state associated with the PAGE before pgmPhysPageMakeWritable was called. */
841 uint32_t u2OldNemState : 2;
842 /** Set if the page has handler. */
843 uint32_t fHasHandlers : 1;
844 /** Set if is the zero page backing it. */
845 uint32_t fZeroPage : 1;
846 /** Set if the page has handler. */
847 PGMPAGETYPE enmType;
848} PGMPHYSNEMPAGEINFO;
849/** Pointer to page information for NEM. */
850typedef PGMPHYSNEMPAGEINFO *PPGMPHYSNEMPAGEINFO;
851/**
852 * Callback for checking that the page is in sync while under the PGM lock.
853 *
854 * NEM passes this callback to PGMPhysNemQueryPageInfo to check that the page is
855 * in-sync between PGM and the native hypervisor API in an atomic fashion.
856 *
857 * @returns VBox status code.
858 * @param pVM The cross context VM structure.
859 * @param pVCpu The cross context per virtual CPU structure. Optional,
860 * see PGMPhysNemQueryPageInfo.
861 * @param GCPhys The guest physical address (not A20 masked).
862 * @param pInfo The page info structure. This function updates the
863 * u2NemState memory and the caller will update the PGMPAGE
864 * copy accordingly.
865 * @param pvUser Callback user argument.
866 */
867typedef DECLCALLBACKTYPE(int, FNPGMPHYSNEMCHECKPAGE,(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, PPGMPHYSNEMPAGEINFO pInfo, void *pvUser));
868/** Pointer to a FNPGMPHYSNEMCHECKPAGE function. */
869typedef FNPGMPHYSNEMCHECKPAGE *PFNPGMPHYSNEMCHECKPAGE;
870
871VMM_INT_DECL(int) PGMPhysNemPageInfoChecker(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, bool fMakeWritable,
872 PPGMPHYSNEMPAGEINFO pInfo, PFNPGMPHYSNEMCHECKPAGE pfnChecker, void *pvUser);
873
874/**
875 * Callback for use with PGMPhysNemEnumPagesByState.
876 * @returns VBox status code.
877 * Failure status will stop enumeration immediately and return.
878 * @param pVM The cross context VM structure.
879 * @param pVCpu The cross context per virtual CPU structure. Optional,
880 * see PGMPhysNemEnumPagesByState.
881 * @param GCPhys The guest physical address (not A20 masked).
882 * @param pu2NemState Pointer to variable with the NEM state. This can be
883 * update.
884 * @param pvUser The user argument.
885 */
886typedef DECLCALLBACKTYPE(int, FNPGMPHYSNEMENUMCALLBACK,(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys,
887 uint8_t *pu2NemState, void *pvUser));
888/** Pointer to a FNPGMPHYSNEMENUMCALLBACK function. */
889typedef FNPGMPHYSNEMENUMCALLBACK *PFNPGMPHYSNEMENUMCALLBACK;
890VMM_INT_DECL(int) PGMPhysNemEnumPagesByState(PVMCC pVM, PVMCPUCC VCpu, uint8_t uMinState,
891 PFNPGMPHYSNEMENUMCALLBACK pfnCallback, void *pvUser);
892
893
894#ifdef VBOX_STRICT
895VMMDECL(unsigned) PGMAssertHandlerAndFlagsInSync(PVMCC pVM);
896VMMDECL(unsigned) PGMAssertNoMappingConflicts(PVM pVM);
897VMMDECL(unsigned) PGMAssertCR3(PVMCC pVM, PVMCPUCC pVCpu, uint64_t cr3, uint64_t cr4);
898#endif /* VBOX_STRICT */
899
900VMMDECL(int) PGMSetLargePageUsage(PVMCC pVM, bool fUseLargePages);
901
902/**
903 * Query large page usage state
904 *
905 * @returns 0 - disabled, 1 - enabled
906 * @param pVM The cross context VM structure.
907 */
908#define PGMIsUsingLargePages(pVM) ((pVM)->pgm.s.fUseLargePages)
909
910
911#ifdef IN_RING0
912/** @defgroup grp_pgm_r0 The PGM Host Context Ring-0 API
913 * @{
914 */
915VMMR0_INT_DECL(int) PGMR0InitPerVMData(PGVM pGVM, RTR0MEMOBJ hMemObj);
916VMMR0_INT_DECL(int) PGMR0InitVM(PGVM pGVM);
917VMMR0_INT_DECL(void) PGMR0CleanupVM(PGVM pGVM);
918VMMR0_INT_DECL(int) PGMR0PhysAllocateHandyPages(PGVM pGVM, VMCPUID idCpu);
919VMMR0_INT_DECL(int) PGMR0PhysFlushHandyPages(PGVM pGVM, VMCPUID idCpu);
920VMMR0_INT_DECL(int) PGMR0PhysAllocateLargePage(PGVM pGVM, VMCPUID idCpu, RTGCPHYS GCPhys);
921VMMR0_INT_DECL(int) PGMR0PhysMMIO2MapKernel(PGVM pGVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2,
922 size_t offSub, size_t cbSub, void **ppvMapping);
923VMMR0_INT_DECL(int) PGMR0PhysSetupIoMmu(PGVM pGVM);
924VMMR0DECL(int) PGMR0SharedModuleCheck(PVMCC pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule,
925 PCRTGCPTR64 paRegionsGCPtrs);
926VMMR0DECL(int) PGMR0Trap0eHandlerNestedPaging(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr,
927 PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
928VMMR0DECL(VBOXSTRICTRC) PGMR0Trap0eHandlerNPMisconfig(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode,
929 PCPUMCTXCORE pRegFrame, RTGCPHYS GCPhysFault, uint32_t uErr);
930VMMR0_INT_DECL(int) PGMR0PoolGrow(PGVM pGVM, VMCPUID idCpu);
931/** @} */
932#endif /* IN_RING0 */
933
934
935
936#ifdef IN_RING3
937/** @defgroup grp_pgm_r3 The PGM Host Context Ring-3 API
938 * @{
939 */
940VMMR3_INT_DECL(void) PGMR3EnableNemMode(PVM pVM);
941VMMR3_INT_DECL(bool) PGMR3IsNemModeEnabled(PVM pVM);
942VMMR3DECL(int) PGMR3Init(PVM pVM);
943VMMR3DECL(int) PGMR3InitFinalize(PVM pVM);
944VMMR3_INT_DECL(int) PGMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
945VMMR3DECL(void) PGMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
946VMMR3DECL(void) PGMR3ResetCpu(PVM pVM, PVMCPU pVCpu);
947VMMR3_INT_DECL(void) PGMR3Reset(PVM pVM);
948VMMR3_INT_DECL(void) PGMR3ResetNoMorePhysWritesFlag(PVM pVM);
949VMMR3_INT_DECL(void) PGMR3MemSetup(PVM pVM, bool fReset);
950VMMR3DECL(int) PGMR3Term(PVM pVM);
951
952VMMR3DECL(int) PGMR3PhysRegisterRam(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, const char *pszDesc);
953VMMR3DECL(int) PGMR3PhysChangeMemBalloon(PVM pVM, bool fInflate, unsigned cPages, RTGCPHYS *paPhysPage);
954VMMR3DECL(int) PGMR3PhysWriteProtectRAM(PVM pVM);
955VMMR3DECL(uint32_t) PGMR3PhysGetRamRangeCount(PVM pVM);
956VMMR3DECL(int) PGMR3PhysGetRange(PVM pVM, uint32_t iRange, PRTGCPHYS pGCPhysStart, PRTGCPHYS pGCPhysLast,
957 const char **ppszDesc, bool *pfIsMmio);
958VMMR3DECL(int) PGMR3QueryMemoryStats(PUVM pUVM, uint64_t *pcbTotalMem, uint64_t *pcbPrivateMem, uint64_t *pcbSharedMem, uint64_t *pcbZeroMem);
959VMMR3DECL(int) PGMR3QueryGlobalMemoryStats(PUVM pUVM, uint64_t *pcbAllocMem, uint64_t *pcbFreeMem, uint64_t *pcbBallonedMem, uint64_t *pcbSharedMem);
960
961VMMR3DECL(int) PGMR3PhysMMIORegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, PGMPHYSHANDLERTYPE hType,
962 RTR3PTR pvUserR3, RTR0PTR pvUserR0, RTRCPTR pvUserRC, const char *pszDesc);
963VMMR3DECL(int) PGMR3PhysMMIODeregister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb);
964
965/** @name PGMPHYS_MMIO2_FLAGS_XXX - MMIO2 registration flags.
966 * @see PGMR3PhysMmio2Register, PDMDevHlpMmio2Create
967 * @{ */
968/** Track dirty pages.
969 * @see PGMR3PhysMmio2QueryAndResetDirtyBitmap(), PGMR3PhysMmio2ControlDirtyPageTracking(). */
970#define PGMPHYS_MMIO2_FLAGS_TRACK_DIRTY_PAGES RT_BIT_32(0)
971/** Valid flags. */
972#define PGMPHYS_MMIO2_FLAGS_VALID_MASK UINT32_C(0x00000001)
973/** @} */
974
975VMMR3_INT_DECL(int) PGMR3PhysMmio2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, RTGCPHYS cb,
976 uint32_t fFlags, const char *pszDesc, void **ppv, PGMMMIO2HANDLE *phRegion);
977VMMR3_INT_DECL(int) PGMR3PhysMmio2Deregister(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2);
978VMMR3_INT_DECL(int) PGMR3PhysMmio2Map(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys);
979VMMR3_INT_DECL(int) PGMR3PhysMmio2Unmap(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS GCPhys);
980VMMR3_INT_DECL(int) PGMR3PhysMmio2Reduce(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion);
981VMMR3_INT_DECL(int) PGMR3PhysMmio2ValidateHandle(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2);
982VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysMmio2GetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2);
983VMMR3_INT_DECL(int) PGMR3PhysMmio2ChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion);
984VMMR3_INT_DECL(int) PGMR3PhysMmio2QueryAndResetDirtyBitmap(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2,
985 void *pvBitmap, size_t cbBitmap);
986VMMR3_INT_DECL(int) PGMR3PhysMmio2ControlDirtyPageTracking(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, bool fEnabled);
987
988/** @name PGMPHYS_ROM_FLAGS_XXX - ROM registration flags.
989 * @see PGMR3PhysRegisterRom, PDMDevHlpROMRegister
990 * @{ */
991/** Inidicates that ROM shadowing should be enabled. */
992#define PGMPHYS_ROM_FLAGS_SHADOWED UINT8_C(0x01)
993/** Indicates that what pvBinary points to won't go away
994 * and can be used for strictness checks. */
995#define PGMPHYS_ROM_FLAGS_PERMANENT_BINARY UINT8_C(0x02)
996/** Indicates that the ROM is allowed to be missing from saved state.
997 * @note This is a hack for EFI, see @bugref{6940} */
998#define PGMPHYS_ROM_FLAGS_MAYBE_MISSING_FROM_STATE UINT8_C(0x04)
999/** Valid flags. */
1000#define PGMPHYS_ROM_FLAGS_VALID_MASK UINT8_C(0x07)
1001/** @} */
1002
1003VMMR3DECL(int) PGMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS cb,
1004 const void *pvBinary, uint32_t cbBinary, uint8_t fFlags, const char *pszDesc);
1005VMMR3DECL(int) PGMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, PGMROMPROT enmProt);
1006VMMDECL(void) PGMR3PhysSetA20(PVMCPU pVCpu, bool fEnable);
1007
1008VMMR3_INT_DECL(int) PGMR3HandlerPhysicalTypeRegisterEx(PVM pVM, PGMPHYSHANDLERKIND enmKind, bool fKeepPgmLock,
1009 PFNPGMPHYSHANDLER pfnHandlerR3,
1010 R0PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR0,
1011 R0PTRTYPE(PFNPGMRZPHYSPFHANDLER) pfnPfHandlerR0,
1012 const char *pszDesc, PPGMPHYSHANDLERTYPE phType);
1013VMMR3DECL(int) PGMR3HandlerPhysicalTypeRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, bool fKeepPgmLock,
1014 R3PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR3,
1015 const char *pszModR0, const char *pszHandlerR0, const char *pszPfHandlerR0,
1016 const char *pszModRC, const char *pszHandlerRC, const char *pszPfHandlerRC,
1017 const char *pszDesc,
1018 PPGMPHYSHANDLERTYPE phType);
1019VMMR3_INT_DECL(int) PGMR3PoolGrow(PVM pVM, PVMCPU pVCpu);
1020
1021VMMR3DECL(int) PGMR3PhysTlbGCPhys2Ptr(PVM pVM, RTGCPHYS GCPhys, bool fWritable, void **ppv);
1022VMMR3DECL(uint8_t) PGMR3PhysReadU8(PVM pVM, RTGCPHYS GCPhys, PGMACCESSORIGIN enmOrigin);
1023VMMR3DECL(uint16_t) PGMR3PhysReadU16(PVM pVM, RTGCPHYS GCPhys, PGMACCESSORIGIN enmOrigin);
1024VMMR3DECL(uint32_t) PGMR3PhysReadU32(PVM pVM, RTGCPHYS GCPhys, PGMACCESSORIGIN enmOrigin);
1025VMMR3DECL(uint64_t) PGMR3PhysReadU64(PVM pVM, RTGCPHYS GCPhys, PGMACCESSORIGIN enmOrigin);
1026VMMR3DECL(void) PGMR3PhysWriteU8(PVM pVM, RTGCPHYS GCPhys, uint8_t Value, PGMACCESSORIGIN enmOrigin);
1027VMMR3DECL(void) PGMR3PhysWriteU16(PVM pVM, RTGCPHYS GCPhys, uint16_t Value, PGMACCESSORIGIN enmOrigin);
1028VMMR3DECL(void) PGMR3PhysWriteU32(PVM pVM, RTGCPHYS GCPhys, uint32_t Value, PGMACCESSORIGIN enmOrigin);
1029VMMR3DECL(void) PGMR3PhysWriteU64(PVM pVM, RTGCPHYS GCPhys, uint64_t Value, PGMACCESSORIGIN enmOrigin);
1030VMMR3DECL(int) PGMR3PhysReadExternal(PVM pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, PGMACCESSORIGIN enmOrigin);
1031VMMR3DECL(int) PGMR3PhysWriteExternal(PVM pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, PGMACCESSORIGIN enmOrigin);
1032VMMR3DECL(int) PGMR3PhysGCPhys2CCPtrExternal(PVM pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
1033VMMR3DECL(int) PGMR3PhysGCPhys2CCPtrReadOnlyExternal(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
1034VMMR3DECL(int) PGMR3PhysBulkGCPhys2CCPtrExternal(PVM pVM, uint32_t cPages, PCRTGCPHYS paGCPhysPages,
1035 void **papvPages, PPGMPAGEMAPLOCK paLocks);
1036VMMR3DECL(int) PGMR3PhysBulkGCPhys2CCPtrReadOnlyExternal(PVM pVM, uint32_t cPages, PCRTGCPHYS paGCPhysPages,
1037 void const **papvPages, PPGMPAGEMAPLOCK paLocks);
1038VMMR3DECL(void) PGMR3PhysChunkInvalidateTLB(PVM pVM);
1039VMMR3DECL(int) PGMR3PhysAllocateHandyPages(PVM pVM);
1040
1041VMMR3DECL(int) PGMR3CheckIntegrity(PVM pVM);
1042
1043VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys);
1044VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys);
1045VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PUVM pUVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys);
1046VMMR3_INT_DECL(int) PGMR3DbgReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
1047VMMR3_INT_DECL(int) PGMR3DbgWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
1048VMMR3_INT_DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
1049VMMR3_INT_DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
1050VMMR3_INT_DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, RTGCPHYS GCPhysAlign, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit);
1051VMMR3_INT_DECL(int) PGMR3DbgScanVirtual(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, RTGCPTR cbRange, RTGCPTR GCPtrAlign, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPhysHit);
1052VMMR3_INT_DECL(int) PGMR3DumpHierarchyShw(PVM pVM, uint64_t cr3, uint32_t fFlags, uint64_t u64FirstAddr, uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp);
1053VMMR3_INT_DECL(int) PGMR3DumpHierarchyGst(PVM pVM, uint64_t cr3, uint32_t fFlags, RTGCPTR FirstAddr, RTGCPTR LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp);
1054
1055
1056/** @name Page sharing
1057 * @{ */
1058VMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion,
1059 RTGCPTR GCBaseAddr, uint32_t cbModule,
1060 uint32_t cRegions, VMMDEVSHAREDREGIONDESC const *paRegions);
1061VMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion,
1062 RTGCPTR GCBaseAddr, uint32_t cbModule);
1063VMMR3DECL(int) PGMR3SharedModuleCheckAll(PVM pVM);
1064VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *pfPageFlags);
1065/** @} */
1066
1067/** @} */
1068#endif /* IN_RING3 */
1069
1070RT_C_DECLS_END
1071
1072/** @} */
1073#endif /* !VBOX_INCLUDED_vmm_pgm_h */
1074
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