Struct Partition

Source
pub struct Partition { /* private fields */ }

Implementations§

Source§

impl Partition

Source

pub fn reset(&self) -> Result<(), WHvError>

Source

pub fn set_property( &self, property: PartitionProperty<'_>, ) -> Result<(), WHvError>

Source

pub fn vp(&self, index: u32) -> Processor<'_>

Source

pub unsafe fn map_range( &self, process: Option<BorrowedHandle<'_>>, data: *mut u8, size: usize, addr: u64, flags: WHV_MAP_GPA_RANGE_FLAGS, ) -> Result<(), WHvError>

Source

pub fn unmap_range(&self, addr: u64, size: u64) -> Result<(), WHvError>

Source

pub fn populate_ranges( &self, ranges: &[WHV_MEMORY_RANGE_ENTRY], access_type: WHV_MEMORY_ACCESS_TYPE, flags: WHV_ADVISE_GPA_RANGE_POPULATE_FLAGS, ) -> Result<(), WHvError>

Source

pub fn pin_ranges( &self, ranges: &[WHV_MEMORY_RANGE_ENTRY], ) -> Result<(), WHvError>

Source

pub fn unpin_ranges( &self, ranges: &[WHV_MEMORY_RANGE_ENTRY], ) -> Result<(), WHvError>

Source

pub fn interrupt( &self, typ: WHV_INTERRUPT_TYPE, mode: WHV_INTERRUPT_DESTINATION_MODE, trigger: WHV_INTERRUPT_TRIGGER_MODE, destination: u32, vector: u32, ) -> Result<(), WHvError>

Source

pub fn get_interrupt_target_vp_set( &self, mode: WHV_INTERRUPT_DESTINATION_MODE, destination: u64, ) -> Result<Vec<u32>, WHvError>

Source

pub fn tsc_frequency(&self) -> Result<u64, WHvError>

Source

pub fn apic_frequency(&self) -> Result<u64, WHvError>

Source

pub fn reference_time(&self) -> Result<u64, WHvError>

Source

pub fn physical_address_width(&self) -> Result<u32, WHvError>

Source

pub unsafe fn register_doorbell( &self, m: &DoorbellMatch, event: RawHandle, ) -> Result<(), WHvError>

Source

pub fn unregister_doorbell(&self, m: &DoorbellMatch) -> Result<(), WHvError>

Source

pub fn create_vp(&self, index: u32) -> VpBuilder<'_>

Source

pub fn delete_vp(&self, index: u32) -> Result<(), WHvError>

Source

pub fn create_notification_port( &self, parameters: NotificationPortParameters, event: BorrowedHandle<'_>, ) -> Result<NotificationPortHandle, WHvError>

Source

pub fn set_notification_port( &self, handle: &NotificationPortHandle, code: WHV_NOTIFICATION_PORT_PROPERTY_CODE, val: u64, ) -> Result<(), WHvError>

Source

pub fn delete_notification_port(&self, handle: NotificationPortHandle)

Source

pub fn create_trigger( &self, parameters: TriggerParameters, ) -> Result<(TriggerHandle, OwnedHandle), WHvError>

Source

pub fn update_trigger( &self, handle: &TriggerHandle, parameters: TriggerParameters, ) -> Result<(), WHvError>

Source

pub fn delete_trigger(&self, handle: TriggerHandle)

Source

pub fn start_migration(&self) -> Result<MigrationHandle, WHvError>

Source

pub fn complete_migration(&mut self) -> Result<(), WHvError>

Source

pub fn cancel_migration(&self) -> Result<(), WHvError>

Source

pub fn create_device( &self, id: u64, resource: VpciResource, flags: WHV_CREATE_VPCI_DEVICE_FLAGS, event: Option<RawHandle>, ) -> Result<(), WHvError>

Source

pub fn delete_device(&self, id: u64) -> Result<(), WHvError>

Source

pub fn device(&self, id: u64) -> Device<'_>

Source

pub fn suspend_time(&self) -> Result<(), WHvError>

Source

pub fn resume_time(&self) -> Result<(), WHvError>

Trait Implementations§

Source§

impl Debug for Partition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Partition

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.