Skip to content
Snippets Groups Projects
Commit 64859d6d authored by Dor Laor's avatar Dor Laor
Browse files

Add functions to retrieve the guest features from the host

parent 62b9efa3
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,17 @@ namespace virtio {
set_virtio_config_bit(VIRTIO_PCI_GUEST_FEATURES, bit, on);
}
u32 virtio_device::get_guest_features(void)
{
return (virtio_conf_readl(VIRTIO_PCI_GUEST_FEATURES));
}
bool virtio_device::get_guest_feature_bit(int bit)
{
return (get_virtio_config_bit(VIRTIO_PCI_GUEST_FEATURES, bit));
}
u32 virtio_device::get_dev_status(void)
{
return (virtio_conf_readl(VIRTIO_PCI_STATUS));
......
......@@ -119,6 +119,8 @@ namespace virtio {
bool get_device_feature_bit(int bit);
void set_guest_features(u32 features);
void set_guest_feature_bit(int bit, bool on);
u32 get_guest_features(void);
bool get_guest_feature_bit(int bit);
// device status
u32 get_dev_status(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment