libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
Efer.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
19
20#include <cstdint>
21
22namespace introvirt {
23namespace x86 {
24
28class Efer {
29 public:
36 bool sce() const;
37
44 bool lme() const;
45
52 bool lma() const;
53
60 bool nxe() const;
61
68 bool svme() const;
69
76 bool lmsle() const;
77
84 bool ffxsr() const;
85
92 bool tce() const;
93
99 uint64_t value() const;
100
106 explicit Efer(uint64_t efer) HOT : efer_(efer){};
107
108 ~Efer() = default;
109
110 private:
111 const uint64_t efer_;
112};
113
114} // namespace x86
115} // namespace introvirt
The x86 Extended Feature Enable Register.
Definition Efer.hh:28
bool svme() const
Get the SVME (Secure Virtual Machine Enable) bit.
bool nxe() const
Get the NXE (No-Execute Enable) bit.
bool sce() const
Get the SCE (System Call Extensions) bit.
bool lma() const
Get the LMA (Long Mode Active) bit.
bool lme() const
Get the LME (Long Mode Enable) bit.
bool tce() const
Get the TCE (Translation Cache Extension) bit.
bool lmsle() const
Get the LMSLE (Long Mode Segment Limit Enable) bit.
Efer(uint64_t efer) HOT
Construct a new Efer object.
Definition Efer.hh:106
bool ffxsr() const
Get the FFXSR (Fast FXSAVE/FXRSTOR) bit.
uint64_t value() const
Get the raw value of the EFER MSR.
#define HOT
Definition compiler.hh:34
Core IntroVirt classes.
Definition Cr0.hh:20