mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: replace #[allow(dead_code)] with expect()
On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
9a60472ace
commit
179d56ca72
@@ -562,10 +562,12 @@ struct KvmDirtyLogSlot {
|
||||
guest_memfd: u32,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct KvmMemorySlot {
|
||||
#[cfg_attr(not(feature = "sev_snp"), expect(dead_code))]
|
||||
guest_memfd: OwnedFd,
|
||||
#[cfg_attr(not(feature = "sev_snp"), expect(dead_code))]
|
||||
guest_phys_addr: u64,
|
||||
#[cfg_attr(not(feature = "sev_snp"), expect(dead_code))]
|
||||
memory_size: u64,
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,6 @@ unsafe impl Send for Ghcb {}
|
||||
unsafe impl Sync for Ghcb {}
|
||||
|
||||
/// Vcpu struct for Microsoft Hypervisor
|
||||
#[allow(dead_code)]
|
||||
pub struct MshvVcpu {
|
||||
fd: VcpuFd,
|
||||
vp_index: u8,
|
||||
@@ -448,6 +447,10 @@ pub struct MshvVcpu {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
msrs: Vec<MsrEntry>,
|
||||
vm_ops: Option<Arc<dyn vm::VmOps>>,
|
||||
#[cfg_attr(
|
||||
all(not(target_arch = "x86_64"), not(feature = "sev_snp")),
|
||||
expect(dead_code)
|
||||
)]
|
||||
vm_fd: Arc<VmFd>,
|
||||
#[cfg(feature = "sev_snp")]
|
||||
ghcb: Option<Ghcb>,
|
||||
|
||||
Reference in New Issue
Block a user