hypervisor: Silence compiler warning for unused variables

There are a bunch of unused variables as of now on the MSHV side and
compiler warns about them. Thus, mark them as unused for the time being.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
Jinank Jain
2025-02-04 14:45:52 +00:00
parent 278b57ba49
commit 317f8002d7
+6 -5
View File
@@ -528,6 +528,7 @@ unsafe impl Send for Ghcb {}
unsafe impl Sync for Ghcb {} unsafe impl Sync for Ghcb {}
/// Vcpu struct for Microsoft Hypervisor /// Vcpu struct for Microsoft Hypervisor
#[allow(dead_code)]
pub struct MshvVcpu { pub struct MshvVcpu {
fd: VcpuFd, fd: VcpuFd,
vp_index: u8, vp_index: u8,
@@ -1283,7 +1284,7 @@ impl cpu::Vcpu for MshvVcpu {
} }
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn init_pmu(&self, irq: u32) -> cpu::Result<()> { fn init_pmu(&self, _irq: u32) -> cpu::Result<()> {
unimplemented!() unimplemented!()
} }
@@ -1293,12 +1294,12 @@ impl cpu::Vcpu for MshvVcpu {
} }
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn setup_regs(&self, cpu_id: u8, boot_ip: u64, fdt_start: u64) -> cpu::Result<()> { fn setup_regs(&self, _cpu_id: u8, _boot_ip: u64, _fdt_start: u64) -> cpu::Result<()> {
unimplemented!() unimplemented!()
} }
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn get_sys_reg(&self, sys_reg: u32) -> cpu::Result<u64> { fn get_sys_reg(&self, _sys_reg: u32) -> cpu::Result<u64> {
unimplemented!() unimplemented!()
} }
@@ -1444,7 +1445,7 @@ impl cpu::Vcpu for MshvVcpu {
/// ///
/// Set CPU state for aarch64 guest. /// Set CPU state for aarch64 guest.
/// ///
fn set_state(&self, state: &CpuState) -> cpu::Result<()> { fn set_state(&self, _state: &CpuState) -> cpu::Result<()> {
unimplemented!() unimplemented!()
} }
@@ -2170,7 +2171,7 @@ impl vm::Vm for MshvVm {
} }
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn create_vgic(&self, config: VgicConfig) -> vm::Result<Arc<Mutex<dyn Vgic>>> { fn create_vgic(&self, _config: VgicConfig) -> vm::Result<Arc<Mutex<dyn Vgic>>> {
unimplemented!() unimplemented!()
} }