hypervisor: Implement get_device_attr method for AArch64

This commit implements the `get_device_attr` method for the
`KVM_GET_DEVICE_ATTR` ioctl. This ioctl will be used in retrieving
the GIC status.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Henry Wang
2020-08-31 14:04:19 +08:00
committed by Rob Bradford
parent b1285cf528
commit 89a6b63e6e
3 changed files with 38 additions and 0 deletions

View File

@@ -1254,6 +1254,14 @@ impl device::Device for KvmDevice {
.set_device_attr(attr)
.map_err(|e| device::HypervisorDeviceError::SetDeviceAttribute(e.into()))
}
///
/// Get device attribute
///
fn get_device_attr(&self, attr: &mut DeviceAttr) -> device::Result<()> {
self.fd
.get_device_attr(attr)
.map_err(|e| device::HypervisorDeviceError::GetDeviceAttribute(e.into()))
}
}
impl AsRawFd for KvmDevice {