Skip to content

Commit 131461d

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 6513dfd commit 131461d

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

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

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

0 commit comments

Comments
 (0)