VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructs.cpp@ 87815

Last change on this file since 87815 was 87500, checked in by vboxsync, 4 years ago

VMM/HM: Drop the VMX/SVM data unions in the VM and GVM structures. Too risky and not worth saving a few bytes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.0 KB
Line 
1/* $Id: tstAsmStructs.cpp 87500 2021-02-01 14:16:43Z vboxsync $ */
2/** @file
3 * Testcase for checking offsets in the assembly structures shared with C/C++.
4 */
5
6/*
7 * Copyright (C) 2006-2020 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#include <VBox/vmm/cpum.h>
23#include "CPUMInternal.h"
24#define IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS 1 /* For HMInternal */
25#include "HMInternal.h"
26#undef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS /* probably not necessary */
27#include "VMMInternal.h"
28#include <VBox/vmm/vm.h>
29#define GVM_C_STYLE_STRUCTURES
30#include <VBox/vmm/gvm.h>
31#include <VBox/vmm/hm_vmx.h>
32
33#include "tstHelp.h"
34#include <stdio.h>
35
36/* Hack for validating nested HMCPU structures. */
37typedef HMCPU::HMCPUVMX HMCPUVMX;
38typedef HMCPU::HMCPUSVM HMCPUSVM;
39typedef HMR0PERVCPU::HMR0CPUVMX HMR0CPUVMX;
40typedef HMR0PERVCPU::HMR0CPUSVM HMR0CPUSVM;
41
42/* For sup.mac simplifications. */
43#define SUPDRVTRACERUSRCTX32 SUPDRVTRACERUSRCTX
44#define SUPDRVTRACERUSRCTX64 SUPDRVTRACERUSRCTX
45
46
47int main()
48{
49 int rc = 0;
50 printf("tstAsmStructs: TESTING\n");
51
52#ifdef IN_RING3
53# include "tstAsmStructsHC.h"
54#else
55# include "tstAsmStructsRC.h"
56#endif
57
58 if (rc)
59 printf("tstAsmStructs: FAILURE - %d errors \n", rc);
60 else
61 printf("tstAsmStructs: SUCCESS\n");
62 return rc;
63}
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