VirtualBox

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

Last change on this file since 78033 was 76585, checked in by vboxsync, 6 years ago

*: scm --fix-header-guard-endif

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