VirtualBox

source: vbox/trunk/src/VBox/VMM/FTMInternal.h@ 32289

Last change on this file since 32289 was 32289, checked in by vboxsync, 15 years ago

Alignment again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: FTMInternal.h 32289 2010-09-07 12:55:16Z vboxsync $ */
2/** @file
3 * FTM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 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#ifndef ___FTMInternal_h
19#define ___FTMInternal_h
20
21#include <VBox/cdefs.h>
22#include <VBox/types.h>
23#include <VBox/ftm.h>
24#include <VBox/stam.h>
25#include <VBox/pdmcritsect.h>
26#include <iprt/avl.h>
27
28/** @defgroup grp_ftm_int Internals.
29 * @ingroup grp_ftm
30 * @{
31 */
32
33/** Physical page tree node. */
34typedef struct FTMPHYSPAGETREENODE
35{
36 AVLGCPHYSNODECORE Core;
37 void *pPage;
38} FTMPHYSPAGETREENODE;
39/** Pointer to FTMPHYSPAGETREENODE */
40typedef FTMPHYSPAGETREENODE *PFTMPHYSPAGETREENODE;
41
42/**
43 * FTM VM Instance data.
44 * Changes to this must checked against the padding of the ftm union in VM!
45 */
46typedef struct FTM
47{
48 /** Address of the standby VM. */
49 R3PTRTYPE(char *) pszAddress;
50 /** Password to access the syncing server of the standby VM. */
51 R3PTRTYPE(char *) pszPassword;
52 /** Port of the standby VM. */
53 unsigned uPort;
54 /** Syncing interval in ms. */
55 unsigned uInterval;
56
57 /** Set when this VM is the standby FT node. */
58 bool fIsStandbyNode;
59 /** Set when this master VM is busy with checkpointing. */
60 bool fCheckpointingActive;
61 /** Set when VM save/restore should only include changed pages. */
62 bool fDeltaLoadSaveActive;
63 bool fAlignment[5];
64
65 /** Current active socket. */
66 RTSOCKET hSocket;
67
68 /** State sync. */
69 struct
70 {
71 unsigned uOffStream;
72 unsigned cbReadBlock;
73 bool fStopReading;
74 bool fIOError;
75 bool fEndOfStream;
76 bool fAlignment[5];
77 } syncstate;
78
79 struct
80 {
81 R3PTRTYPE(PRTTCPSERVER) hServer;
82 R3PTRTYPE(AVLGCPHYSTREE) pPhysPageTree;
83 } standby;
84
85 struct
86 {
87 RTSEMEVENT hShutdownEvent;
88 } master;
89
90 /** FTM critical section.
91 * This makes sure only the checkpoint or sync is active
92 */
93 PDMCRITSECT CritSect;
94
95 STAMCOUNTER StatReceivedMem;
96 STAMCOUNTER StatReceivedState;
97 STAMCOUNTER StatSentMem;
98 STAMCOUNTER StatSentState;
99 STAMCOUNTER StatDeltaMem;
100 STAMCOUNTER StatDeltaVM;
101 STAMCOUNTER StatFullSync;
102 STAMCOUNTER StatCheckpointNetwork;
103 STAMCOUNTER StatCheckpointStorage;
104 STAMPROFILE StatCheckpoint;
105} FTM;
106AssertCompileMemberAlignment(FTM, CritSect, 8);
107
108/** @} */
109
110#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette