Skip to content

Commit 9ab047e

Browse files
committed
chore(vmm): Remove unused bitflags
Bitflags for IA32_ARCH_CAPABILITIES MSR are not used anywhere. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 396132a commit 9ab047e

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

src/vmm/src/arch/x86_64/msr.rs

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
/// Model Specific Registers (MSRs) related functionality.
5-
use bitflags::bitflags;
65
use kvm_bindings::{MsrList, Msrs, kvm_msr_entry};
76
use kvm_ioctls::{Kvm, VcpuFd};
87

@@ -58,67 +57,6 @@ const MSR_KVM_PV_EOI_EN: u32 = 0x4b56_4d04;
5857
const MSR_KVM_POLL_CONTROL: u32 = 0x4b56_4d05;
5958
const MSR_KVM_ASYNC_PF_INT: u32 = 0x4b56_4d06;
6059

61-
bitflags! {
62-
/// Feature flags enumerated in the IA32_ARCH_CAPABILITIES MSR.
63-
/// See https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/cpuid-enumeration-and-architectural-msrs.html
64-
#[derive(Default)]
65-
#[repr(C)]
66-
pub struct ArchCapaMSRFlags: u64 {
67-
/// The processor is not susceptible to Rogue Data Cache Load (RDCL).
68-
const RDCL_NO = 1 << 0;
69-
/// The processor supports enhanced Indirect Branch Restriction Speculation (IBRS)
70-
const IBRS_ALL = 1 << 1;
71-
/// The processor supports RSB Alternate. Alternative branch predictors may be used by RET instructions
72-
/// when the RSB is empty. Software using retpoline may be affected by this behavior.
73-
const RSBA = 1 << 2;
74-
/// A value of 1 indicates the hypervisor need not flush the L1D on VM entry.
75-
const SKIP_L1DFL_VMENTRY = 1 << 3;
76-
/// Processor is not susceptible to Speculative Store Bypass (SSB).
77-
const SSB_NO = 1 << 4;
78-
/// Processor is not susceptible to Microarchitectural Data Sampling (MDS).
79-
const MDS_NO = 1 << 5;
80-
/// The processor is not susceptible to a machine check error due to modifying the size of a code page
81-
/// without TLB invalidation.
82-
const IF_PSCHANGE_MC_NO = 1 << 6;
83-
/// The processor supports RTM_DISABLE and TSX_CPUID_CLEAR.
84-
const TSX_CTRL = 1 << 7;
85-
/// Processor is not susceptible to Intel® Transactional Synchronization Extensions
86-
/// (Intel® TSX) Asynchronous Abort (TAA).
87-
const TAA_NO = 1 << 8;
88-
// Bit 9 is reserved
89-
/// Processor supports IA32_MISC_PACKAGE_CTRLS MSR.
90-
const MISC_PACKAGE_CTRLS = 1 << 10;
91-
/// Processor supports setting and reading IA32_MISC_PACKAGE_CTLS[0] (ENERGY_FILTERING_ENABLE) bit.
92-
const ENERGY_FILTERING_CTL = 1 << 11;
93-
/// The processor supports data operand independent timing mode.
94-
const DOITM = 1 << 12;
95-
/// The processor is not affected by either the Shared Buffers Data Read (SBDR) vulnerability or the
96-
/// Sideband Stale Data Propagator (SSDP).
97-
const SBDR_SSDP_NO = 1 << 13;
98-
/// The processor is not affected by the Fill Buffer Stale Data Propagator (FBSDP).
99-
const FBSDP_NO = 1 << 14;
100-
/// The processor is not affected by vulnerabilities involving the Primary Stale Data Propagator (PSDP).
101-
const PSDP_NO = 1 << 15;
102-
// Bit 16 is reserved
103-
/// The processor will overwrite fill buffer values as part of MD_CLEAR operations with the VERW instruction.
104-
/// On these processors, L1D_FLUSH does not overwrite fill buffer values.
105-
const FB_CLEAR = 1 << 17;
106-
/// The processor supports read and write to the IA32_MCU_OPT_CTRL MSR (MSR 123H) and to the FB_CLEAR_DIS bit
107-
/// in that MSR (bit position 3).
108-
const FB_CLEAR_CTRL = 1 << 18;
109-
/// A value of 1 indicates processor may have the RRSBA alternate prediction behavior,
110-
/// if not disabled by RRSBA_DIS_U or RRSBA_DIS_S.
111-
const RRSBA = 1 << 19;
112-
/// A value of 1 indicates BHI_NO branch prediction behavior,
113-
/// regardless of the value of IA32_SPEC_CTRL[BHI_DIS_S] MSR bit.
114-
const BHI_NO = 1 << 20;
115-
// Bits 21:22 are reserved
116-
/// If set, the IA32_OVERCLOCKING STATUS MSR exists.
117-
const OVERCLOCKING_STATUS = 1 << 23;
118-
// Bits 24:63 are reserved
119-
}
120-
}
121-
12260
/// Macro for generating a MsrRange.
12361
#[macro_export]
12462
macro_rules! MSR_RANGE {

0 commit comments

Comments
 (0)