mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: remove unneeded #[allow(dead_code)]
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
c348d6598e
commit
f1f02e7144
@@ -49,7 +49,6 @@ pub const ACPI_RISC_V_IMSIC: u8 = 0x19;
|
|||||||
#[cfg(target_arch = "riscv64")]
|
#[cfg(target_arch = "riscv64")]
|
||||||
pub const ACPI_RISC_V_APLIC: u8 = 0x1A;
|
pub const ACPI_RISC_V_APLIC: u8 = 0x1A;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct PciRangeEntry {
|
struct PciRangeEntry {
|
||||||
@@ -60,7 +59,6 @@ struct PciRangeEntry {
|
|||||||
_reserved: u32,
|
_reserved: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct MemoryAffinity {
|
struct MemoryAffinity {
|
||||||
@@ -77,7 +75,7 @@ struct MemoryAffinity {
|
|||||||
_reserved3: u64,
|
_reserved3: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg(target_arch = "x86_64")]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct ProcessorLocalX2ApicAffinity {
|
struct ProcessorLocalX2ApicAffinity {
|
||||||
@@ -91,7 +89,7 @@ struct ProcessorLocalX2ApicAffinity {
|
|||||||
_reserved2: u32,
|
_reserved2: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct ProcessorGiccAffinity {
|
struct ProcessorGiccAffinity {
|
||||||
@@ -112,7 +110,6 @@ struct ProcessorGiccAffinity {
|
|||||||
//
|
//
|
||||||
// Note: Some older Linux kernel versions may incorrectly expect
|
// Note: Some older Linux kernel versions may incorrectly expect
|
||||||
// device_handle_type=0 for PCI devices.
|
// device_handle_type=0 for PCI devices.
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct GenericInitiatorAffinity {
|
struct GenericInitiatorAffinity {
|
||||||
@@ -127,7 +124,7 @@ struct GenericInitiatorAffinity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GenericInitiatorAffinity {
|
impl GenericInitiatorAffinity {
|
||||||
#[allow(dead_code)]
|
#[cfg(test)]
|
||||||
fn from_acpi_device(hid: u64, uid: u32, proximity_domain: u32) -> Self {
|
fn from_acpi_device(hid: u64, uid: u32, proximity_domain: u32) -> Self {
|
||||||
let mut device_handle = [0u8; 16];
|
let mut device_handle = [0u8; 16];
|
||||||
// ACPI 6.6 Table 5-66: ACPI device handle
|
// ACPI 6.6 Table 5-66: ACPI device handle
|
||||||
@@ -228,7 +225,6 @@ impl MemoryAffinity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct ViotVirtioPciNode {
|
struct ViotVirtioPciNode {
|
||||||
@@ -240,7 +236,6 @@ struct ViotVirtioPciNode {
|
|||||||
_reserved2: [u8; 8],
|
_reserved2: [u8; 8],
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct ViotPciRangeNode {
|
struct ViotPciRangeNode {
|
||||||
@@ -608,7 +603,6 @@ fn create_dbg2_table(base_address: u64) -> Sdt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortBodyBase {
|
struct IortBodyBase {
|
||||||
@@ -618,7 +612,6 @@ struct IortBodyBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortNodeCommon {
|
struct IortNodeCommon {
|
||||||
@@ -631,7 +624,6 @@ struct IortNodeCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortIdMapping {
|
struct IortIdMapping {
|
||||||
@@ -643,7 +635,6 @@ struct IortIdMapping {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortMemoryAccessProperties {
|
struct IortMemoryAccessProperties {
|
||||||
@@ -654,7 +645,6 @@ struct IortMemoryAccessProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortItsGroupBase {
|
struct IortItsGroupBase {
|
||||||
@@ -664,7 +654,6 @@ struct IortItsGroupBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct IortPciRootComplexBase {
|
struct IortPciRootComplexBase {
|
||||||
|
|||||||
@@ -317,7 +317,6 @@ fn core_scheduling_cookie() -> u64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct LocalX2Apic {
|
struct LocalX2Apic {
|
||||||
@@ -329,7 +328,7 @@ struct LocalX2Apic {
|
|||||||
pub processor_id: u32,
|
pub processor_id: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg(target_arch = "x86_64")]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct Ioapic {
|
struct Ioapic {
|
||||||
@@ -342,7 +341,6 @@ struct Ioapic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct GicC {
|
struct GicC {
|
||||||
@@ -367,7 +365,6 @@ struct GicC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct GicD {
|
struct GicD {
|
||||||
@@ -382,7 +379,6 @@ struct GicD {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct GicMsiFrame {
|
struct GicMsiFrame {
|
||||||
@@ -397,7 +393,6 @@ struct GicMsiFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct GicR {
|
struct GicR {
|
||||||
@@ -409,7 +404,6 @@ struct GicR {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct GicIts {
|
struct GicIts {
|
||||||
@@ -422,7 +416,6 @@ struct GicIts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct ProcessorHierarchyNode {
|
struct ProcessorHierarchyNode {
|
||||||
@@ -436,7 +429,6 @@ struct ProcessorHierarchyNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "riscv64")]
|
#[cfg(target_arch = "riscv64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct Imsic {
|
struct Imsic {
|
||||||
@@ -456,7 +448,6 @@ struct Imsic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "riscv64")]
|
#[cfg(target_arch = "riscv64")]
|
||||||
#[allow(dead_code)]
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(IntoBytes, Immutable, FromBytes)]
|
#[derive(IntoBytes, Immutable, FromBytes)]
|
||||||
struct Aplic {
|
struct Aplic {
|
||||||
@@ -476,7 +467,7 @@ struct Aplic {
|
|||||||
pub aplic_size: u32,
|
pub aplic_size: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg(target_arch = "x86_64")]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
#[derive(Default, IntoBytes, Immutable, FromBytes)]
|
||||||
struct InterruptSourceOverride {
|
struct InterruptSourceOverride {
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ pub enum BootPageAcceptance {
|
|||||||
|
|
||||||
/// The startup memory type used to notify a well behaved host that memory should be present before attempting to
|
/// The startup memory type used to notify a well behaved host that memory should be present before attempting to
|
||||||
/// start the guest.
|
/// start the guest.
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||||
pub enum StartupMemoryType {
|
pub enum StartupMemoryType {
|
||||||
/// The range is normal memory.
|
/// The range is normal memory.
|
||||||
|
|||||||
@@ -124,10 +124,6 @@ impl InterruptRoute {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is currently not used, but the upcoming vhost-guest feature
|
|
||||||
// will use it. Use #[allow(dead_code)] to suppress a compiler
|
|
||||||
// warning.
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn set_notifier(&mut self, eventfd: Option<EventFd>, vm: &dyn hypervisor::Vm) -> Result<()> {
|
fn set_notifier(&mut self, eventfd: Option<EventFd>, vm: &dyn hypervisor::Vm) -> Result<()> {
|
||||||
let old_irqfd = core::mem::replace(&mut self.irq_fd, eventfd);
|
let old_irqfd = core::mem::replace(&mut self.irq_fd, eventfd);
|
||||||
if self.registered {
|
if self.registered {
|
||||||
|
|||||||
Reference in New Issue
Block a user