VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR0/IEMR0.cpp@ 95085

Last change on this file since 95085 was 93922, checked in by vboxsync, 3 years ago

VMM: Nested VMX: bugref:10092 EPT VM-exit handling with HM ring-0 code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: IEMR0.cpp 93922 2022-02-24 15:14:31Z vboxsync $ */
2/** @file
3 * IEM - Interpreted Execution Manager - Ring-0.
4 */
5
6/*
7 * Copyright (C) 2011-2022 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_IEM
23#define VMCPU_INCL_CPUM_GST_CTX
24#include <VBox/vmm/iem.h>
25#include <VBox/vmm/cpum.h>
26#include <VBox/vmm/pgm.h>
27#include "IEMInternal.h"
28#include <VBox/vmm/vmcc.h>
29#include <VBox/log.h>
30#include <iprt/errcore.h>
31
32
33
34VMMR0_INT_DECL(int) IEMR0InitVM(PGVM pGVM)
35{
36 AssertCompile(sizeof(pGVM->iem.s) <= sizeof(pGVM->iem.padding));
37 AssertCompile(sizeof(pGVM->aCpus[0].iem.s) <= sizeof(pGVM->aCpus[0].iem.padding));
38
39#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
40 /*
41 * Register the per-VM VMX APIC-access page handler type.
42 */
43 if (pGVM->cpum.ro.GuestFeatures.fVmx)
44 {
45 int rc = PGMR0HandlerPhysicalTypeSetUpContext(pGVM, PGMPHYSHANDLERKIND_ALL, 0 /*fFlags*/,
46 iemVmxApicAccessPageHandler, iemVmxApicAccessPagePfHandler,
47 "VMX APIC-access page", pGVM->iem.s.hVmxApicAccessPage);
48 AssertLogRelRCReturn(rc, rc);
49 }
50#endif
51 return VINF_SUCCESS;
52}
53
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