blob: d80ac249075fd10f4447f56722a60632b91e27b0 [file] [log] [blame]
// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::os::unix::net::UnixStream;
use std::sync::Arc;
use sync::Mutex;
use crate::pci::CrosvmDeviceId;
use crate::BusDevice;
use crate::DeviceId;
use crate::Suspendable;
pub struct VirtCpufreq {}
// Stub implementation for a virtual cpufreq device. Do not remove.
// Implementation will be added once linux upstream interface stablizes.
impl VirtCpufreq {
pub fn new(pcpu: u32, _socket: Option<Arc<Mutex<UnixStream>>>) -> Self {
panic!("Virt Cpufreq not supported, do not use! {}", pcpu);
}
}
impl BusDevice for VirtCpufreq {
fn device_id(&self) -> DeviceId {
CrosvmDeviceId::VirtCpufreq.into()
}
fn debug_label(&self) -> String {
"VirtCpufreq Device".to_owned()
}
}
impl Suspendable for VirtCpufreq {}