pub enum DeviceControlRequest {
Gpe {
gpe: u32,
clear_evt: Option<Event>,
},
PciPme(u16),
HotPlugVfioCommand {
device: HotPlugDeviceInfo,
add: bool,
},
}Expand description
A request from a device to the main process to perform some operation on the VM.
Variants§
Gpe
Inject a general-purpose event. If clear_evt is provided, when the irq associated
with the GPE is resampled, it will be re-asserted as long as clear_evt is not
signaled.
PciPme(u16)
Inject a PCI PME.
HotPlugVfioCommand
Command to add/remove multiple vfio-pci devices.
Implementations§
Source§impl DeviceControlRequest
impl DeviceControlRequest
Sourcepub fn execute(
&self,
pm: &mut Option<Arc<Mutex<dyn PmResource + Send>>>,
) -> DeviceControlResponse
pub fn execute( &self, pm: &mut Option<Arc<Mutex<dyn PmResource + Send>>>, ) -> DeviceControlResponse
Executes this request on the given VM power management resource.
Trait Implementations§
Source§impl Debug for DeviceControlRequest
impl Debug for DeviceControlRequest
Source§impl<'de> Deserialize<'de> for DeviceControlRequest
impl<'de> Deserialize<'de> for DeviceControlRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeviceControlRequest
impl RefUnwindSafe for DeviceControlRequest
impl Send for DeviceControlRequest
impl Sync for DeviceControlRequest
impl Unpin for DeviceControlRequest
impl UnwindSafe for DeviceControlRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more