1 | /* $Id: VBoxCpuReport.h 69654 2017-11-10 19:22:45Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxCpuReport internal header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2013-2017 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 | #ifndef ___VBoxCpuReport_h___
|
---|
20 | #define ___VBoxCpuReport_h___
|
---|
21 |
|
---|
22 | #include <VBox/sup.h>
|
---|
23 |
|
---|
24 | RT_C_DECLS_BEGIN
|
---|
25 |
|
---|
26 | typedef struct VBCPUREPMSRACCESSORS
|
---|
27 | {
|
---|
28 | /** Wheter MSR prober can read/modify/restore MSRs more or less
|
---|
29 | * atomically, without allowing other code to be executed. */
|
---|
30 | bool fAtomic;
|
---|
31 | /** @copydoc SUPR3MsrProberRead */
|
---|
32 | DECLCALLBACKMEMBER(int, pfnMsrProberRead)(uint32_t uMsr, RTCPUID idCpu, uint64_t *puValue, bool *pfGp);
|
---|
33 | /** @copydoc SUPR3MsrProberWrite */
|
---|
34 | DECLCALLBACKMEMBER(int, pfnMsrProberWrite)(uint32_t uMsr, RTCPUID idCpu, uint64_t uValue, bool *pfGp);
|
---|
35 | /** @copydoc SUPR3MsrProberModify */
|
---|
36 | DECLCALLBACKMEMBER(int, pfnMsrProberModify)(uint32_t uMsr, RTCPUID idCpu, uint64_t fAndMask, uint64_t fOrMask,
|
---|
37 | PSUPMSRPROBERMODIFYRESULT pResult);
|
---|
38 | /** Termination callback, optional. */
|
---|
39 | DECLCALLBACKMEMBER(void, pfnTerm)(void);
|
---|
40 | } VBCPUREPMSRACCESSORS;
|
---|
41 | typedef VBCPUREPMSRACCESSORS *PVBCPUREPMSRACCESSORS;
|
---|
42 |
|
---|
43 | extern void vbCpuRepDebug(const char *pszMsg, ...);
|
---|
44 | extern void vbCpuRepPrintf(const char *pszMsg, ...);
|
---|
45 | extern int VbCpuRepMsrProberInitSupDrv(PVBCPUREPMSRACCESSORS pMsrAccessors);
|
---|
46 | extern int VbCpuRepMsrProberInitPlatform(PVBCPUREPMSRACCESSORS pMsrAccessors);
|
---|
47 |
|
---|
48 | RT_C_DECLS_END
|
---|
49 |
|
---|
50 | #endif
|
---|
51 |
|
---|