pub struct PcieHostPort {
host_config: PciHostConfig,
host_name: String,
hotplug_in_process: Arc<Mutex<bool>>,
hotplug_child_exist: Arc<Mutex<bool>>,
vm_socket: Arc<Mutex<Tube>>,
}
Expand description
Pcie root port device has a corresponding host pcie root port.
Fields§
§host_config: PciHostConfig
§host_name: String
§hotplug_in_process: Arc<Mutex<bool>>
§hotplug_child_exist: Arc<Mutex<bool>>
§vm_socket: Arc<Mutex<Tube>>
Implementations§
source§impl PcieHostPort
impl PcieHostPort
sourcepub fn new(host_sysfs_path: &Path, socket: Tube) -> Result<Self>
pub fn new(host_sysfs_path: &Path, socket: Tube) -> Result<Self>
Create PcieHostPort, host_syfsfs_patch specify host pcie port sysfs path.
pub fn get_bus_range(&self) -> PciBridgeBusRange
pub fn read_device_id(&self) -> u16
pub fn host_name(&self) -> String
pub fn read_config(&self, reg_idx: usize, data: &mut u32)
pub fn write_config(&mut self, _reg_idx: usize, _offset: u64, _data: &[u8])
pub fn get_bridge_window_size(&self) -> (u64, u64)
pub fn hotplug_probe(&mut self)
pub fn hot_unplug(&mut self)
Auto Trait Implementations§
impl RefUnwindSafe for PcieHostPort
impl Send for PcieHostPort
impl Sync for PcieHostPort
impl Unpin for PcieHostPort
impl UnwindSafe for PcieHostPort
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.