diff --git a/virtio-devices/src/device.rs b/virtio-devices/src/device.rs index ca2e5834e..89e1ee2ea 100644 --- a/virtio-devices/src/device.rs +++ b/virtio-devices/src/device.rs @@ -188,6 +188,12 @@ pub trait VirtioDevice: Send { /// Set the access platform trait to let the device perform address /// translations if needed. fn set_access_platform(&mut self, _access_platform: Arc) {} + + /// Returns the access platform only if VIRTIO_F_ACCESS_PLATFORM was + /// negotiated with the guest. + fn access_platform(&self) -> Option> { + None + } } /// Trait to define address translation for devices managed by virtio-iommu