VirtualBox

source: vbox/trunk/src/VBox/VMM/PGMSharedPage.cpp@ 28800

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

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: PGMSharedPage.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
2/** @file
3 * PGM - Page Manager and Monitor, Shared page handling
4 */
5
6/*
7 * Copyright (C) 2006-2010 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/pgm.h>
24#include <VBox/stam.h>
25#include "PGMInternal.h"
26#include <VBox/vm.h>
27#include <VBox/sup.h>
28#include <VBox/param.h>
29#include <VBox/err.h>
30#include <VBox/log.h>
31#include <iprt/assert.h>
32#include <iprt/asm.h>
33
34
35/**
36 * Registers a new shared module for the VM
37 *
38 * @returns VBox status code.
39 * @param pVM VM handle
40 * @param pszModuleName Module name
41 * @param pszVersion Module version
42 * @param GCBaseAddr Module base address
43 * @param cbModule Module size
44 * @param cRegions Number of shared region descriptors
45 * @param pRegions Shared region(s)
46 */
47VMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule,
48 unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions)
49{
50#ifdef VBOX_WITH_PAGE_SHARING
51 return GMMR3RegisterSharedModule(pVM, pszModuleName, pszVersion, GCBaseAddr, cbModule, cRegions, pRegions);
52#else
53 return VERR_NOT_IMPLEMENTED;
54#endif
55}
56
57
58/**
59 * Unregisters a shared module for the VM
60 *
61 * @returns VBox status code.
62 * @param pVM VM handle
63 * @param pszModuleName Module name
64 * @param pszVersion Module version
65 * @param GCBaseAddr Module base address
66 * @param cbModule Module size
67 */
68VMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule)
69{
70#ifdef VBOX_WITH_PAGE_SHARING
71 return GMMR3UnregisterSharedModule(pVM, pszModuleName, pszVersion, GCBaseAddr, cbModule);
72#else
73 return VERR_NOT_IMPLEMENTED;
74#endif
75}
76
77
78/**
79 * Checks regsitered modules for shared pages
80 *
81 * @returns VBox status code.
82 * @param pVM VM handle
83 */
84VMMR3DECL(int) PGMR3SharedModuleCheck(PVM pVM)
85{
86#ifdef VBOX_WITH_PAGE_SHARING
87 return GMMR3CheckSharedModules(pVM);
88#else
89 return VERR_NOT_IMPLEMENTED;
90#endif
91}
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use