VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR0/IOMR0.cpp@ 81605

Last change on this file since 81605 was 81197, checked in by vboxsync, 5 years ago

IOM: More MMIO code. bugref:9218

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: IOMR0.cpp 81197 2019-10-09 20:36:46Z vboxsync $ */
2/** @file
3 * IOM - Host Context Ring 0.
4 */
5
6/*
7 * Copyright (C) 2006-2019 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_IOM
23#include <VBox/vmm/iom.h>
24#include "IOMInternal.h"
25#include <VBox/vmm/vmcc.h>
26#include <VBox/log.h>
27#include <iprt/assertcompile.h>
28
29
30
31/**
32 * Initializes the per-VM data for the IOM.
33 *
34 * This is called from under the GVMM lock, so it should only initialize the
35 * data so IOMR0CleanupVM and others will work smoothly.
36 *
37 * @param pGVM Pointer to the global VM structure.
38 */
39VMMR0_INT_DECL(void) IOMR0InitPerVMData(PGVM pGVM)
40{
41 AssertCompile(sizeof(pGVM->iom.s) <= sizeof(pGVM->iom.padding));
42 AssertCompile(sizeof(pGVM->iomr0.s) <= sizeof(pGVM->iomr0.padding));
43
44 iomR0IoPortInitPerVMData(pGVM);
45 iomR0MmioInitPerVMData(pGVM);
46}
47
48
49/**
50 * Cleans up any loose ends before the GVM structure is destroyed.
51 */
52VMMR0_INT_DECL(void) IOMR0CleanupVM(PGVM pGVM)
53{
54 iomR0IoPortCleanupVM(pGVM);
55 iomR0MmioCleanupVM(pGVM);
56}
57
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